All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio/generic: initialize the shadow of direction register
@ 2012-05-15  3:56 Shawn Guo
  2012-05-15  7:17 ` Lothar Waßmann
  0 siblings, 1 reply; 16+ messages in thread
From: Shawn Guo @ 2012-05-15  3:56 UTC (permalink / raw)
  To: linux-arm-kernel

Same as what the driver does for data register shadow bgc->data,
the bgpio_init should also initialize direction register shadow
bgc->dir to preserve the existing setting.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/gpio/gpio-generic.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
index e38dd0c..53222c7 100644
--- a/drivers/gpio/gpio-generic.c
+++ b/drivers/gpio/gpio-generic.c
@@ -394,6 +394,7 @@ int bgpio_init(struct bgpio_chip *bgc, struct device *dev,
 		return ret;
 
 	bgc->data = bgc->read_reg(bgc->reg_dat);
+	bgc->dir = bgc->read_reg(bgc->reg_dir);
 
 	return ret;
 }
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-05-17 20:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-15  3:56 [PATCH] gpio/generic: initialize the shadow of direction register Shawn Guo
2012-05-15  7:17 ` Lothar Waßmann
2012-05-16  5:33   ` Shawn Guo
2012-05-16  6:53     ` Lothar Waßmann
2012-05-16  7:29       ` Shawn Guo
2012-05-16  7:34         ` Lothar Waßmann
2012-05-16 12:36           ` Shawn Guo
2012-05-16 12:48             ` Lothar Waßmann
2012-05-16 13:38               ` Shawn Guo
2012-05-16 13:33                 ` Lothar Waßmann
2012-05-16 14:07                   ` Shawn Guo
2012-05-16 14:03                     ` Lothar Waßmann
2012-05-16 16:21                       ` Shawn Guo
2012-05-16 13:54             ` Lothar Waßmann
2012-05-16 16:17               ` Shawn Guo
2012-05-17 20:39                 ` Grant Likely

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.