From 3c58ea643c31273b467400c04f3b1ed04fc0da2d Mon Sep 17 00:00:00 2001 From: Vladimir Barinov Date: Mon, 3 Jul 2017 02:43:21 +0300 Subject: [PATCH] gpio: max732x: set gpio ouput-low at init Set all gpio output-low at init state instead chip defaults. This allows to avoid preserved values during resaet Signed-off-by: Vladimir Barinov --- drivers/gpio/gpio-max732x.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c index b6fc8c5..4a2669f 100644 --- a/drivers/gpio/gpio-max732x.c +++ b/drivers/gpio/gpio-max732x.c @@ -680,6 +680,10 @@ static int max732x_probe(struct i2c_client *client, mutex_init(&chip->lock); + /* set all ports output-low at init state */ + max732x_writeb(chip, 0, 0); + max732x_writeb(chip, 1, 0); + ret = max732x_readb(chip, is_group_a(chip, 0), &chip->reg_out[0]); if (ret) goto out_failed; -- 1.9.1