Add a new uclass for button that implements two functions: - button_get_by_label - button_get_status
Reviewed-by: Simon Glass <s...@chromium.org> Signed-off-by: Philippe Reynes <philippe.rey...@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!