Skip to content
Commit 2b486d23 authored by Fenglin Wu's avatar Fenglin Wu Committed by Greg Kroah-Hartman
Browse files

Input: pm8xxx-vibrator - correct VIB_MAX_LEVELS calculation

[ Upstream commit 48c0687a ]

The output voltage is inclusive hence the max level calculation is
off-by-one-step. Correct it.

iWhile we are at it also add a define for the step size instead of
using the magic value.

Fixes: 11205bb6

 ("Input: add support for pm8xxx based vibrator driver")
Signed-off-by: default avatarFenglin Wu <quic_fenglinw@quicinc.com>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240412-pm8xxx-vibrator-new-design-v10-1-0ec0ad133866@quicinc.com
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 33d148cd
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