kernel-fxtec-pro1x/drivers/input/misc
Stephan Gerhold c694050c96 Input: pm8xxx-vib - fix handling of separate enable register
commit 996d5d5f89a558a3608a46e73ccd1b99f1b1d058 upstream.

Setting the vibrator enable_mask is not implemented correctly:

For regmap_update_bits(map, reg, mask, val) we give in either
regs->enable_mask or 0 (= no-op) as mask and "val" as value.
But "val" actually refers to the vibrator voltage control register,
which has nothing to do with the enable_mask.

So we usually end up doing nothing when we really wanted
to enable the vibrator.

We want to set or clear the enable_mask (to enable/disable the vibrator).
Therefore, change the call to always modify the enable_mask
and set the bits only if we want to enable the vibrator.

Fixes: d4c7c5c96c ("Input: pm8xxx-vib - handle separate enable register")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200114183442.45720-1-stephan@gerhold.net
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-29 16:43:20 +01:00
..
88pm80x_onkey.c
88pm860x_onkey.c
ab8500-ponkey.c
ad714x-i2c.c
ad714x-spi.c
ad714x.c
ad714x.h
adxl34x-i2c.c
adxl34x-spi.c
adxl34x.c
adxl34x.h
apanel.c
arizona-haptics.c
ati_remote2.c
atlas_btns.c
atmel_captouch.c
axp20x-pek.c
bma150.c
cm109.c
cma3000_d0x.c
cma3000_d0x.h
cma3000_d0x_i2c.c
cobalt_btns.c
cpcap-pwrbutton.c
da9052_onkey.c
da9055_onkey.c
da9063_onkey.c
dm355evm_keys.c
drv260x.c
drv2665.c
drv2667.c
e3x0-button.c
gp2ap002a00f.c
gpio-beeper.c
gpio_decoder.c
hisi_powerkey.c
hp_sdc_rtc.c
ideapad_slidebar.c
ims-pcu.c
ixp4xx-beeper.c
Kconfig
keyspan_remote.c
kxtj9.c
m68kspkr.c
Makefile
max8925_onkey.c
max8997_haptic.c
max77693-haptic.c
mc13783-pwrbutton.c
mma8450.c
palmas-pwrbutton.c
pcap_keys.c
pcf8574_keypad.c
pcf50633-input.c
pcspkr.c
pm8xxx-vibrator.c Input: pm8xxx-vib - fix handling of separate enable register 2020-01-29 16:43:20 +01:00
pm8941-pwrkey.c
pmic8xxx-pwrkey.c
powermate.c
pwm-beeper.c
pwm-vibra.c
rave-sp-pwrbutton.c
rb532_button.c
regulator-haptic.c
retu-pwrbutton.c
rk805-pwrkey.c
rotary_encoder.c
sc27xx-vibra.c
sgi_btns.c
sirfsoc-onkey.c
soc_button_array.c
sparcspkr.c
tps65218-pwrbutton.c
twl4030-pwrbutton.c
twl4030-vibra.c
twl6040-vibra.c
uinput.c
wistron_btns.c
wm831x-on.c
xen-kbdfront.c
yealink.c
yealink.h