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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Support feeding VCC through a regulator.

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

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)

-- 
2.46.1





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux