aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/cyttsp_core.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2021-05-26 16:35:11 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-05-26 16:59:00 -0700
commit6cf3b3abbf0b3b778138c0f8936aa7820af62cfc (patch)
tree0696f0bc1507b71483e0eb9f4ccea36fc33815bc /drivers/input/touchscreen/cyttsp_core.h
parentInput: cyttsp - probe from compatibles (diff)
downloadlinux-dev-6cf3b3abbf0b3b778138c0f8936aa7820af62cfc.tar.xz
linux-dev-6cf3b3abbf0b3b778138c0f8936aa7820af62cfc.zip
Input: cyttsp - obtain regulators
The CYTTSP TMA340 chips have two supplies: VCPIN and VDD for analog and digital voltage respectively. Add some minimal code to obtain and enable these regulators if need be. Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210526230352.1433537-3-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/cyttsp_core.h')
-rw-r--r--drivers/input/touchscreen/cyttsp_core.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/cyttsp_core.h b/drivers/input/touchscreen/cyttsp_core.h
index 9bc4fe7e6ac5..8eba9d8ba74a 100644
--- a/drivers/input/touchscreen/cyttsp_core.h
+++ b/drivers/input/touchscreen/cyttsp_core.h
@@ -23,6 +23,7 @@
#include <linux/types.h>
#include <linux/device.h>
#include <linux/input/cyttsp.h>
+#include <linux/regulator/consumer.h>
#define CY_NUM_RETRY 16 /* max number of retries for read ops */
@@ -122,6 +123,7 @@ struct cyttsp {
enum cyttsp_state state;
bool suspended;
+ struct regulator_bulk_data regulators[2];
struct gpio_desc *reset_gpio;
bool use_hndshk;
u8 act_dist;