BZ: 37067
Adding a .shutdown function, which disables the OTG.
This is required for the case where we shutdown and OTG is removed.
Unless OTG is disabled during shutdown, OTG-Enable bit in Command Register A
is not cleared in the next boot.
Change-Id: I9110659253d6650ced0cf85af3ff9ff1689b3dfe
Signed-off-by: madhu <madhukumarx.kallappa.manjanna@intel.com>
Reviewed-on: http://android.intel.com:8080/51150
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
return 0;
}
+static int smb347_shutdown(struct i2c_client *client)
+{
+ struct smb347_charger *smb = i2c_get_clientdata(client);
+
+ /* Disable OTG during shutdown */
+ if (smb)
+ smb347_otg_drive_vbus(smb, false);
+
+ return 0;
+}
+
static const struct i2c_device_id smb347_id[] = {
{ "smb347", 0},
};
},
.probe = smb347_probe,
.remove = __devexit_p(smb347_remove),
+ .shutdown = smb347_shutdown,
.id_table = smb347_id,
};