On Tue, 18 Aug 2015 01:07:58 -0700 Tony Lindgren t...@atomide.com
wrote:
* NeilBrown n...@brown.name [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 n...@brown.name
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 t...@atomide.com
wrote:
* NeilBrown n...@brown.name [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)
{
int status
On Mon, 23 Mar 2015 13:14:50 +0100 jake42
jak...@rommel.stw.uni-erlangen.de wrote:
Hello Neil,
some suggestions:
On 23.03.2015 00:20, NeilBrown wrote:
From: NeilBrown ne...@suse.de
diff --git a/Documentation/ABI/testing/sysfs-class-power-twl4030
b/Documentation/ABI/testing/sysfs
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 n...@brown.name
---
drivers/power/twl4030_charger.c |6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/power
-by: NeilBrown n...@brown.name
---
drivers/power/twl4030_charger.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index fe71c61109f5..045238370d3f 100644
--- a/drivers/power/twl4030_charger.c
+++ b/drivers
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 pa...@ucw.cz
Signed-off-by: NeilBrown n
, 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 pa...@ucw.cz
Signed-off-by: NeilBrown n...@brown.name
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 n...@brown.name
Signed-off-by: NeilBrown n...@brown.name
---
.../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-class-power-twl4030
b
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 pa...@ucw.cz
Signed-off-by: NeilBrown n...@brown.name
---
drivers/power/twl4030_charger.c | 36 +---
1
We will need this calculation in other places, so
create functions to map between register value and uA value.
Acked-by: Pavel Machek pa...@ucw.cz
Signed-off-by: NeilBrown n...@brown.name
---
drivers/power/twl4030_charger.c | 48 ---
1 file changed, 35
it as a current source.
So this patch reverts the above commit, and adds the necessary
runtime_pm calls.
Acked-by: Lee Jones lee.jo...@linaro.org
Signed-off-by: NeilBrown n...@brown.name
---
drivers/mfd/twl-core.c |9 -
drivers/power/twl4030_charger.c | 18
This allows AC charging to be turned off, much like usb charging.
continuous mode is not available though.
Acked-by: Pavel Machek pa...@ucw.cz
Signed-off-by: NeilBrown n...@brown.name
---
.../ABI/testing/sysfs-class-power-twl4030 | 10 ++
drivers/power/twl4030_charger.c
If it cannot, we will stop pulling more current when voltage drops.
Signed-off-by: NeilBrown n...@brown.name
---
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
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 n...@brown.name
---
drivers/power/twl4030_charger.c | 67 ---
1 file changed, 61 insertions(+), 6 deletions(-)
diff --git
.
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 andr...@kemnade.info
Signed-off-by: NeilBrown n...@brown.name
---
.../ABI/testing/sysfs-class-power-twl4030 |9 +++
drivers
On Mon, 1 Jun 2015 19:06:52 +0530 Kishon Vijay Abraham I kis...@ti.com
wrote:
Hi,
On Thursday 16 April 2015 01:33 PM, NeilBrown wrote:
From: NeilBrown ne...@suse.de
The twl4030 phy can measure, with low precision, the
resistance-to-ground of the ID pin.
Add a function to read
On Sat, 18 Apr 2015 00:14:36 +0200 Pavel Machek pa...@ucw.cz wrote:
On Thu 2015-04-16 18:03:04, NeilBrown wrote:
From: NeilBrown ne...@suse.de
This driver device one local attribute: vbus.
Describe that in Documentation/ABI/testing/sysfs-platform/twl4030-usb.
Signed-off
tests.
Signed-off-by: NeilBrown n...@brown.name
---
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/phy/phy
: 96be39ab34b77c6f6f5cd6ae03aac6c6449ee5c4
Signed-off-by: NeilBrown n...@brown.name
---
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
From: NeilBrown ne...@suse.de
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_autosuspend
From: NeilBrown ne...@suse.de
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 pa...@ucw.cz
Signed
From: NeilBrown ne...@suse.de
Signed-off-by: NeilBrown ne...@suse.de
---
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
:
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,
NeilBrown
---
NeilBrown
From: NeilBrown ne...@suse.de
This driver device one local attribute: vbus.
Describe that in Documentation/ABI/testing/sysfs-platform/twl4030-usb.
Signed-off-by: NeilBrown n...@brown.name
---
.../ABI/testing/sysfs-platform-twl4030-usb |8
1 file changed, 8 insertions
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
On Mon, 23 Mar 2015 10:10:18 +0100 Ulf Hansson ulf.hans...@linaro.org wrote:
On 24 February 2015 at 03:42, NeilBrown ne...@suse.de wrote:
@@ -941,8 +947,12 @@ void mmc_release_host(struct mmc_host *host)
WARN_ON(!host-claimed);
- if (host-ops-disable host-claim_cnt == 1
The 'enable' and 'disable' methods are deprecated
according to host.h, and are no longer used. So
discard them.
Signed-off-by: NeilBrown n...@brown.name
---
drivers/mmc/core/core.c |5 -
include/linux/mmc/host.h |6 --
2 files changed, 11 deletions(-)
diff --git a/drivers/mmc
-by: NeilBrown n...@brown.name
---
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
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
On Thu, 26 Mar 2015 08:43:37 +1100 NeilBrown n...@brown.name 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_runtime get/put
From: NeilBrown ne...@suse.de
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 pa...@ucw.cz
Signed-off-by: NeilBrown ne...@suse.de
---
drivers/power/twl4030_charger.c |5
On Wed, 4 Mar 2015 07:54:41 +0100 Dr. H. Nikolaus Schaller
h...@goldelico.com wrote:
Am 04.03.2015 um 07:35 schrieb NeilBrown ne...@suse.de:
On Mon, 2 Mar 2015 22:04:31 +0100 Pavel Machek pa...@ucw.cz wrote:
Hi!
The twl4030 phy can measure, with low precision, the
resistance
From: NeilBrown ne...@suse.de
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
From: NeilBrown ne...@suse.de
Final allocations/registrations are now managed by devres.
Signed-off-by: NeilBrown ne...@suse.de
---
drivers/power/twl4030_charger.c | 32 +---
1 file changed, 9 insertions(+), 23 deletions(-)
diff --git a/drivers/power
From: NeilBrown ne...@suse.de
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
From: NeilBrown ne...@suse.de
We will need this calculation in other places, so
create functions to map between register value and uA value.
Acked-by: Pavel Machek pa...@ucw.cz
Signed-off-by: NeilBrown ne...@suse.de
---
drivers/power/twl4030_charger.c | 48
From: NeilBrown ne...@suse.de
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
From: NeilBrown ne...@suse.de
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 be taken
From: NeilBrown ne...@suse.de
If it cannot, we will stop pulling more current when voltage drops.
Signed-off-by: NeilBrown ne...@suse.de
---
drivers/power/twl4030_charger.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/power/twl4030_charger.c b/drivers/power
On Fri, 6 Mar 2015 23:59:04 +0200 Grazvydas Ignotas nota...@gmail.com wrote:
On Tue, Feb 24, 2015 at 6:33 AM, NeilBrown ne...@suse.de wrote:
This allows AC charging to be turned off, much like usb charging.
continuous (aka linear) mode maps to the CVENAC (constant voltage)
feature
From: NeilBrown ne...@suse.de
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 drops
From: NeilBrown ne...@suse.de
This allows AC charging to be turned off, much like usb charging.
continuous mode is not available though.
Acked-by: Pavel Machek pa...@ucw.cz
Signed-off-by: NeilBrown ne...@suse.de
---
.../ABI/testing/sysfs-class-power-twl4030 | 10 ++
drivers/power
From: NeilBrown ne...@suse.de
'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 pa...@ucw.cz
Signed-off
From: NeilBrown ne...@suse.de
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' into 'usb_cur' and 'ac_cur' and use
From: NeilBrown ne...@suse.de
'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
'auto' if selected.
Acked
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 configured separately.
Thanks,
NeilBrown
From: NeilBrown ne...@suse.de
This simplifies the error paths.
Signed-off-by: NeilBrown ne...@suse.de
---
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
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 cope with
EPROBEDEFER, so I would like it fixed.
NeilBrown
pgp5MxAjPABro.pgp
Description: OpenPGP
On Mon, 2 Mar 2015 22:29:39 +0100 Pavel Machek pa...@ucw.cz 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 maybe it will supply
On Mon, 2 Mar 2015 22:09:26 +0100 Pavel Machek pa...@ucw.cz 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/ :-).
!
Linear charging does a good job with not so
On Wed, 25 Feb 2015 07:24:43 + Lee Jones lee.jo...@linaro.org 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
On Mon, 2 Mar 2015 22:05:26 +0100 Pavel Machek pa...@ucw.cz 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 will be followed by a uevent, so user
On Mon, 2 Mar 2015 22:29:45 +0100 Pavel Machek pa...@ucw.cz 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 choose the correct current voltage
On Mon, 2 Mar 2015 22:05:18 +0100 Pavel Machek pa...@ucw.cz 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 ne...@suse.de
Acked-by: Pavel Machek
readability here.
Thanks,
Pavel
Good idea. I've done that. The function is called cable_present().
Thanks,
NeilBrown
pgpbO85e0cIau.pgp
Description: OpenPGP digital signature
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.
Signed-off-by: NeilBrown ne...@suse.de
@@ -103,7 +104,9 @@ struct twl4030_bci {
/* ichg
On Mon, 2 Mar 2015 22:03:55 +0100 Pavel Machek pa...@ucw.cz 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.
So define a set_power
charging when current drops to here */
+ bci-ichg_lo = 241000; /* low threshold */
Low
+ bci-ichg_hi = 50; /* High threshold */
Acked-by: Pavel Machek pa...@ucw.cz
Thanks again!
NeilBrown
pgp0d5hnlrrkh.pgp
Description: OpenPGP digital signature
On Mon, 2 Mar 2015 22:04:44 +0100 Pavel Machek pa...@ucw.cz 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 Adapter is inserted, then ID will
be neither
On Mon, 2 Mar 2015 22:03:42 +0100 Pavel Machek pa...@ucw.cz 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 this is
enabled on 'plug' and disabled on 'unplug
again in 50msec.
Signed-off-by: NeilBrown ne...@suse.de
---
drivers/phy/phy-twl4030-usb.c | 63
+
1 file changed, 63 insertions(+)
diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
index 023fe150c7a1..759950898df9
On Tue, 3 Mar 2015 14:53:55 -0800 Tony Lindgren t...@atomide.com wrote:
* NeilBrown ne...@suse.de [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 to wake the host
.
NeilBrown
pgplTpnSDXJsy.pgp
Description: OpenPGP digital signature
On Wed, 25 Feb 2015 12:03:36 +0200 Tomi Valkeinen tomi.valkei...@ti.com
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 cycle,
making
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
driver
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
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 n...@brown.name
--
Hi Tomi,
I wonder if you would consider this patch too
On Wed, 25 Feb 2015 10:49:58 +0200 Tomi Valkeinen tomi.valkei...@ti.com
wrote:
Hi,
On 24/02/15 22:31, NeilBrown wrote:
On Tue, 24 Feb 2015 12:40:32 +0200 Tomi Valkeinen tomi.valkei...@ti.com
wrote:
Hi,
On 24/02/15 11:37, NeilBrown wrote:
commit
On Tue, 24 Feb 2015 12:40:32 +0200 Tomi Valkeinen tomi.valkei...@ti.com
wrote:
Hi,
On 24/02/15 11:37, NeilBrown wrote:
commit 303e4697e762dc92a40405f4e4b8aac02cd0d70b
OMAPDSS: rename display-sysfs 'name' entry
broke the xorg X server on my device as it couldn't find
'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 ne...@suse.de
---
drivers/power/twl4030_charger.c | 76
If it cannot, we will stop pulling more current when voltage drops.
Signed-off-by: NeilBrown ne...@suse.de
---
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
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 ne...@suse.de
---
drivers/power/twl4030_charger.c | 54 ++-
1 file changed, 53 insertions(+), 1 deletion(-)
diff --git
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 ne...@suse.de
---
drivers/power/twl4030_charger.c |5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/power
'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
'auto' if selected.
Signed-off-by: NeilBrown ne...@suse.de
. In that case there
are automatically charging stops when the cyclist needs a break.
Orignal-by: Andreas Kemnade andr...@kemnade.info
Signed-off-by: NeilBrown ne...@suse.de
---
drivers/power/twl4030_charger.c | 57 ---
1 file changed, 52 insertions(+), 5 deletions
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 ne...@suse.de
---
drivers/power/twl4030_charger.c | 40 +--
1 file changed
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 ne...@suse.de
--
Hi Tomi,
I wonder if you would
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 n...@brown.name
---
drivers/mmc/core/sdio.c | 32
1 file
-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 n...@brown.name
---
drivers/mmc/host/omap_hsmmc.c | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers
'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 n...@brown.name
---
drivers/mmc/core/core.c |3 ++-
1 file
.
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
-off-by: NeilBrown n...@brown.name
---
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 insertions(+), 5 deletions(-)
diff --git
-by: NeilBrown ne...@suse.de
---
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-usb.c
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 ne...@suse.de
---
drivers/phy/phy-twl4030-usb.c | 20 +---
1 file changed, 13 insertions(+), 7
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 ne...@suse.de
---
drivers/phy/phy-twl4030-usb.c
that it is a charger.
Fortunately, this will treat the Openmoko charger (and
other similar chargers) as a charger.
Signed-off-by: NeilBrown ne...@suse.de
---
drivers/phy/phy-twl4030-usb.c | 28
1 file changed, 28 insertions(+)
diff --git a/drivers/phy/phy-twl4030-usb.c b
.
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
the current setting on any interrupt or USB
event which might indicate that the charger-source has changed.
Signed-off-by: NeilBrown ne...@suse.de
---
drivers/power/twl4030_charger.c | 30 +-
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/drivers/power
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 ne...@suse.de
---
drivers/power
it as a current source.
So this patch reverts the above commit, and adds the necessary
runtime_pm calls.
Signed-off-by: NeilBrown ne...@suse.de
---
drivers/mfd/twl-core.c |9 -
drivers/power/twl4030_charger.c | 18 +-
2 files changed, 9 insertions(+), 18
We will need this calculation in other places, so
create functions to map between register value and uA value.
Signed-off-by: NeilBrown ne...@suse.de
---
drivers/power/twl4030_charger.c | 48 ---
1 file changed, 35 insertions(+), 13 deletions(-)
diff --git
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 ne...@suse.de
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
twl4030_charger: use devres
Final allocations/registrations are now managed by devres.
Signed-off-by: NeilBrown ne...@suse.de
---
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
This simplifies the error paths.
Signed-off-by: NeilBrown ne...@suse.de
---
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
Using devm_power_supply_register allows the unregister to happen
automatically on error or final put.
Signed-off-by: NeilBrown ne...@suse.de
---
drivers/power/power_supply_core.c | 45 +
include/linux/power_supply.h |4 +++
2 files changed, 49
'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 n...@brown.name
---
drivers/mmc/core/core.c |3 ++-
1 file
1 - 100 of 297 matches
Mail list logo