Commit Graph

7 Commits (b8a3efa3a363720687d21228d6b23b988a223bbb)

Author SHA1 Message Date
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