1
0
Fork 0
Commit Graph

11 Commits (f426cef3bc58806284e0fee55d29262b10279f9c)

Author SHA1 Message Date
Linus Torvalds e665faa424 1. New drivers:
- Marvell 88pm860x charger and battery drivers;
    - Texas Instruments LP8788 charger driver;
 2. Two new power supply properties: whether a battery is authentic, and
    chargers' maximal currents and voltages;
 3. A lot of TI LP8727 Charger cleanups;
 4. New features for Charger Manager, mainly now we can disable specific
    regulators;
 5. Random fixes and cleanups for other drivers.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJQbjMFAAoJEGgI9fZJve1bR6gP/2Ri0etCU5zQMmbsFv5wxwHT
 BNgqFYoLmtxAJm7afM/9Qo2GxSam/Gi6vW6jfYxVOEDt9hJ5zaaJBxM4XmKEBShR
 PYlV9u45jGUCIHJXoi8DTND9Swz0VfVve9UtK5fVdXr73fYFemP8U86alI1MBL5Q
 8U3F0V8rObjGKWZrzN4BreB8bfbZYQCUafpoGS1ids3Uwm38d4tDb/jx8guSV24D
 LEhXy9unV9NdPExRn1FWFAgqjtgnnBv5SmpCBd6VwKNmpOgVB+H0CjOaOPzMgd+0
 X6dpJQtbjGZOhHhkcAoWsXYgxS8WMtTqlSjHSgswJJ/fdjv8YJoT7ncyu5wItY1x
 cN5NRBKVpnHv+fkQDE4xVWzEOH68lK8RoGksay0gvTJj3MQWwOpOANGHbsnMG6rj
 GBzQ7pyMbDTK7n1oynvmSskF4BdvYHM+Ns7vPUOAzoduKrOnhPVDpk3rLSFZxQNO
 RoqXbnNYqg4qROB9z8Drs95WD59fKjNTlfFr1moR2sr4wncEJiFduMz4dCOs7nq7
 ahZxd95a2Bb6LbcN244+loGBXmx6KD6BurrDc3yTM3hl+oVx+MecVv9uoKvKlz4y
 YPh9XrdCSfj9Ms7TOqW8XPDl/ZREswaCIer7x8XsL+K42fYkPKlrO3OUMHIbh+3e
 rfkFPAR55bLcmtiaahp3
 =LkdH
 -----END PGP SIGNATURE-----

Merge tag 'for-v3.7' of git://git.infradead.org/battery-2.6

Pull battery updates from Anton Vorontsov:
 "1. New drivers:
     - Marvell 88pm860x charger and battery drivers;
     - Texas Instruments LP8788 charger driver;
  2. Two new power supply properties: whether a battery is authentic,
     and chargers' maximal currents and voltages;
  3. A lot of TI LP8727 Charger cleanups;
  4. New features for Charger Manager, mainly now we can disable
     specific regulators;
  5. Random fixes and cleanups for other drivers."

Fix up trivial conflicts in <linux/mfd/88pm860x.h>

* tag 'for-v3.7' of git://git.infradead.org/battery-2.6: (52 commits)
  pda_power: Remove ac_draw_failed goto and label
  charger-manager: Add support sysfs entry for charger
  charger-manager: Support limit of maximum possible
  charger-manager: Check fully charged state of battery periodically
  lp8727_charger: More pure cosmetic improvements
  lp8727_charger: Fix checkpatch warning
  lp8727_charger: Add description in the private data
  lp8727_charger: Fix a typo - chg_parm to chg_param
  lp8727_charger: Make some cosmetic changes in lp8727_delayed_func()
  lp8727_charger: Clean up lp8727_charger_changed()
  lp8727_charger: Return if the battery is discharging
  lp8727_charger: Make lp8727_charger_get_propery() simpler
  lp8727_charger: Make lp8727_ctrl_switch() inline
  lp8727_charger: Make lp8727_init_device() shorter
  lp8727_charger: Clean up lp8727_is_charger_attached()
  lp8727_charger: Use specific definition
  lp8727_charger: Clean up lp8727 definitions
  lp8727_charger: Use the definition rather than enum
  lp8727_charger: Fix code for getting battery temp
  lp8727_charger: Clear interrrupts at inital time
  ...
