Skip to content

Commit 83ab731

Browse files
Bartosz Golaszewskiandy-shev
authored andcommitted
pinctrl: cherryview: use new GPIO 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 <[email protected]> Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 4863d75 commit 83ab731

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/pinctrl/intel/pinctrl-cherryview.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ static int chv_gpio_get(struct gpio_chip *chip, unsigned int offset)
11121112
return !!(ctrl0 & CHV_PADCTRL0_GPIORXSTATE);
11131113
}
11141114

1115-
static void chv_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
1115+
static int chv_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
11161116
{
11171117
struct intel_pinctrl *pctrl = gpiochip_get_data(chip);
11181118
u32 ctrl0;
@@ -1127,6 +1127,8 @@ static void chv_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
11271127
ctrl0 &= ~CHV_PADCTRL0_GPIOTXSTATE;
11281128

11291129
chv_writel(pctrl, offset, CHV_PADCTRL0, ctrl0);
1130+
1131+
return 0;
11301132
}
11311133

11321134
static int chv_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
@@ -1166,7 +1168,7 @@ static const struct gpio_chip chv_gpio_chip = {
11661168
.direction_input = chv_gpio_direction_input,
11671169
.direction_output = chv_gpio_direction_output,
11681170
.get = chv_gpio_get,
1169-
.set = chv_gpio_set,
1171+
.set_rv = chv_gpio_set,
11701172
};
11711173

11721174
static void chv_gpio_irq_ack(struct irq_data *d)

0 commit comments

Comments
 (0)