linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephan Gerhold <stephan@gerhold.net>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, Stephan Gerhold <stephan@gerhold.net>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 3/3] Input: tm2-touchkey - add vddio regulator
Date: Thu,  3 Dec 2020 14:12:42 +0100	[thread overview]
Message-ID: <20201203131242.44397-3-stephan@gerhold.net> (raw)
In-Reply-To: <20201203131242.44397-1-stephan@gerhold.net>

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(-)

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);
-- 
2.29.2


  parent reply	other threads:[~2020-12-03 13:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 13:12 [PATCH 1/3] dt-bindings: Input: tm2-touchkey - convert to yaml Stephan Gerhold
2020-12-03 13:12 ` [PATCH 2/3] dt-bindings: Input: tm2-touchkey - document vddio-supply Stephan Gerhold
2020-12-05 23:09   ` Linus Walleij
2020-12-06 12:28     ` Stephan Gerhold
2020-12-06 15:10       ` Linus Walleij
2020-12-09 20:12   ` Rob Herring
2020-12-10  3:50   ` Dmitry Torokhov
2020-12-03 13:12 ` Stephan Gerhold [this message]
2020-12-05 23:10   ` [PATCH 3/3] Input: tm2-touchkey - add vddio regulator Linus Walleij
2020-12-10  3:51   ` Dmitry Torokhov
2020-12-05 23:08 ` [PATCH 1/3] dt-bindings: Input: tm2-touchkey - convert to yaml Linus Walleij
2020-12-09 20:12 ` Rob Herring
2020-12-10  3:50 ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201203131242.44397-3-stephan@gerhold.net \
    --to=stephan@gerhold.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --subject='Re: [PATCH 3/3] Input: tm2-touchkey - add vddio regulator' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).