@@ -318,7 +318,8 @@ static int pca9532_gpio_request_pin(struct gpio_chip *gc, unsigned offset)
318
318
return - EBUSY ;
319
319
}
320
320
321
- static void pca9532_gpio_set_value (struct gpio_chip * gc , unsigned offset , int val )
321
+ static int pca9532_gpio_set_value (struct gpio_chip * gc , unsigned int offset ,
322
+ int val )
322
323
{
323
324
struct pca9532_data * data = gpiochip_get_data (gc );
324
325
struct pca9532_led * led = & data -> leds [offset ];
@@ -329,6 +330,8 @@ static void pca9532_gpio_set_value(struct gpio_chip *gc, unsigned offset, int va
329
330
led -> state = PCA9532_OFF ;
330
331
331
332
pca9532_setled (led );
333
+
334
+ return 0 ;
332
335
}
333
336
334
337
static int pca9532_gpio_get_value (struct gpio_chip * gc , unsigned offset )
@@ -351,9 +354,7 @@ static int pca9532_gpio_direction_input(struct gpio_chip *gc, unsigned offset)
351
354
352
355
static int pca9532_gpio_direction_output (struct gpio_chip * gc , unsigned offset , int val )
353
356
{
354
- pca9532_gpio_set_value (gc , offset , val );
355
-
356
- return 0 ;
357
+ return pca9532_gpio_set_value (gc , offset , val );
357
358
}
358
359
#endif /* CONFIG_LEDS_PCA9532_GPIO */
359
360
@@ -472,7 +473,7 @@ static int pca9532_configure(struct i2c_client *client,
472
473
data -> gpio .label = "gpio-pca9532" ;
473
474
data -> gpio .direction_input = pca9532_gpio_direction_input ;
474
475
data -> gpio .direction_output = pca9532_gpio_direction_output ;
475
- data -> gpio .set = pca9532_gpio_set_value ;
476
+ data -> gpio .set_rv = pca9532_gpio_set_value ;
476
477
data -> gpio .get = pca9532_gpio_get_value ;
477
478
data -> gpio .request = pca9532_gpio_request_pin ;
478
479
data -> gpio .can_sleep = 1 ;
0 commit comments