Skip to content

gpio: make gpiod_count() API consistent

Andy Shevchenko linux-gpio linux-input lkml platform-driver-x86 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4gpio: acpi: Don't return 0 on acpi_gpio_count()drivers/gpio/gpiolib-acpi.c+2 -23 replies
2/4gpio: of: Don't return 0 on dt_gpio_count()drivers/gpio/gpiolib.c+2 -21 reply
3/4platform/x86: surface3_button: Propagate error from gpiod_count()drivers/platform/x86/surface3_button.c+3 -23 replies
4/4Input: soc_button_array - Propagate error from gpiod_count()drivers/input/misc/soc_button_array.c+3 -22 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDmitry TorokhovBenjamin TissoiresMika Westerberg
SeriesA-b
1/4A-b
2/4
3/4
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH v1 0/4] gpio: make gpiod_count() API consistent

There are three possibilities in gpiod_count(): ACPI, OF, and platform data.

Some of them return 0, which requires to be handled separately, though developers rather lazy and just shadow an actual error code.

Let's make this API consistent by not allowing 0 in returned value.

There are luckily only 3 users right now, one of them handles this properly, the rest is converted in this series.

Series is supposed to go through GPIO tree.

Andy Shevchenko (4):
gpio: acpi: Don't return 0 on acpi_gpio_count()
gpio: of: Don't return 0 on dt_gpio_count() platform/x86: surface3_button: Propagate error from gpiod_count()
Input: soc_button_array - Propagate error from gpiod_count()

 drivers/gpio/gpiolib-acpi.c            | 4 ++--
 drivers/gpio/gpiolib.c                 | 4 ++--
 drivers/input/misc/soc_button_array.c  | 5 +++--
 drivers/platform/x86/surface3_button.c | 5 +++--
 4 files changed, 10 insertions(+), 8 deletions(-)
Signature · 1 line
2.11.0