[PATCH v3 1/8] dm: button: add an uclass for button

Simon Glass sjg at chromium.org
Tue Jul 28 20:57:21 CEST 2020


Add a new uclass for button that implements two functions:
- button_get_by_label
- button_get_status

Reviewed-by: Simon Glass <sjg at chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes at softathome.com>
---

Changelog:
v3:
- no change
v2:
- re-order include
- use uclass_id_foreach_dev
- add comments to enum button_state_t

 drivers/Kconfig                |  2 ++
 drivers/Makefile               |  1 +
 drivers/button/Kconfig         | 12 +++++++++
 drivers/button/Makefile        |  5 ++++
 drivers/button/button-uclass.c | 43 ++++++++++++++++++++++++++++++
 include/button.h               | 59 ++++++++++++++++++++++++++++++++++++++++++
 include/dm/uclass-id.h         |  1 +
 7 files changed, 123 insertions(+)
 create mode 100644 drivers/button/Kconfig
 create mode 100644 drivers/button/Makefile
 create mode 100644 drivers/button/button-uclass.c
 create mode 100644 include/button.h

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list