public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v3 0/5] sysinfo: Add gpio sysinfo driver
@ 2021-03-31 17:50 Sean Anderson
  2021-03-31 17:50 ` [PATCH v3 1/5] dm: gpio: Fix gpio_get_list_count failing with livetree Sean Anderson
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Sean Anderson @ 2021-03-31 17:50 UTC (permalink / raw)
  To: u-boot

This series adds a GPIO sysinfo driver using the
dm_gpio_get_values_as_int_base3 function. The board revision is mapped
based in devicetree properties. This series is based on Simon's GPIO
series [1].

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=228126

Changes in v3:
- Fix assuming any nonzero return of dev_count_phandle_with_args was an error.
- Fix assuming nonzero return from dm_gpio_get_values_as_int_base3 is an
  error.
- Move detected bool into sysinfo_priv struct
- Rebase onto u-boot/next
- Use SYSINFO_ID_BOARD_MODEL instead of SYSINFO_ID_REVISION

Changes in v2:
- Document sysinfo_gpio_priv
- Enforce sysinfo detect ordering in uclass. Users must still call
  sysinfo_detect beforehand.
- Fix unbalanced brace in sysinfo_gpio_get_int
- Modify sysinfo test to check for detect() ordering.
- Refactor driver to take advantage of the uclass detect ordering
  guarantee.
- Reorder includes
- Set BOARD_HWVERSION to SYSINFO_ID_REVISION, as they represent the same
  content.
- Use enums instead of defines for sysinfo ids

Sean Anderson (5):
  dm: gpio: Fix gpio_get_list_count failing with livetree
  sysinfo: Use global sysinfo IDs for existing sysinfo drivers
  sysinfo: Require that sysinfo_detect be called before other methods
  sysinfo: Add gpio-sysinfo driver
  test: Add gpio-sysinfo test

 arch/sandbox/dts/test.dts                     |   7 +
 common/spl/spl_fit.c                          |   4 +
 .../sysinfo/gpio-sysinfo.txt                  |  37 +++++
 drivers/gpio/gpio-uclass.c                    |   6 +-
 drivers/sysinfo/Kconfig                       |   8 +
 drivers/sysinfo/Makefile                      |   1 +
 drivers/sysinfo/gazerbeam.h                   |   8 +-
 drivers/sysinfo/gpio.c                        | 141 ++++++++++++++++++
 drivers/sysinfo/sandbox.h                     |   2 +-
 drivers/sysinfo/sysinfo-uclass.c              |  29 +++-
 include/sysinfo.h                             |  26 ++--
 test/dm/Makefile                              |   1 +
 test/dm/sysinfo-gpio.c                        |  69 +++++++++
 test/dm/sysinfo.c                             |  23 +--
 14 files changed, 336 insertions(+), 26 deletions(-)
 create mode 100644 doc/device-tree-bindings/sysinfo/gpio-sysinfo.txt
 create mode 100644 drivers/sysinfo/gpio.c
 create mode 100644 test/dm/sysinfo-gpio.c

-- 
2.25.1

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

end of thread, other threads:[~2021-04-20 14:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-31 17:50 [PATCH v3 0/5] sysinfo: Add gpio sysinfo driver Sean Anderson
2021-03-31 17:50 ` [PATCH v3 1/5] dm: gpio: Fix gpio_get_list_count failing with livetree Sean Anderson
2021-03-31 17:50 ` [PATCH v3 2/5] sysinfo: Use global sysinfo IDs for existing sysinfo drivers Sean Anderson
2021-03-31 17:50 ` [PATCH v3 3/5] sysinfo: Require that sysinfo_detect be called before other methods Sean Anderson
2021-03-31 17:50 ` [PATCH v3 4/5] sysinfo: Add gpio-sysinfo driver Sean Anderson
2021-03-31 17:50 ` [PATCH v3 5/5] test: Add gpio-sysinfo test Sean Anderson
2021-04-20 11:29   ` Tom Rini
2021-04-20 14:08     ` Sean Anderson
2021-04-20 14:17       ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox