summaryrefslogtreecommitdiff
path: root/drivers/extcon
diff options
context:
space:
mode:
authorMallikarjun Kasoju <mkasoju@nvidia.com>2013-04-10 20:14:11 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 13:09:52 -0700
commitc73058ee5095521723910482b2eb9077a9dfa5ba (patch)
treed94a52cf12da13e27005e99c6b7129bc11dec357 /drivers/extcon
parent54e612699a976e15ce95f49a29996f2669938e3b (diff)
extcon: max77665: Update cable status in resume
Update cable status in resume bug 1266947 Change-Id: Iea0ee17091beb24143cfaba67cb4ea9f3e9f2937 Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com> Reviewed-on: http://git-master/r/218254 (cherry picked from commit 8056cf8be7552cfc5ca087b076b887f0dfe7dd76) Reviewed-on: http://git-master/r/222401 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-max77665.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-max77665.c b/drivers/extcon/extcon-max77665.c
index b7a32bd701f6..e15971c56832 100644
--- a/drivers/extcon/extcon-max77665.c
+++ b/drivers/extcon/extcon-max77665.c
@@ -228,10 +228,30 @@ static int __devexit max77665_muic_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_PM_SLEEP
+static int max77665_extcon_suspend(struct device *pdev)
+{
+ return 0;
+}
+
+static int max77665_extcon_resume(struct device *pdev)
+{
+ struct max77665_muic *muic = dev_get_drvdata(pdev);
+
+ return max77660_id_cable_update(muic);
+};
+#endif
+
+static const struct dev_pm_ops max77665_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(max77665_extcon_suspend,
+ max77665_extcon_resume)
+};
+
static struct platform_driver max77665_muic_driver = {
.driver = {
.name = DEV_NAME,
.owner = THIS_MODULE,
+ .pm = &max77665_pm_ops,
},
.probe = max77665_muic_probe,
.remove = __devexit_p(max77665_muic_remove),