[PATCH v2 0/5] sysinfo: Add gpio sysinfo driver
Sean Anderson
sean.anderson at seco.com
Fri Mar 5 21:12:20 CET 2021
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 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: Provide some global/default IDs
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 | 4 +-
drivers/sysinfo/Kconfig | 8 +
drivers/sysinfo/Makefile | 1 +
drivers/sysinfo/gazerbeam.h | 8 +-
drivers/sysinfo/gpio.c | 140 ++++++++++++++++++
drivers/sysinfo/sandbox.h | 2 +-
drivers/sysinfo/sysinfo-uclass.c | 25 +++-
include/sysinfo.h | 39 +++--
test/dm/Makefile | 1 +
test/dm/sysinfo-gpio.c | 69 +++++++++
test/dm/sysinfo.c | 23 +--
14 files changed, 343 insertions(+), 25 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
More information about the U-Boot
mailing list