Skip to content
Commit 996d5d5f authored by Stephan Gerhold's avatar Stephan Gerhold Committed by Dmitry Torokhov
Browse files

Input: pm8xxx-vib - fix handling of separate enable register



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: d4c7c5c9 ("Input: pm8xxx-vib - handle separate enable register")
Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200114183442.45720-1-stephan@gerhold.net


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent ba9a103f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment