Skip to content

Commit 20e6227

Browse files
Bartosz Golaszewskiandy-shev
authored andcommitted
pinctrl: lynxpoint: 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 241d79f commit 20e6227

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/pinctrl/intel/pinctrl-lynxpoint.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ static int lp_gpio_get(struct gpio_chip *chip, unsigned int offset)
503503
return !!(ioread32(reg) & IN_LVL_BIT);
504504
}
505505

506-
static void lp_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
506+
static int lp_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
507507
{
508508
struct intel_pinctrl *lg = gpiochip_get_data(chip);
509509
void __iomem *reg = lp_gpio_reg(chip, offset, LP_CONFIG1);
@@ -514,6 +514,8 @@ static void lp_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
514514
iowrite32(ioread32(reg) | OUT_LVL_BIT, reg);
515515
else
516516
iowrite32(ioread32(reg) & ~OUT_LVL_BIT, reg);
517+
518+
return 0;
517519
}
518520

519521
static int lp_gpio_direction_input(struct gpio_chip *chip, unsigned int offset)
@@ -775,7 +777,7 @@ static int lp_gpio_probe(struct platform_device *pdev)
775777
gc->direction_input = lp_gpio_direction_input;
776778
gc->direction_output = lp_gpio_direction_output;
777779
gc->get = lp_gpio_get;
778-
gc->set = lp_gpio_set;
780+
gc->set_rv = lp_gpio_set;
779781
gc->set_config = gpiochip_generic_config;
780782
gc->get_direction = lp_gpio_get_direction;
781783
gc->base = -1;

0 commit comments

Comments
 (0)