Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mike Looijmans and committed by
Dmitry Torokhov
0d384e59 ff785255

+7
+7
drivers/input/touchscreen/exc3000.c
··· 18 18 #include <linux/interrupt.h> 19 19 #include <linux/module.h> 20 20 #include <linux/of.h> 21 + #include <linux/regulator/consumer.h> 21 22 #include <linux/sizes.h> 22 23 #include <linux/timer.h> 23 24 #include <asm/unaligned.h> ··· 360 359 GPIOD_OUT_HIGH); 361 360 if (IS_ERR(data->reset)) 362 361 return PTR_ERR(data->reset); 362 + 363 + /* For proper reset sequence, enable power while reset asserted */ 364 + error = devm_regulator_get_enable(&client->dev, "vdd"); 365 + if (error && error != -ENODEV) 366 + return dev_err_probe(&client->dev, error, 367 + "failed to request vdd regulator\n"); 363 368 364 369 if (data->reset) { 365 370 msleep(EXC3000_RESET_MS);