[PATCH v2 0/7] VIM3: add support for checking 'Function' button state
Marek Szyprowski
m.szyprowski at samsung.com
Tue Dec 15 15:42:23 CET 2020
Hi All,
This patchset adds all building blocks needed for checking the 'Function'
button state in the boot script on Amlogic A311D based VIM3 board. This
button is connected to the ADC lines of the SoC, so it required to enable
meson SARADC, the clocks needed for it and a simple button-adc drivers.
Once applied, one can use following commands in the boot scripts:
-->8---
echo Checking Func button state: \\c
button Function
if test ${button} = on
then
echo Selected alternative boot
...
fi
--->8---
Best regards
Marek Szyprowski
Samsung R&D Institute Poland
Changelog:
v2:
- removed Change-Id tags
- split defconfig changes into ADC and button related
v1: https://lists.denx.de/pipermail/u-boot/2020-December/434875.html
- initial submission
Patch summary:
Marek Szyprowski (7):
clk: meson: add minimal driver for g12a-ao clocks
adc: meson-saradc: add G12A variant
adc: meson-saradc: skip hardware init only if ADC is enabled
configs: khadas-vim3: enable ADC device support
button: add a simple ADC-based button driver
cmd: button: store button state in the 'button' env
configs: khadas-vim3: enable Function button support
cmd/button.c | 4 +-
configs/khadas-vim3_defconfig | 4 ++
drivers/adc/meson-saradc.c | 9 ++-
drivers/button/Kconfig | 8 +++
drivers/button/Makefile | 1 +
drivers/button/button-adc.c | 117 ++++++++++++++++++++++++++++++++++
drivers/clk/meson/Makefile | 1 +
drivers/clk/meson/g12a-ao.c | 83 ++++++++++++++++++++++++
8 files changed, 224 insertions(+), 3 deletions(-)
create mode 100644 drivers/button/button-adc.c
create mode 100644 drivers/clk/meson/g12a-ao.c
--
2.17.1
More information about the U-Boot
mailing list