msm: qpnp-haptic: Force disable haptics during shutdown
Force disable haptics during shutdown to avoid the device from vibrating during TWM entry. Change-Id: I6bfdf4d9a634dec1aa56a1fdc5553cefe4a94a73 Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org> Signed-off-by: Shilpa Suresh <sbsure@codeaurora.org>
This commit is contained in:
parent
4267c5bc84
commit
244c45dfec
1 changed files with 11 additions and 0 deletions
|
@ -2519,6 +2519,16 @@ static int qpnp_haptics_remove(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void qpnp_haptics_shutdown(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
struct hap_chip *chip = dev_get_drvdata(&pdev->dev);
|
||||||
|
|
||||||
|
cancel_work_sync(&chip->haptics_work);
|
||||||
|
|
||||||
|
/* disable haptics */
|
||||||
|
qpnp_haptics_mod_enable(chip, false);
|
||||||
|
}
|
||||||
|
|
||||||
static const struct dev_pm_ops qpnp_haptics_pm_ops = {
|
static const struct dev_pm_ops qpnp_haptics_pm_ops = {
|
||||||
.suspend = qpnp_haptics_suspend,
|
.suspend = qpnp_haptics_suspend,
|
||||||
};
|
};
|
||||||
|
@ -2536,6 +2546,7 @@ static struct platform_driver qpnp_haptics_driver = {
|
||||||
},
|
},
|
||||||
.probe = qpnp_haptics_probe,
|
.probe = qpnp_haptics_probe,
|
||||||
.remove = qpnp_haptics_remove,
|
.remove = qpnp_haptics_remove,
|
||||||
|
.shutdown = qpnp_haptics_shutdown,
|
||||||
};
|
};
|
||||||
module_platform_driver(qpnp_haptics_driver);
|
module_platform_driver(qpnp_haptics_driver);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue