aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorGrygorii Strashko <grygorii.strashko@linaro.org>2015-03-23 08:18:24 -0400
committerLinus Walleij <linus.walleij@linaro.org>2015-03-27 06:03:55 -0400
commit04ebcbd82ec3b6fb88644e983f85224e95cf55e5 (patch)
treeae987ba42a299fab5057349ff34e483d40b7fc80 /drivers/gpio
parentb2b2004550f4b18ed16929107f478005fadfdb5c (diff)
gpio: omap: simplify omap_set_gpio_dataout_x()
Both functions omap_set_gpio_dataout_reg() and omap_set_gpio_dataout_mask() accept GPIO offset as 'gpio' input parameter, so rename it to 'offset' and drop usage of GPIO_BIT() macro. Tested-by: Tony Lindgren <tony@atomide.com> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Acked-by: Santosh Shilimkar <ssantosh@kernel.org> Acked-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-omap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index ce7123928219..7aeee7b1d405 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -75,7 +75,7 @@ struct gpio_bank {
75 int power_mode; 75 int power_mode;
76 bool workaround_enabled; 76 bool workaround_enabled;
77 77
78 void (*set_dataout)(struct gpio_bank *bank, int gpio, int enable); 78 void (*set_dataout)(struct gpio_bank *bank, unsigned gpio, int enable);
79 int (*get_context_loss_count)(struct device *dev); 79 int (*get_context_loss_count)(struct device *dev);
80 80
81 struct omap_gpio_reg_offs *regs; 81 struct omap_gpio_reg_offs *regs;
@@ -119,11 +119,11 @@ static void omap_set_gpio_direction(struct gpio_bank *bank, int gpio,
119 119
120 120
121/* set data out value using dedicate set/clear register */ 121/* set data out value using dedicate set/clear register */
122static void omap_set_gpio_dataout_reg(struct gpio_bank *bank, int gpio, 122static void omap_set_gpio_dataout_reg(struct gpio_bank *bank, unsigned offset,
123 int enable) 123 int enable)
124{ 124{
125 void __iomem *reg = bank->base; 125 void __iomem *reg = bank->base;
126 u32 l = GPIO_BIT(bank, gpio); 126 u32 l = BIT(offset);
127 127
128 if (enable) { 128 if (enable) {
129 reg += bank->regs->set_dataout; 129 reg += bank->regs->set_dataout;
@@ -137,11 +137,11 @@ static void omap_set_gpio_dataout_reg(struct gpio_bank *bank, int gpio,
137} 137}
138 138
139/* set data out value using mask register */ 139/* set data out value using mask register */
140static void omap_set_gpio_dataout_mask(struct gpio_bank *bank, int gpio, 140static void omap_set_gpio_dataout_mask(struct gpio_bank *bank, unsigned offset,
141 int enable) 141 int enable)
142{ 142{
143 void __iomem *reg = bank->base + bank->regs->dataout; 143 void __iomem *reg = bank->base + bank->regs->dataout;
144 u32 gpio_bit = GPIO_BIT(bank, gpio); 144 u32 gpio_bit = BIT(offset);
145 u32 l; 145 u32 l;
146 146
147 l = readl_relaxed(reg); 147 l = readl_relaxed(reg);