[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230703084536.8429-2-mike.looijmans@topic.nl>
Date: Mon, 3 Jul 2023 10:45:36 +0200
From: Mike Looijmans <mike.looijmans@...ic.nl>
To: devicetree@...r.kernel.org, linux-input@...r.kernel.org
CC: Mike Looijmans <mike.looijmans@...ic.nl>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] Input: exc3000 - Support power supply regulators
Add power supply regulator support to the exc3000 devices.
Signed-off-by: Mike Looijmans <mike.looijmans@...ic.nl>
---
drivers/input/touchscreen/exc3000.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/input/touchscreen/exc3000.c b/drivers/input/touchscreen/exc3000.c
index 4af4c1e5d0da..3e50af8a4a2d 100644
--- a/drivers/input/touchscreen/exc3000.c
+++ b/drivers/input/touchscreen/exc3000.c
@@ -18,6 +18,7 @@
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
+#include <linux/regulator/consumer.h>
#include <linux/sizes.h>
#include <linux/timer.h>
#include <asm/unaligned.h>
@@ -360,6 +361,12 @@ static int exc3000_probe(struct i2c_client *client)
if (IS_ERR(data->reset))
return PTR_ERR(data->reset);
+ /* For proper reset sequence, enable power while reset asserted */
+ error = devm_regulator_get_enable_optional(&client->dev, "vdd");
+ if (error && error != -ENODEV)
+ dev_err_probe(&client->dev, error,
+ "failed to request vdd regulator\n");
+
if (data->reset) {
msleep(EXC3000_RESET_MS);
gpiod_set_value_cansleep(data->reset, 0);
--
2.17.1
Met vriendelijke groet / kind regards,
Mike Looijmans
System Expert
TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands
T: +31 (0) 499 33 69 69
E: mike.looijmans@...icproducts.com
W: www.topic.nl
Please consider the environment before printing this e-mail
Powered by blists - more mailing lists