Message ID | 20201203131242.44397-3-stephan@gerhold.net (mailing list archive) |
---|---|
State | Accepted |
Commit | 7002932325ef8efff354a70b93a63dcdbca20d81 |
Headers | show |
Series | [1/3] dt-bindings: Input: tm2-touchkey - convert to yaml | expand |
On Thu, Dec 3, 2020 at 2:13 PM Stephan Gerhold <stephan@gerhold.net> wrote: > The Samsung touchkey controllers are often used with external pull-up > for the interrupt line and the I2C lines, so we might need to enable > a regulator to bring the lines into usable state. Otherwise, this might > cause spurious interrupts and reading from I2C will fail. > > Implement support for a "vddio-supply" that is enabled by the > tm2-touchkey driver so that the regulator gets enabled when needed. > > Cc: Linus Walleij <linus.walleij@linaro.org> > Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
On Thu, Dec 03, 2020 at 02:12:42PM +0100, Stephan Gerhold wrote: > The Samsung touchkey controllers are often used with external pull-up > for the interrupt line and the I2C lines, so we might need to enable > a regulator to bring the lines into usable state. Otherwise, this might > cause spurious interrupts and reading from I2C will fail. > > Implement support for a "vddio-supply" that is enabled by the > tm2-touchkey driver so that the regulator gets enabled when needed. > > Cc: Linus Walleij <linus.walleij@linaro.org> > Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Applied, thank you.
diff --git a/drivers/input/keyboard/tm2-touchkey.c b/drivers/input/keyboard/tm2-touchkey.c index fb078e049413..6218b1c682ef 100644 --- a/drivers/input/keyboard/tm2-touchkey.c +++ b/drivers/input/keyboard/tm2-touchkey.c @@ -48,7 +48,7 @@ struct tm2_touchkey_data { struct input_dev *input_dev; struct led_classdev led_dev; struct regulator *vdd; - struct regulator_bulk_data regulators[2]; + struct regulator_bulk_data regulators[3]; const struct touchkey_variant *variant; u32 keycodes[4]; int num_keycodes; @@ -204,6 +204,7 @@ static int tm2_touchkey_probe(struct i2c_client *client, touchkey->regulators[0].supply = "vcc"; touchkey->regulators[1].supply = "vdd"; + touchkey->regulators[2].supply = "vddio"; error = devm_regulator_bulk_get(&client->dev, ARRAY_SIZE(touchkey->regulators), touchkey->regulators);
The Samsung touchkey controllers are often used with external pull-up for the interrupt line and the I2C lines, so we might need to enable a regulator to bring the lines into usable state. Otherwise, this might cause spurious interrupts and reading from I2C will fail. Implement support for a "vddio-supply" that is enabled by the tm2-touchkey driver so that the regulator gets enabled when needed. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Stephan Gerhold <stephan@gerhold.net> --- drivers/input/keyboard/tm2-touchkey.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)