Skip to content

Commit 0d384e5

Browse files
MikeLooijmansdtor
authored andcommitted
Input: exc3000 - support power supply regulators
Add power supply regulator support to the exc3000 devices. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Link: https://lore.kernel.org/r/20230707131042.10795-2-mike.looijmans@topic.nl Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent ff78525 commit 0d384e5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/input/touchscreen/exc3000.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/interrupt.h>
1919
#include <linux/module.h>
2020
#include <linux/of.h>
21+
#include <linux/regulator/consumer.h>
2122
#include <linux/sizes.h>
2223
#include <linux/timer.h>
2324
#include <asm/unaligned.h>
@@ -360,6 +361,12 @@ static int exc3000_probe(struct i2c_client *client)
360361
if (IS_ERR(data->reset))
361362
return PTR_ERR(data->reset);
362363

364+
/* For proper reset sequence, enable power while reset asserted */
365+
error = devm_regulator_get_enable(&client->dev, "vdd");
366+
if (error && error != -ENODEV)
367+
return dev_err_probe(&client->dev, error,
368+
"failed to request vdd regulator\n");
369+
363370
if (data->reset) {
364371
msleep(EXC3000_RESET_MS);
365372
gpiod_set_value_cansleep(data->reset, 0);

0 commit comments

Comments
 (0)