On Tue, 18 Aug 2015 01:07:58 -0700 Tony Lindgren
wrote:
> * NeilBrown [150729 17:29]:
> > Now that twl4030_bci_probe can safely return -EPROBE_DEFER,
> > do so when devm_usb_get_phy_by_node returns that error.
> >
> > Signed-off-by: NeilBrown
> > ---
>
;
> Anyway, I queued the below patch with Tony's ACK to fix the build
> issue in next.
>
OK, thanks.
I'll try to figure out are more proper approach ... might be a week or
so though.
Thanks,
NeilBrown
pgpEQ176T2qUB.pgp
Description: OpenPGP digital signature
On Thu, 6 Aug 2015 20:11:16 -0700 Tony Lindgren
wrote:
> * NeilBrown [150729 17:28]:
> > --- a/drivers/power/twl4030_charger.c
> > +++ b/drivers/power/twl4030_charger.c
> > static int twl4030_charger_update_current(struct twl4030_bci *bci)
> > {
> >
We will need this calculation in other places, so
create functions to map between register value and uA value.
Acked-by: Pavel Machek
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c | 48 ---
1 file changed, 35 insertions(+), 13 deletions
to' if selected.
Acked-by: Pavel Machek
Signed-off-by: NeilBrown
---
.../ABI/testing/sysfs-class-power-twl4030 | 11
drivers/power/twl4030_charger.c| 59
2 files changed, 70 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-
So split 'cur' into 'usb_cur' and 'ac_cur' and use accordingly.
Now we must review the current setting on any interrupt or USB
event which might indicate that the charger-source has changed.
Acked-by: Pavel Machek
Signed-off-by: NeilBrown
---
drivers/power/t
sysfs. So setting a large value will cause the maximum
available to be used - up to the limit of 1.7A imposed by the
hardware.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c | 67 ---
1 file changed, 61 insertions(+), 6 deletions(-)
diff --git a/dri
over-charge.
It was used with a bike hub dynamo since a year or so. In that case
there are automatically charging stops when the cyclist needs a break.
Original-by: Andreas Kemnade
Signed-off-by: NeilBrown
---
.../ABI/testing/sysfs-class-power-twl4030 |9 +++
drivers/pow
If it cannot, we will stop pulling more current when voltage drops.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index 2c537ee11bbe
o use it as a current source.
So this patch reverts the above commit, and adds the necessary
runtime_pm calls.
Acked-by: Lee Jones
Signed-off-by: NeilBrown
---
drivers/mfd/twl-core.c |9 -
drivers/power/twl4030_charger.c | 18 +-
2 files changed, 9 inser
Now that twl4030_bci_probe can safely return -EPROBE_DEFER,
do so when devm_usb_get_phy_by_node returns that error.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c |6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/power/twl4030_charger.c b/drivers
From: Pavel Machek
Drivers using module_platform_driver_probe cannot return
EPROBE_DEFER from the probe function, which makes them rather useless
these days...
Convert to module_platform_driver() so EPROBE_DEFER can be used.
Signed-off-by: Pavel Machek
Signed-off-by: NeilBrown
---
drivers
se current setting are managed
by the driver, but most are left at their default settings.
The current drawn is set to 500mA if the allow_usb module parameter is
set, and to 100mA otherwise.
More fine control will appear in later patches.
Acked-by: Pavel Machek
Signed-off-by: NeilBrown
---
dri
, in part
because extcon has seen some changes lately which leave me even more
confused about how best to use it than before.
I need to sort that out before I can resolve the rest of my usb phy
patches and then add a few more charger patches.
Thanks,
NeilBrown
---
NeilBrown (12
'max_current' sysfs attributes are created which allow the
max to be set.
Whenever a current source changes, the default is restored.
This will be followed by a uevent, so user-space can decide to
update again.
Acked-by: Pavel Machek
Signed-off-by: NeilBrown
---
.../ABI/testing/s
The usb phy driver already determines when VBUS is available,
so repeating the test in the charger driver is pointless duplication.
On probe, process the last event from the phy, and from then on,
do whatever the phy tells us without double-checking.
Signed-off-by: NeilBrown
---
drivers/power
This allows AC charging to be turned off, much like usb charging.
"continuous" mode is not available though.
Acked-by: Pavel Machek
Signed-off-by: NeilBrown
---
.../ABI/testing/sysfs-class-power-twl4030 | 10 ++
drivers/power/twl4030_charger.c
On Mon, 23 Mar 2015 13:14:50 +0100 jake42
wrote:
> Hello Neil,
>
> some suggestions:
>
> On 23.03.2015 00:20, NeilBrown wrote:
> > From: NeilBrown
> > diff --git a/Documentation/ABI/testing/sysfs-class-power-twl4030
> > b/Documentation/ABI/testing/sysfs-clas
On Mon, 1 Jun 2015 19:06:52 +0530 Kishon Vijay Abraham I
wrote:
> Hi,
>
> On Thursday 16 April 2015 01:33 PM, NeilBrown wrote:
> > From: NeilBrown
> >
> > The twl4030 phy can measure, with low precision, the
> > resistance-to-ground of the ID pin.
> >
&g
On Sat, 18 Apr 2015 00:14:36 +0200 Pavel Machek wrote:
> On Thu 2015-04-16 18:03:04, NeilBrown wrote:
> > From: NeilBrown
> >
> > This driver device one local attribute: vbus.
> > Describe that in Documentation/ABI/testing/sysfs-platform/twl4030-usb.
> &
ues.
In particular:
phy: twl4030-usb: remove incorrect pm_runtime_get_sync() in probe function.
Fixes a bug which causes the usb phy to remain permanently powered
on, hence the Cc to Tony.
If these could be queued for some future merge window, I would really
appreciate it.
Thanks,
NeilBr
From: NeilBrown
This driver device one local attribute: vbus.
Describe that in Documentation/ABI/testing/sysfs-platform/twl4030-usb.
Signed-off-by: NeilBrown
---
.../ABI/testing/sysfs-platform-twl4030-usb |8
1 file changed, 8 insertions(+)
create mode 100644
From: NeilBrown
The twl4030 phy can measure, with low precision, the
resistance-to-ground of the ID pin.
Add a function to read the value, and export the result
via sysfs.
If the read fails, which it does sometimes, try again in 50msec.
Acked-by: Pavel Machek
Signed-off-by: NeilBrown
From: NeilBrown
Signed-off-by: NeilBrown
---
drivers/phy/phy-twl4030-usb.c | 67 +
1 file changed, 67 insertions(+)
diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
index 1d6f3e70193e..c42153d43ec2 100644
--- a/drivers/phy
these two pointless tests.
Signed-off-by: NeilBrown
---
drivers/phy/phy-twl4030-usb.c |4
1 file changed, 4 deletions(-)
diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
index 3078f80bf520..590c2b1c1a94 100644
--- a/drivers/phy/phy-twl4030-usb.c
+++ b/drivers/p
: 96be39ab34b77c6f6f5cd6ae03aac6c6449ee5c4
Signed-off-by: NeilBrown
---
drivers/phy/phy-twl4030-usb.c |1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
index 590c2b1c1a94..3a707dd14238 100644
--- a/drivers/phy/phy-twl4030-usb.c
+++ b/drivers/phy/phy-twl4030
From: NeilBrown
A construct like:
if (pm_runtime_suspended(twl->dev))
pm_runtime_get_sync(twl->dev);
is against the spirit of the runtime_pm interface as it
makes the internal refcounting useless.
In this case it is also racy, particularly as 'put_autosuspe
at time the
device cannot use more than 200mA, and that doesn't cause the voltage to drop.
Then later when user enabled wifi-hotspot, the current needed might go up
above what the charger can provide.
Maybe I should only increase the limit while the actual current is also
increasing. Maybe also revisit the setting when the battery starts charging.
NeilBrown
>
> Best regards,
> Pavel
pgpc908HCllRF.pgp
Description: OpenPGP digital signature
On Thu, 26 Mar 2015 08:43:37 +1100 NeilBrown wrote:
> enable and disable are only used to get and put
> runtime pm references. .set_ios already does this
> itself, and other drivers just do it in set_ios
> and .request without using enable/disable.
>
> So add pm_
Only omap_hsmmc uses enable and disable, and this seems
to be largely for historical reasons and is no longer
necessary.
I have tested these patches with an OMAP3 with an
uSD card on mmc0 and a wifi SDIO device on mmc1.
NeilBrown
---
NeilBrown (2):
mmc: omap_hsmmc: stop using .enable
: NeilBrown
---
drivers/mmc/host/omap_hsmmc.c | 24 +++-
1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index f84cfb01716d..092bcecd73e6 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc
On Mon, 23 Mar 2015 10:10:18 +0100 Ulf Hansson wrote:
> On 24 February 2015 at 03:42, NeilBrown wrote:
> > @@ -941,8 +947,12 @@ void mmc_release_host(struct mmc_host *host)
> >
> > WARN_ON(!host->claimed);
> >
> > - if (host-&
The 'enable' and 'disable' methods are "deprecated"
according to host.h, and are no longer used. So
discard them.
Signed-off-by: NeilBrown
---
drivers/mmc/core/core.c |5 -
include/linux/mmc/host.h |6 --
2 files changed, 11 deletions(-)
diff --g
From: NeilBrown
The twl4030 usb phy needs to be active while we are using
the USB VBUS as a current source for charging.
In particular, the usb3v1 regulator must be enabled and the
PHY_PWR_PHYPWD bit must be set to keep the phy powered.
commit ab37813f4093a5f59cb8e083cde277289dc72ed3
From: NeilBrown
Final allocations/registrations are now managed by devres.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c | 32 +---
1 file changed, 9 insertions(+), 23 deletions(-)
diff --git a/drivers/power/twl4030_charger.c b/drivers/power
From: NeilBrown
This simplifies the error paths.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index b07f4e2f2dde
From: NeilBrown
The twl4030 allows control of the incoming current.
Part of this control is a 'CGAIN' setting which doubles
the range for half the precision. This control affects
several different current setting, so all need to be updated
at once when CGAIN is changed.
With this pat
From: NeilBrown
We will need this calculation in other places, so
create functions to map between register value and uA value.
Acked-by: Pavel Machek
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c | 48 ---
1 file changed, 35 insertions
From: NeilBrown
The usb phy driver already determines when VBUS is available,
so repeating the test in the charger driver is pointless duplication.
On probe, process the last event from the phy, and from then on,
do whatever the phy tells us without double-checking.
Signed-off-by: NeilBrown
From: NeilBrown
Add a 'continuous' option for usb charging which enables
the "linear" charging mode of the twl4030.
Linear charging does a good job with not-so-reliable power sources.
Auto mode does not work well as it switches off when voltage drops
momentarily. Care must
From: NeilBrown
If it cannot, we will stop pulling more current when voltage drops.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index
From: NeilBrown
This allows AC charging to be turned off, much like usb charging.
"continuous" mode is not available though.
Acked-by: Pavel Machek
Signed-off-by: NeilBrown
---
.../ABI/testing/sysfs-class-power-twl4030 | 10 ++
drivers/power/twl4030
From: NeilBrown
The USB Battery Charging spec (BC1.2) suggests a dedicated
charging port can deliver from 0.5 to 5.0A at between 4.75 and 5.25
volts.
To choose the "correct" current voltage setting requires a trial
and error approach: try to draw current and see if the voltage dro
From: NeilBrown
'off' or 'auto' to
/sys/class/power/twl4030_usb/mode
will now enable or disable charging from USB port. Normally this is
enabled on 'plug' and disabled on 'unplug'.
Unplug will still disable charging. 'plug' will only enable
From: NeilBrown
'max_current' sysfs attributes are created which allow the
max to be set.
Whenever a current source changes, the default is restored.
This will be followed by a uevent, so user-space can decide to
update again.
Acked-by: Pavel Machek
Signed-off-by: NeilBrown
--
From: NeilBrown
The twl4030 charger has two current sources, 'USB' and 'AC'
(presumably "Accessory Charger").
If 'AC' is providing current, we should set the current limit
differently to when it isn't (and so USB is used).
So split 'cur' i
From: NeilBrown
If the phy has been told what current it can draw, it tells us
and now we use that number.
Note that 'vbus_draw' is in mA, while usb_cur is in uA.
Acked-by: Pavel Machek
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c |5 +
1 file changed, 5
nt if it can do so without
the voltage dropping too much
- a 'continuous' mode is available which ignores voltage and just
takes what it can (to be used with caution, but very useful in
some circumstances).
- 'ac' and 'usb' power sources can be configu
On Fri, 6 Mar 2015 23:59:04 +0200 Grazvydas Ignotas wrote:
> On Tue, Feb 24, 2015 at 6:33 AM, NeilBrown wrote:
> > This allows AC charging to be turned off, much like usb charging.
> >
> > "continuous" (aka "linear") mode maps to the CVENAC (con
On Wed, 4 Mar 2015 07:54:41 +0100 "Dr. H. Nikolaus Schaller"
wrote:
>
> Am 04.03.2015 um 07:35 schrieb NeilBrown :
>
> > On Mon, 2 Mar 2015 22:04:31 +0100 Pavel Machek wrote:
> >
> >> Hi!
> >>
> >>> The twl4030 phy can measure,
er
thing. So maybe we should fix platform_driver_probe() to do the right thing
with -EPROBEDEFER??
Trouble is, I really don't understand the point or mechanism for
platform_driver_probe(), so I cannot suggest anything.
But I have been annoyed before that platform_driver_probe doesn't co
On Mon, 2 Mar 2015 22:29:45 +0100 Pavel Machek wrote:
> On Tue 2015-02-24 15:33:53, NeilBrown wrote:
> > The USB Battery Charging spec (BC1.2) suggests a dedicated
> > charging port can deliver from 0.5 to 5.0A at between 4.75 and 5.25
> > volts.
> >
> > To cho
On Mon, 2 Mar 2015 22:29:39 +0100 Pavel Machek wrote:
> On Tue 2015-02-24 15:33:53, NeilBrown wrote:
> > If it cannot, we will stop pulling more current when voltage drops.
>
> Can you justify it a bit more?
>
> I mean... maybe there's a fuse in the charger? Or
On Mon, 2 Mar 2015 22:09:26 +0100 Pavel Machek wrote:
> On Tue 2015-02-24 15:33:52, NeilBrown wrote:
> > Add a 'continuous' option for usb charging which enabled
> > the "linear" charging mode of the twl4030.
>
> Documentation/ :-).
!
>
>
On Mon, 2 Mar 2015 22:05:26 +0100 Pavel Machek wrote:
> On Tue 2015-02-24 15:33:52, NeilBrown wrote:
> > 'max_current' sysfs attributes are created which allow the
> > max to be set.
> > Whenever a current source changes, the default is restored.
> > This
On Wed, 25 Feb 2015 07:24:43 + Lee Jones wrote:
> On Tue, 24 Feb 2015, NeilBrown wrote:
>
> > The twl4030 usb phy needs to be active while we are using
> > the USB VBUS as a current source for charging.
> > In particular, the usb3v1 regulator must be enabled and th
On Mon, 2 Mar 2015 22:05:18 +0100 Pavel Machek wrote:
> On Tue 2015-02-24 15:33:51, NeilBrown wrote:
> > We will need this calculation in other places, so
> > create functions to map between register value and uA value.
> >
> > Signed-off-by: NeilBrown
>
>
On Mon, 2 Mar 2015 22:03:55 +0100 Pavel Machek wrote:
> On Tue 2015-02-24 14:40:37, NeilBrown wrote:
> > The charger needs to know when a USB gadget has been enumerated
> > and what the agreed maximum current was so that it can adjust
> > charging accordingly.
> >
t limit
> > differently to when it isn't (and so USB is used).
> > So split 'cur' into 'usb_cur' and 'ac_cur' and use accordingly.
> >
> > Now we must review the current setting on any interrupt or USB
> > event which might i
_init twl4030_bci_probe(struct
> > platform_device *pdev)
> > if (!pdata)
> > pdata = twl4030_bci_parse_dt(&pdev->dev);
> >
> > + bci->ichg_eoc = 80100; /* Stop charging when current drops to here */
> > + bci->ichg_lo = 241000; /* low
On Mon, 2 Mar 2015 22:04:44 +0100 Pavel Machek wrote:
> On Tue 2015-02-24 14:40:37, NeilBrown wrote:
> > If an 'A' plug is inserted, ID should be pulled to ground.
> > If a 'B' plug, then ID should be floating.
> >
> > If an Accessory Charger A
If the read fails, which it does sometimes, try again in 50msec.
> >
> > Signed-off-by: NeilBrown
> > ---
> > drivers/phy/phy-twl4030-usb.c | 63
> > +
> > 1 file changed, 63 insertions(+)
> >
> > d
e(twl->dev);
> > pm_runtime_mark_last_busy(twl->dev);
>
> inline function returning (x == OMAP_MUSB_VBUS_VALID || x ==
> OMAP_MUSB_ID_GROUND) would really help readability here.
>
> Thanks,
> Pavel
Good idea. I've done that. The function is called "cable_present()".
Thanks,
NeilBrown
pgpbO85e0cIau.pgp
Description: OpenPGP digital signature
On Mon, 2 Mar 2015 22:03:42 +0100 Pavel Machek wrote:
> On Tue 2015-02-24 15:33:52, NeilBrown wrote:
> > 'off' or 'auto' to
> >
> > /sys/class/power/twl4030_usb/mode
> >
> > will now enable or disable charging from USB port. Normally
y it would be available to all hosts, and you
wouldn't need to revert that patch.
NeilBrown
pgplTpnSDXJsy.pgp
Description: OpenPGP digital signature
On Tue, 3 Mar 2015 14:53:55 -0800 Tony Lindgren wrote:
> * NeilBrown [150223 18:47]:
> > According to section 7.1.2 of
> >
> > http://www.sandisk.com/media/File/OEM/Manuals/SD_SDIO_specsv1.pdf
> >
> > In the case where the interrupt mechanism is used t
if you set each led on a given controller to saturate at different level
and to use the same sound source, then you could get the "graphic equaliser"
effect.
Maybe 'blinking' should have a 'synchronise' setting to that a bunch of LEDs
can be synchonised so you can create a "cylon eye" effect.
i.e. don't focus on the low-level 'what can we provide' but on the high level
"what might users want".
NeilBrown
pgpmXIEFj4kez.pgp
Description: OpenPGP digital signature
r
available? Maybe a wiki page telling me how to set it up?
http://processors.wiki.ti.com/index.php/Linux_Core_DSS_User%27s_Guide
seems to have some useful suggestions, but no mention of Xorg...
Thanks,
NeilBrown
>
> So of course we need to keep omapfb working for the years to come, but
>
On Wed, 25 Feb 2015 12:03:36 +0200 Tomi Valkeinen
wrote:
> On 25/02/15 11:37, NeilBrown wrote:
> >
> > These devices do not need to return to non-graphic console
> > for suspend, so disable that option.
> > This means there is less work to do in the suspend/resume cy
These devices do not need to return to non-graphic console
for suspend, so disable that option.
This means there is less work to do in the suspend/resume cycle,
making it smoother and cheaper.
Signed-off-by: NeilBrown
--
Hi Tomi,
I wonder if you would consider this patch too. It works for
On Wed, 25 Feb 2015 10:49:58 +0200 Tomi Valkeinen
wrote:
> Hi,
>
> On 24/02/15 22:31, NeilBrown wrote:
> > On Tue, 24 Feb 2015 12:40:32 +0200 Tomi Valkeinen
> > wrote:
> >
> >> Hi,
> >>
> >> On 24/02/15 11:37, NeilBrown wrote:
> >&g
'off' or 'auto' to
/sys/class/power/twl4030_usb/mode
will now enable or disable charging from USB port. Normally this is
enabled on 'plug' and disabled on 'unplug'.
Unplug will still disable charging. 'plug' will only enable it if
'a
year or so. In that case there
are automatically charging stops when the cyclist needs a break.
Orignal-by: Andreas Kemnade
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c | 57 ---
1 file changed, 52 insertions(+), 5 deletions(-)
diff -
If the phy has been told what current it can draw, it tells us
and now we use that number.
Note that 'vbus_draw' is in mA, while usb_cur is in uA.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c |5 +
1 file changed, 5 insertions(+)
diff --git a/dri
This allows AC charging to be turned off, much like usb charging.
"continuous" (aka "linear") mode maps to the CVENAC (constant voltage)
feature of the twl4030.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c | 40 +--
If it cannot, we will stop pulling more current when voltage drops.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index 7ad6b4b531d7
So setting a large value will cause the maximum
available to be used - up to the limit of 1.7mA imposed by the
hardware.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c | 54 ++-
1 file changed, 53 insertions(+), 1 deletion(-)
diff --git a/dri
'max_current' sysfs attributes are created which allow the
max to be set.
Whenever a current source changes, the default is restored.
This will be followed by a uevent, so user-space can decide to
update again.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charge
On Tue, 24 Feb 2015 12:40:32 +0200 Tomi Valkeinen
wrote:
> Hi,
>
> On 24/02/15 11:37, NeilBrown wrote:
> >
> >
> > commit 303e4697e762dc92a40405f4e4b8aac02cd0d70b
> > OMAPDSS: rename display-sysfs 'name' entry
> >
> > broke the xor
; is not compatible with i2c or spi.
i2c does register it own 'name' file, but spi does not, hence my
problem - I have an spi display.
So create a special case for i2c: add the name attribute for non-i2c
devices.
Fixes: 303e4697e762dc92a40405f4e4b8aac02cd0d70b
Signed-off-by: NeilBrown
Using devm_power_supply_register allows the unregister to happen
automatically on error or final put.
Signed-off-by: NeilBrown
---
drivers/power/power_supply_core.c | 45 +
include/linux/power_supply.h |4 +++
2 files changed, 49 insertions
Final allocations/registrations are now managed by devres.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c | 23 ++-
1 file changed, 6 insertions(+), 17 deletions(-)
diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index
This simplifies the error paths.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index 4cf5ffbc904a..300dd7a34e80 100644
--- a
o use it as a current source.
So this patch reverts the above commit, and adds the necessary
runtime_pm calls.
Signed-off-by: NeilBrown
---
drivers/mfd/twl-core.c |9 -
drivers/power/twl4030_charger.c | 18 +-
2 files changed, 9 insertions(+), 18 dele
We will need this calculation in other places, so
create functions to map between register value and uA value.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c | 48 ---
1 file changed, 35 insertions(+), 13 deletions(-)
diff --git a/drivers
The usb phy driver already determines when VBUS is available,
so repeating the test in the charger driver is pointless duplication.
On probe, process the last event from the phy, and from then on,
do whatever the phy tells us without double-checking.
Signed-off-by: NeilBrown
---
drivers/power
se current setting are managed
by the driver, but most are left at their default settings.
The current drawn is set to 500mA if the allow_usb module parameter is
set, and to 100mA otherwise.
More fine control will appear in later patches.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charge
d 'ac_cur' and use accordingly.
Now we must review the current setting on any interrupt or USB
event which might indicate that the charger-source has changed.
Signed-off-by: NeilBrown
---
drivers/power/twl4030_charger.c | 30 +-
1 file changed, 25 insertions
y.
Some of this functionality requires patch to phy-twl4030-usb.c which
have been sent separately.
Thanks,
NeilBrown
---
NeilBrown (15):
power_supply core: support use of devres to register/unregister a power
supply.
twl4030_charger: use devm_request_threaded_irq
t
the intention of the code.
So be more direct is taking and dropping references.
If twl->linkstat is VBUS_VALID or ID_GROUND, then hold a
pm_runtime reference, otherwise don't.
Signed-off-by: NeilBrown
---
drivers/phy/phy-twl4030-usb.c | 20 +---
1 file changed, 13 in
The twl4030 phy can measure, with low precision, the
resistance-to-ground of the ID pin.
Add a function to read the value, and export the result
via sysfs.
If the read fails, which it does sometimes, try again in 50msec.
Signed-off-by: NeilBrown
---
drivers/phy/phy-twl4030-usb.c | 63
ng subsystem that it is a charger.
Fortunately, this will treat the Openmoko charger (and
other similar chargers) as a charger.
Signed-off-by: NeilBrown
---
drivers/phy/phy-twl4030-usb.c | 28
1 file changed, 28 insertions(+)
diff --git a/drivers/phy/phy-twl4030-usb
n.
Signed-off-by: NeilBrown
---
drivers/phy/phy-twl4030-usb.c | 27 +--
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
index 97c59074233f..023fe150c7a1 100644
--- a/drivers/phy/phy-twl4030-u
.
There is also support for conveying the max current negotiated by a
host to the charger.
Comments most welcome.
thanks,
NeilBrown
---
NeilBrown (4):
usb: phy: twl4030: make runtime pm more reliable.
usb: phy: twl4030: allow charger to see usb current draw limits.
usb: phy
Every call to sdio_enable_4bit_bus is followed (on success) but a call
to mmc_set_bus_width().
To simplify the code, include those calls directly in
sdio_enable_4bit_bus().
Signed-off-by: NeilBrown
---
drivers/mmc/core/sdio.c | 32
1 file changed, 12
h a 4-bit bus, with
interrupts and runtime power-management enabled, and get around
14Mb/sec throughput (which is the best I've seen).
Signed-off-by: NeilBrown
---
drivers/mmc/host/omap_hsmmc.c | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/driver
to handle 'abort' being set just as the host
is claimed.
This allows extra functionality. If __mmc_claim_host() is called
with an 'abort' pointer which is initialized to '1', it will effect a
non-blocking 'claim'.
Signed-off-by: NeilBrown
---
drivers/mmc/co
t_autosuspend) if
->sdio_narrowed is 2.
Signed-off-by: NeilBrown
---
drivers/mmc/core/core.c | 18 ++
drivers/mmc/core/sdio.c | 42 +-
include/linux/mmc/core.h |2 ++
include/linux/mmc/host.h |2 ++
4 files changed, 59 in
.
Thanks,
NeilBrown
---
NeilBrown (4):
mmc: core: fold mmc_set_bus_width calls into sdio_enable_4bit_bus.
mmc: core: allow non-blocking form of mmc_claim_host
mmc: sdio: support switching to 1-bit before turning off clocks
mmc: omap_hsmmc: switch to 1-bit before stopping clocks
Every call to sdio_enable_4bit_bus is followed (on success) but a call
to mmc_set_bus_width().
To simplify the code, include those calls directly in
sdio_enable_4bit_bus().
Signed-off-by: NeilBrown
---
drivers/mmc/core/sdio.c | 32
1 file changed, 12
1 - 100 of 303 matches
Mail list logo