diff mbox series

[13/13] Input: adp5589-keys: add regulator support

Message ID 20241001-b4-dev-adp5589-fw-conversion-v1-13-fca0149dfc47@analog.com (mailing list archive)
State New
Headers show
Series Input: adp5589: refactor and platform_data removal | expand

Commit Message

Nuno Sa Oct. 1, 2024, 1:41 p.m. UTC
Support feeding VCC through a regulator.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
---
 drivers/input/keyboard/adp5589-keys.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c
index a3d51e36132b73ef07715f256b82e428c81bd6f6..f3a0ea1bec4a7a8ed0a5a96211decc5d86728b71 100644
--- a/drivers/input/keyboard/adp5589-keys.c
+++ b/drivers/input/keyboard/adp5589-keys.c
@@ -1445,6 +1445,10 @@  static int adp5589_probe(struct i2c_client *client)
 	if (!kpad->info)
 		return -ENODEV;
 
+	error = devm_regulator_get_enable(&client->dev, "vcc");
+	if (error)
+		return error;
+
 	error = devm_add_action_or_reset(&client->dev, adp5589_clear_config,
 					 kpad);
 	if (error)