diff options
author | Syed Rafiuddin <srafiuddin@nvidia.com> | 2012-04-19 10:26:41 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-04-19 16:25:36 -0700 |
commit | ef2926c220e3ed62190ba6c31d1cd55432167ded (patch) | |
tree | d35670efb293129c2b497d4a37e95c18d7cc7cc2 | |
parent | c5f2f507f0c26dffa94cb6ec5299c2d4da059214 (diff) |
usb: otg: tegra: callback for otg plug/un-plug notificaton
Addition of callback function to nofity the plug and
un-plug of OTG cable to charger driver.
Change-Id: I6b16d051cafe0799cffe8a05d1510da27e841f8b
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/97514
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Chandler Zhang <chazhang@nvidia.com>
Tested-by: Chandler Zhang <chazhang@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r-- | drivers/usb/otg/tegra-otg.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/otg/tegra-otg.c b/drivers/usb/otg/tegra-otg.c index 7d93d751df41..35dea5a8ca3c 100644 --- a/drivers/usb/otg/tegra-otg.c +++ b/drivers/usb/otg/tegra-otg.c @@ -229,6 +229,9 @@ static void tegra_change_otg_state(struct tegra_otg_data *tegra, dev_info(tegra->otg.dev, "%s --> %s\n", tegra_state_name(from), tegra_state_name(to)); + if (tegra->charger_cb) + tegra->charger_cb(to, from, tegra->charger_cb_data); + if (from == OTG_STATE_A_SUSPEND) { if (to == OTG_STATE_B_PERIPHERAL && otg->gadget) usb_gadget_vbus_connect(otg->gadget); |