summaryrefslogtreecommitdiff
path: root/include/linux/basic_mmio_gpio.h
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2012-05-19 17:34:58 +0400
committerGrant Likely <grant.likely@secretlab.ca>2012-05-19 22:17:35 +0400
commit3e11f7b840b4671213c66817294ad7dd0b572756 (patch)
treefc9246cd2e491e8c9b6f7cec994da2b314b7c4ca /include/linux/basic_mmio_gpio.h
parent07ce8ec7308ab3fa55fe2861671b157f857fff58 (diff)
downloadlinux-3e11f7b840b4671213c66817294ad7dd0b572756.tar.xz
gpio/generic: initialize basic_mmio_gpio shadow variables properly
It fixes the issue in gpio-generic that commit fb14921 (gpio/mxc: add missing initialization of basic_mmio_gpio shadow variables) manged to fix in gpio-mxc driver, so that other platform specific drivers do not suffer from the same problem over and over again. Changes since v1: * Turn the last parameter of bgpio_init() "bool big_endian" into "unsigned long flags" and give those really quirky hardwares a chance to tell that reg_set and reg_dir are unreadable. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> [grant.likely: Fix big-endian usage to explicitly set BBGPIOF_BIG_ENDIAN] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/basic_mmio_gpio.h')
-rw-r--r--include/linux/basic_mmio_gpio.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/basic_mmio_gpio.h b/include/linux/basic_mmio_gpio.h
index feb912196745..1c504ca5bdb3 100644
--- a/include/linux/basic_mmio_gpio.h
+++ b/include/linux/basic_mmio_gpio.h
@@ -67,6 +67,10 @@ int bgpio_remove(struct bgpio_chip *bgc);
int bgpio_init(struct bgpio_chip *bgc, struct device *dev,
unsigned long sz, void __iomem *dat, void __iomem *set,
void __iomem *clr, void __iomem *dirout, void __iomem *dirin,
- bool big_endian);
+ unsigned long flags);
+
+#define BGPIOF_BIG_ENDIAN BIT(0)
+#define BGPIOF_UNREADABLE_REG_SET BIT(1) /* reg_set is unreadable */
+#define BGPIOF_UNREADABLE_REG_DIR BIT(2) /* reg_dir is unreadable */
#endif /* __BASIC_MMIO_GPIO_H */