From: Paweł Chmiel <hidden> Date: 2019-01-24 20:28:02
From: Jonathan Bakker <redacted>
pwm_vibrator_stop disables the regulator, but it can be called from
multiple places, even when the regulator is already disabled. Fix this
by using regulator_is_enabled check when starting and stopping device.
Signed-off-by: Jonathan Bakker <redacted>
Signed-off-by: Paweł Chmiel <redacted>
---
Changes from v1:
- Rather than using regulator_is_enabled api, use local flag for
checking if regulator is enabled
---
drivers/input/misc/pwm-vibra.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
From: Paweł Chmiel <hidden> Date: 2019-01-24 20:28:04
This patch fixes order of disable calls in pwm_vibrator_stop.
Currently when starting device, we first enable vcc regulator and then
setup and enable pwm. When stopping, we should do this in oposite order,
so first disable pwm and then disable regulator.
Previously order was the same as in start.
Signed-off-by: Paweł Chmiel <redacted>
---
drivers/input/misc/pwm-vibra.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
On Thu, Jan 24, 2019 at 09:27:31PM +0100, Paweł Chmiel wrote:
From: Jonathan Bakker <redacted>
pwm_vibrator_stop disables the regulator, but it can be called from
multiple places, even when the regulator is already disabled. Fix this
by using regulator_is_enabled check when starting and stopping device.
Signed-off-by: Jonathan Bakker <redacted>
Signed-off-by: Paweł Chmiel <redacted>
Applied, thank you.
quoted hunk
---
Changes from v1:
- Rather than using regulator_is_enabled api, use local flag for
checking if regulator is enabled
---
drivers/input/misc/pwm-vibra.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
On Thu, Jan 24, 2019 at 09:27:32PM +0100, Paweł Chmiel wrote:
This patch fixes order of disable calls in pwm_vibrator_stop.
Currently when starting device, we first enable vcc regulator and then
setup and enable pwm. When stopping, we should do this in oposite order,
so first disable pwm and then disable regulator.
Previously order was the same as in start.
Signed-off-by: Paweł Chmiel <redacted>