Skip to content

Commit 64f3322

Browse files
Bartosz Golaszewskitsbogend
authored andcommitted
MIPS: bcm63xx: gpio: use new line value setter callbacks
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 55ba537 commit 64f3322

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

arch/mips/bcm63xx/gpio.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ static void bcm63xx_gpio_out_low_reg_init(void)
3535
static DEFINE_SPINLOCK(bcm63xx_gpio_lock);
3636
static u32 gpio_out_low, gpio_out_high;
3737

38-
static void bcm63xx_gpio_set(struct gpio_chip *chip,
39-
unsigned gpio, int val)
38+
static int bcm63xx_gpio_set(struct gpio_chip *chip, unsigned int gpio, int val)
4039
{
4140
u32 reg;
4241
u32 mask;
@@ -62,6 +61,8 @@ static void bcm63xx_gpio_set(struct gpio_chip *chip,
6261
*v &= ~mask;
6362
bcm_gpio_writel(*v, reg);
6463
spin_unlock_irqrestore(&bcm63xx_gpio_lock, flags);
64+
65+
return 0;
6566
}
6667

6768
static int bcm63xx_gpio_get(struct gpio_chip *chip, unsigned gpio)
@@ -130,7 +131,7 @@ static struct gpio_chip bcm63xx_gpio_chip = {
130131
.direction_input = bcm63xx_gpio_direction_input,
131132
.direction_output = bcm63xx_gpio_direction_output,
132133
.get = bcm63xx_gpio_get,
133-
.set = bcm63xx_gpio_set,
134+
.set_rv = bcm63xx_gpio_set,
134135
.base = 0,
135136
};
136137

0 commit comments

Comments
 (0)