Re: [PATCH v2] Input: pmic8xxx-pwrkey - Support shutdown

2015-07-13 Thread Stephen Boyd
On 07/13/2015 05:58 PM, Stephen Boyd wrote: On 07/13/2015 05:46 PM, Dmitry Torokhov wrote: On Mon, Jul 13, 2015 at 05:34:57PM -0700, Stephen Boyd wrote: On 07/13/2015 05:25 PM, Dmitry Torokhov wrote: + +static const struct of_device_id pm8xxx_pwr_key_id_table[] = { +{ .compatible = "qcom,p

Re: [PATCH v2] Input: pmic8xxx-pwrkey - Support shutdown

2015-07-13 Thread Stephen Boyd
On 07/13/2015 05:46 PM, Dmitry Torokhov wrote: On Mon, Jul 13, 2015 at 05:34:57PM -0700, Stephen Boyd wrote: On 07/13/2015 05:25 PM, Dmitry Torokhov wrote: + +static const struct of_device_id pm8xxx_pwr_key_id_table[] = { + { .compatible = "qcom,pm8058-pwrkey", .data = &pm8058_pwrkey_shut

Re: [PATCH v2] Input: pmic8xxx-pwrkey - Support shutdown

2015-07-13 Thread Dmitry Torokhov
On Mon, Jul 13, 2015 at 05:34:57PM -0700, Stephen Boyd wrote: > On 07/13/2015 05:25 PM, Dmitry Torokhov wrote: > > >>@@ -76,6 +131,220 @@ static int __maybe_unused > >>pmic8xxx_pwrkey_resume(struct device *dev) > >> static SIMPLE_DEV_PM_OPS(pm8xxx_pwr_key_pm_ops, > >>pmic8xxx_pwrkey_

Re: [PATCH v2] Input: pmic8xxx-pwrkey - Support shutdown

2015-07-13 Thread Stephen Boyd
On 07/13/2015 05:25 PM, Dmitry Torokhov wrote: @@ -76,6 +131,220 @@ static int __maybe_unused pmic8xxx_pwrkey_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(pm8xxx_pwr_key_pm_ops, pmic8xxx_pwrkey_suspend, pmic8xxx_pwrkey_resume); +static void pmic8xxx_pwrkey_shutdown(s

Re: [PATCH v2] Input: pmic8xxx-pwrkey - Support shutdown

2015-07-13 Thread Dmitry Torokhov
Hi Stephen, On Mon, Jul 13, 2015 at 04:30:34PM -0700, Stephen Boyd wrote: > On pm8xxx PMICs, shutdown and restart are signaled to the PMIC > via a pin called PS_HOLD. When this pin goes low, the PMIC > performs a configurable power sequence. Add a .shutdown hook so > that we can properly configure

Re: [PATCH v2] Input: pmic8xxx-pwrkey - Support shutdown

2015-07-13 Thread Bjorn Andersson
On Mon 13 Jul 16:30 PDT 2015, Stephen Boyd wrote: > On pm8xxx PMICs, shutdown and restart are signaled to the PMIC > via a pin called PS_HOLD. When this pin goes low, the PMIC > performs a configurable power sequence. Add a .shutdown hook so > that we can properly configure this power sequence for

[PATCH v2] Input: pmic8xxx-pwrkey - Support shutdown

2015-07-13 Thread Stephen Boyd
On pm8xxx PMICs, shutdown and restart are signaled to the PMIC via a pin called PS_HOLD. When this pin goes low, the PMIC performs a configurable power sequence. Add a .shutdown hook so that we can properly configure this power sequence for shutdown or restart depending on the system state. Cc: Bj