Skip to content

backlight: gpio: add support for multiple GPIOs for backlight control

Sudarshan Shetty dri-devel linux-devicetree linux-fbdev linux-leds lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 9 repliesIn review
  2. v12 patches 11 repliesSuperseded

Changes in v2 from the cover letter

- Used devm_gpiod_get_array() and struct gpio_descs
- Replaced per-index GPIO handling with descriptor array access
- Moved the bitmap allocation to probe using devm_kcalloc().
- Updated commit messages.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dt-bindings: backlight: gpio-backlight: allow multiple GPIOsDocumentation/devicetree/bindings/leds/backlight/gpio-backlight.yaml+22 -28 replies
2/2backlight: gpio: add support for multiple GPIOs for backlight controldrivers/video/backlight/gpio_backlight.c+45 -211 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] backlight: gpio: add support for multiple GPIOs for backlight control

Hi all,

This patch extends the gpio-backlight driver and its Device Tree bindings to support multiple GPIOs for controlling a single backlight device.

Some panels require more than one GPIO to enable or disable the backlight, and previously the driver only supported a single GPIO. With this change:
- The driver now handles an array of GPIOs and updates all of them based on brightness state.
- The Device Tree binding has been updated to allow specifying one or more GPIOs for a gpio-backlight node.

This approach avoids describing multiple backlight devices in DT for a single panel.

Changes in v2:
- Used devm_gpiod_get_array() and struct gpio_descs
- Replaced per-index GPIO handling with descriptor array access
- Moved the bitmap allocation to probe using devm_kcalloc().
- Updated commit messages.

Thanks,
Anusha

Sudarshan Shetty (2):
dt-bindings: backlight: gpio-backlight: allow multiple GPIOs
backlight: gpio: add support for multiple GPIOs for backlight control

 .../leds/backlight/gpio-backlight.yaml        | 24 ++++++-
 drivers/video/backlight/gpio_backlight.c      | 66 +++++++++++++------
 2 files changed, 67 insertions(+), 23 deletions(-)
Signature · 1 line
2.34.1