Commit 0d384e59 authored by Mike Looijmans's avatar Mike Looijmans Committed by Dmitry Torokhov

Input: exc3000 - support power supply regulators

Add power supply regulator support to the exc3000 devices.
Signed-off-by: default avatarMike Looijmans <mike.looijmans@topic.nl>
Link: https://lore.kernel.org/r/20230707131042.10795-2-mike.looijmans@topic.nlSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent ff785255
......@@ -18,6 +18,7 @@
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/regulator/consumer.h>
#include <linux/sizes.h>
#include <linux/timer.h>
#include <asm/unaligned.h>
......@@ -360,6 +361,12 @@ static int exc3000_probe(struct i2c_client *client)
if (IS_ERR(data->reset))
return PTR_ERR(data->reset);
/* For proper reset sequence, enable power while reset asserted */
error = devm_regulator_get_enable(&client->dev, "vdd");
if (error && error != -ENODEV)
return dev_err_probe(&client->dev, error,
"failed to request vdd regulator\n");
if (data->reset) {
msleep(EXC3000_RESET_MS);
gpiod_set_value_cansleep(data->reset, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment