All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] gpio: uclass enhancements for DM_GPIO drivers
@ 2021-09-11 22:05 Samuel Holland
  2021-09-11 22:05 ` [PATCH 1/3] gpio: Verify validity of pin offsets when looking up names Samuel Holland
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Samuel Holland @ 2021-09-11 22:05 UTC (permalink / raw)
  To: u-boot
  Cc: Samuel Holland, Dario Binacchi, Jean-Jacques Hiblot,
	Patrick Delaunay, Pratyush Yadav, Simon Glass

This series makes a couple of enhancements to the generic GPIO code that
simplified updating some DM_GPIO drivers.

Patches 1-2 add bounds checking when looking up GPIOs by name and from
the device tree. After this, all functions that fill out a gpio_desc
ensure the offset field is in bounds, so each driver doesn't need
separate bounds checking in its ops functions.

Patch 3 allows the GPIO flag translation code to be shared by drivers
that use the same flags, but cannot use gpio_xlate_offs_flags directly.
For example, the sunxi GPIO binding has 3 cells because it separates the
bank and pin numbers.


Samuel Holland (3):
  gpio: Verify validity of pin offsets when looking up names
  gpio: Verify validity of pin offsets from device trees
  gpio: Factor out DT flag translation

 drivers/gpio/gpio-uclass.c | 55 +++++++++++++++++++++++---------------
 include/asm-generic/gpio.h |  8 ++++++
 2 files changed, 42 insertions(+), 21 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-10-05 22:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-11 22:05 [PATCH 0/3] gpio: uclass enhancements for DM_GPIO drivers Samuel Holland
2021-09-11 22:05 ` [PATCH 1/3] gpio: Verify validity of pin offsets when looking up names Samuel Holland
2021-09-30  4:08   ` Simon Glass
2021-10-05 22:02   ` Tom Rini
2021-09-11 22:05 ` [PATCH 2/3] gpio: Verify validity of pin offsets from device trees Samuel Holland
2021-09-30  4:08   ` Simon Glass
2021-10-05 22:02   ` Tom Rini
2021-10-05 22:02   ` Tom Rini
2021-09-11 22:05 ` [PATCH 3/3] gpio: Factor out DT flag translation Samuel Holland
2021-09-30  4:08   ` Simon Glass
2021-10-05 22:02   ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.