summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorFugang Duan <fugang.duan@nxp.com>2018-01-17 15:36:39 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:30:15 +0800
commit0714f3969f81ecaacac6eb581687ec697d2452da (patch)
tree0982ede84d850e242f35c18963ae9bcaab11ef17 /drivers/gpio
parent35b65d15fd6dcf5ec30c207d33cb54d69aad0390 (diff)
MLK-17400-02 gpio: max732x: add device reset support
Add device reset for max732x driver. Signed-off-by: Fugang Duan <fugang.duan@nxp.com> Acked-by: Gao Pan <pandy.gao@nxp.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-max732x.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c
index 7f4d26ce5f23..1f32e3f0a688 100644
--- a/drivers/gpio/gpio-max732x.c
+++ b/drivers/gpio/gpio-max732x.c
@@ -22,6 +22,7 @@
#include <linux/i2c.h>
#include <linux/platform_data/max732x.h>
#include <linux/of.h>
+#include <linux/reset.h>
/*
@@ -642,6 +643,10 @@ static int max732x_probe(struct i2c_client *client,
return -ENOMEM;
chip->client = client;
+ ret = device_reset(&client->dev);
+ if (ret == -EPROBE_DEFER)
+ return ret;
+
nr_port = max732x_setup_gpio(chip, id, pdata->gpio_base);
chip->gpio_chip.parent = &client->dev;