2012-10-07 17:29:24 +09:00
Julia Lawall fc2bc0c29a ab8500_charger: Fix error return code
Initialize return variable before exiting on an error path.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-08-22 18:47:25 -07:00
Tejun Heo 203b42f731 workqueue: make deferrable delayed_work initializer names consistent
Initalizers for deferrable delayed_work are confused.

* __DEFERRED_WORK_INITIALIZER()
* DECLARE_DEFERRED_WORK()
* INIT_DELAYED_WORK_DEFERRABLE()

Rename them to

* __DEFERRABLE_WORK_INITIALIZER()
* DECLARE_DEFERRABLE_WORK()
* INIT_DEFERRABLE_WORK()

This patch doesn't cause any functional changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
2012-08-21 13:18:23 -07:00
Kishon Vijay Abraham I ded017ee6c usb: phy: fix return value check of usb_get_phy
usb_get_phy will return -ENODEV if it's not able to find the phy. Hence
fixed all the callers of usb_get_phy to check for this error condition
instead of relying on a non-zero value as success condition.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-07-02 10:40:49 +03:00
Kishon Vijay Abraham I 662dca54ca usb: otg: support for multiple transceivers by a single controller
Add a linked list for keeping multiple PHY instances with different
types so that we can have separate USB2 and USB3 PHYs on one single
board. _get_phy_ has been changed so that the controller gets
the transceiver by type. _remove_phy_ has been added to let the phy
be removed from the phy list.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-25 14:05:35 +03:00
Kishon Vijay Abraham I 721002ec1d usb: otg: utils: rename function name in OTG utils
_transceiver() in otg.c is replaced with _phy. usb_set_transceiver is
replaced with usb_add_phy to make it similar to other usb standard
function names like usb_add_hcd.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-25 14:04:26 +03:00
Lee Jones 2aac3de19b ab8500: Clean up probe routines
These patches clean up some ugliness and brings the variable
initialisation formatting more into line with other drivers.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-05-05 04:55:50 -07:00
Linus Walleij cc28e17100 ab8500_charger: Harden platform data check
If no platform data at all is supplied the driver crashes,
extend the checks to be more careful so we can compile in the
driver and boot also without platform data present.

Acked-by: Arun Murthy <arun.murthy@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-05-05 03:58:04 -07:00
Anton Vorontsov 64eb9b02bf ab8500: Turn unneeded global symbols into local ones
The patch fixes the following sparse warning:

drivers/power/ab8500_charger.c:1619:6: warning: symbol 'ab8500_charger_detect_usb_type_work' was not declared. Should it be static?
drivers/power/abx500_chargalg.c:1709:24: warning: symbol 'abx500_chargalg_sysfs_ops' was not declared. Should it be static?
drivers/power/ab8500_fg.c:2328:24: warning: symbol 'ab8500_fg_sysfs_ops' was not declared. Should it be static?

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26 20:41:14 +04:00
Anton Vorontsov efd71c89a4 ab8500_charger: Convert to the new USB OTG calls
This patch fixes the following build errors:

ab8500_charger.c: In function 'ab8500_charger_remove':
ab8500_charger.c:2519:2: error: implicit declaration of function 'otg_unregister_notifier' [-Werror=implicit-function-declaration]
ab8500_charger.c:2520:2: error: implicit declaration of function 'otg_put_transceiver' [-Werror=implicit-function-declaration]
ab8500_charger.c: In function 'ab8500_charger_probe':
ab8500_charger.c:2688:2: error: implicit declaration of function 'otg_get_transceiver' [-Werror=implicit-function-declaration]
ab8500_charger.c:2688:10: warning: assignment makes pointer from integer without a cast [enabled by default]
ab8500_charger.c:2695:2: error: implicit declaration of function 'otg_register_notifier' [-Werror=implicit-function-declaration]

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26 20:41:07 +04:00
Arun Murthy 84edbeeab6 ab8500-charger: AB8500 charger driver
This driver is responsible for detecting the ac/usb plugin and also includes
function to enable ac/usb charging and re-kick the watchdog.
It registers with the power supply class and provides information to the user
space. The information include status of ac/usb charger device.
This information in turn will be used by the abx500 charging algorithm driver
to enable/disable and monitor charging.

Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26 20:41:04 +04:00