[PATCH 0/4] Add vibration motor support to U-Boot
Samuel Dionne-Riel
samuel at dionne-riel.com
Wed Dec 22 23:36:03 CET 2021
This series of patch adds support for vibration motors (often called
vibrators) to U-Boot.
The support adds the necessary plumbing to support SPL usage of
vibration motors. This can be used to vibrate the device, like a phone,
as early as possible during the boot process.
A `vibrator` command allows scripts, or customised boot commands, to
vibrate the device. This can be used to provide feedback to the end-user
about failure state, or boot stage.
An example use case of the command is, in a customized boot command, to
signify that an error happend, by synchronizing red LED flashes with a
few short vibrations.
Samuel Dionne-Riel (4):
drivers: Introduce vibrator uclass
vibrator: Add vibrator_gpio driver
cmd: Add vibrator command
pinephone_defconfig: Add gpio vibrator support
arch/sandbox/dts/test.dts | 10 ++
cmd/Kconfig | 10 ++
cmd/Makefile | 1 +
cmd/vibrator.c | 148 +++++++++++++++++++++++++++++
configs/pinephone_defconfig | 2 +
configs/sandbox_defconfig | 2 +
drivers/Kconfig | 2 +
drivers/Makefile | 1 +
drivers/vibrator/Kconfig | 37 ++++++++
drivers/vibrator/Makefile | 6 ++
drivers/vibrator/vibrator-uclass.c | 62 ++++++++++++
drivers/vibrator/vibrator_gpio.c | 122 ++++++++++++++++++++++++
include/dm/uclass-id.h | 1 +
include/vibrator.h | 87 +++++++++++++++++
test/dm/Makefile | 1 +
test/dm/vibrator.c | 97 +++++++++++++++++++
16 files changed, 589 insertions(+)
create mode 100644 cmd/vibrator.c
create mode 100644 drivers/vibrator/Kconfig
create mode 100644 drivers/vibrator/Makefile
create mode 100644 drivers/vibrator/vibrator-uclass.c
create mode 100644 drivers/vibrator/vibrator_gpio.c
create mode 100644 include/vibrator.h
create mode 100644 test/dm/vibrator.c
--
2.34.0
More information about the U-Boot
mailing list