]> git.baikalelectronics.ru Git - kernel.git/commit
Input: zinitix - handle proper supply names
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 9 Jan 2022 07:23:10 +0000 (23:23 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 9 Jan 2022 07:27:05 +0000 (23:27 -0800)
commit41b5e4cf43715d9a709cde7f74454cb527739b72
tree5eb2c60df3cd77371b20f937b847894c783a8ced
parentaf76fd2f31aa4ec02fdf2f0f920087a18b5e5ea0
Input: zinitix - handle proper supply names

The supply names of the Zinitix touchscreen were a bit confused, the new
bindings rectifies this.

To deal with old and new devicetrees, first check if we have "vddo" and in
case that exists assume the old supply names. Else go and look for the new
ones.

We cannot just get the regulators since we would get an OK and a dummy
regulator: we need to check explicitly for the old supply name.

Use struct device *dev as a local variable instead of the I2C client since
the device is what we are actually obtaining the resources from.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[Slightly changed the legacy regulator detection]
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
Link: https://lore.kernel.org/r/20220106072840.36851-4-nikita@trvn.ru
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/zinitix.c