u-boot/drivers/button
Alexey Minnekhanov c92bf21e73
button: qcom-pmic: allow to specify code in devicetree
Most device vendors put "Volume Down" button onto PMIC RESIN.
But Sony is special: see
dts/upstream/src/arm64/qcom/sdm630-sony-xperia-nile.dtsi or [1].
They put "Volume Down" on PMIC GPIO 7 where others usually put
"Volume Up", and KEY_VOLUMEUP is inside &pon_resin.

Currently if you boot U-Boot on such Sony device, you end up
with 2 "Volume Down" buttons, and no "Volume Up", which makes
navigating menu problematic.

Support reading devicetree "linux,code" property and override
statically defined button code & label based on that.

[1] https://elixir.bootlin.com/linux/v6.15-rc3/source/arch/
arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi#L263

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: Alexey Minnekhanov <alexeymin@minlexx.ru>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Link: https://lore.kernel.org/r/20250424014811.3809818-1-alexeymin@minlexx.ru
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
2025-06-02 18:20:33 +02:00
..
button-adc.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
button-gpio.c button: gpio: handle broken controller 2024-12-04 14:06:23 -06:00
button-qcom-pmic.c button: qcom-pmic: allow to specify code in devicetree 2025-06-02 18:20:33 +02:00
button-uclass.c button: make button_get_by_label() case insensitive 2025-04-11 15:28:14 +02:00
Kconfig dm: button: support remapping phone keys 2024-11-16 19:49:05 -06:00
Makefile button: qcom-pmic: introduce Qualcomm PMIC button driver 2024-01-16 12:26:53 +00:00