Commit 04ebcbd8 authored by Grygorii Strashko's avatar Grygorii Strashko Committed by Linus Walleij

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: default avatarTony Lindgren <tony@atomide.com>
Tested-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: default avatarSantosh Shilimkar <ssantosh@kernel.org>
Acked-by: default avatarJavier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@linaro.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent b2b20045
......@@ -75,7 +75,7 @@ struct gpio_bank {
int power_mode;
bool workaround_enabled;
void (*set_dataout)(struct gpio_bank *bank, int gpio, int enable);
void (*set_dataout)(struct gpio_bank *bank, unsigned gpio, int enable);
int (*get_context_loss_count)(struct device *dev);
struct omap_gpio_reg_offs *regs;
......@@ -119,11 +119,11 @@ static void omap_set_gpio_direction(struct gpio_bank *bank, int gpio,
/* set data out value using dedicate set/clear register */
static void omap_set_gpio_dataout_reg(struct gpio_bank *bank, int gpio,
static void omap_set_gpio_dataout_reg(struct gpio_bank *bank, unsigned offset,
int enable)
{
void __iomem *reg = bank->base;
u32 l = GPIO_BIT(bank, gpio);
u32 l = BIT(offset);
if (enable) {
reg += bank->regs->set_dataout;
......@@ -137,11 +137,11 @@ static void omap_set_gpio_dataout_reg(struct gpio_bank *bank, int gpio,
}
/* set data out value using mask register */
static void omap_set_gpio_dataout_mask(struct gpio_bank *bank, int gpio,
static void omap_set_gpio_dataout_mask(struct gpio_bank *bank, unsigned offset,
int enable)
{
void __iomem *reg = bank->base + bank->regs->dataout;
u32 gpio_bit = GPIO_BIT(bank, gpio);
u32 gpio_bit = BIT(offset);
u32 l;
l = readl_relaxed(reg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment