Input: mms114 - add extra compatible for mms345l
authorStephan Gerhold <stephan@gerhold.net>
Sat, 25 Apr 2020 20:06:31 +0000 (13:06 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 25 Apr 2020 20:09:55 +0000 (13:09 -0700)
commit7842087b0196d674ed877d768de8f2a34d7fdc53
tree6712e70e5d14beb7eb635da436c92aafd00ab0d6
parent86d1ee00c86dd8472e18d76c6895e1e94a34d919
Input: mms114 - add extra compatible for mms345l

MMS345L is another first generation touch screen from Melfas,
which uses mostly the same registers as MMS152.

However, there is some garbage printed during initialization.
Apparently MMS345L does not have the MMS152_COMPAT_GROUP register
that is read+printed during initialization.

  TSP FW Rev: bootloader 0x6 / core 0x26 / config 0x26, Compat group: \x06

On earlier kernel versions the compat group was actually printed as
an ASCII control character, seems like it gets escaped now.

But we probably shouldn't print something from a random register.

Add a separate "melfas,mms345l" compatible that avoids reading
from the MMS152_COMPAT_GROUP register. This might also help in case
there is some other device-specific quirk in the future.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Andi Shyti <andi@etezian.org>
Link: https://lore.kernel.org/r/20200423102431.2715-1-stephan@gerhold.net
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/mms114.c