Skip to content

Enhance twl4030_charger functionality. - V2

NeilBrown linux-api linux-omap lkml 1 version Applied

Status from this message: I queued this with Pavel's ACK after a rebase to current master:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 9 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/14twl4030_charger: use devm_request_threaded_irqdrivers/power/twl4030_charger.c+6 -121 reply
2/14twl4030_charger: use devres for power_supply_register and kzalloc.drivers/power/twl4030_charger.c+9 -232 replies
3/14twl4030_charger: use runtime_pm to keep usb phy active while charging.drivers/mfd/twl-core.c drivers/power/twl4030_charger.c+9 -180 replies
4/14twl4030_charger: trust phy to determine when USB power is available.drivers/power/twl4030_charger.c+6 -270 replies
5/14twl4030_charger: split uA calculation into a function.drivers/power/twl4030_charger.c+35 -130 replies
6/14twl4030_charger: allow fine control of charger current.drivers/power/twl4030_charger.c+160 -80 replies
7/14twl4030_charger: distinguish between USB current and 'AC' currentdrivers/power/twl4030_charger.c+29 -70 replies
8/14twl4030_charger: allow max_current to be managed via sysfs.Documentation/ABI/testing/sysfs-class-power-twl4030 drivers/power/twl4030_charger.c+87 -02 replies
9/14twl4030_charger: only draw USB current as negotiated with host.drivers/power/twl4030_charger.c+5 -00 replies
10/14twl4030_charger: enable manual enable/disable of usb charging.Documentation/ABI/testing/sysfs-class-power-twl4030 drivers/power/twl4030_charger.c+70 -00 replies
11/14twl4030_charger: add software controlled linear charging mode.Documentation/ABI/testing/sysfs-class-power-twl4030 drivers/power/twl4030_charger.c+59 -50 replies
12/14twl4030_charger: add ac/mode to match usb/modeDocumentation/ABI/testing/sysfs-class-power-twl4030 drivers/power/twl4030_charger.c+37 -80 replies
13/14twl4030_charger: Increase current carefully while watching voltage.drivers/power/twl4030_charger.c+60 -83 replies
14/14twl4030_charger: assume a 'charger' can supply maximum current.drivers/power/twl4030_charger.c+3 -10 replies

Reviews trailers per patch

8 of 14 patches have a Reviewed-by or Acked-by.

PatchPavel MachekLee JonesAndreas Kemnade
1/14
2/14
3/14A-b
4/14
5/14A-b
6/14A-b
7/14A-b
8/14A-b
9/14A-b
10/14A-b
11/14Orignal-by
12/14A-b
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 00/14] Enhance twl4030_charger functionality. - V2

Hi Sebastian,
here is V2 of my patches to improve the twl4030 charger. They include improved documentation and removal of changes to the CVENAC bit which I didn't properly understand.

One patch needs to make a change in drivers/mfd, and that has been acked by Lee Jones.

Summary from before:
These patches make a number of improvements to twl4030_charger.

Some are just internal cleanups (e.g. use of devres). Others allow better control of charging through both manual and automatic means.

- the maximum current can be configured via sysfs.
- the charger will only draw that current 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

---

NeilBrown (14):
twl4030_charger: use devm_request_threaded_irq
twl4030_charger: use devres for power_supply_register and kzalloc.
twl4030_charger: use runtime_pm to keep usb phy active while charging.
twl4030_charger: trust phy to determine when USB power is available.
twl4030_charger: split uA calculation into a function.
twl4030_charger: allow fine control of charger current.
twl4030_charger: distinguish between USB current and 'AC' current
twl4030_charger: allow max_current to be managed via sysfs.
twl4030_charger: only draw USB current as negotiated with host.
twl4030_charger: enable manual enable/disable of usb charging.
twl4030_charger: add software controlled linear charging mode.
twl4030_charger: add ac/mode to match usb/mode
twl4030_charger: Increase current carefully while watching voltage.
twl4030_charger: assume a 'charger' can supply maximum current.

 .../ABI/testing/sysfs-class-power-twl4030          |   45 ++
 drivers/mfd/twl-core.c                             |    9 
 drivers/power/twl4030_charger.c                    |  573 +++++++++++++++++---
 3 files changed, 536 insertions(+), 91 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-class-power-twl4030

--
Signature