mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-19 05:31:31 +02:00
ARM: dts: stm32: drop "st,button1" compatible
It is pointless to use the custom compatible "st,button1" when stm32746g-eval.dts and stm32f769-disco.dts already contain the "gpio-keys" compatible, which is specifically used for button management. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
This commit is contained in:
parent
aa7162d4c8
commit
2d4d194675
@ -23,11 +23,6 @@
|
||||
spi0 = &qspi;
|
||||
};
|
||||
|
||||
button1 {
|
||||
compatible = "st,button1";
|
||||
button-gpio = <&gpioc 13 0>;
|
||||
};
|
||||
|
||||
led1 {
|
||||
compatible = "st,led1";
|
||||
led-gpio = <&gpiof 10 0>;
|
||||
|
@ -23,11 +23,6 @@
|
||||
spi0 = &qspi;
|
||||
};
|
||||
|
||||
button1 {
|
||||
compatible = "st,button1";
|
||||
button-gpio = <&gpioi 11 0>;
|
||||
};
|
||||
|
||||
led1 {
|
||||
compatible = "st,led1";
|
||||
led-gpio = <&gpioi 1 0>;
|
||||
|
@ -23,11 +23,6 @@
|
||||
spi0 = &qspi;
|
||||
};
|
||||
|
||||
button1 {
|
||||
compatible = "st,button1";
|
||||
button-gpio = <&gpioa 0 0>;
|
||||
};
|
||||
|
||||
led1 {
|
||||
compatible = "st,led1";
|
||||
led-gpio = <&gpioj 5 0>;
|
||||
|
@ -94,21 +94,6 @@ int board_late_init(void)
|
||||
dm_gpio_set_value(&gpio, 1);
|
||||
}
|
||||
|
||||
/* read button 1*/
|
||||
node = fdt_node_offset_by_compatible(gd->fdt_blob, 0, "st,button1");
|
||||
if (node < 0)
|
||||
return -1;
|
||||
|
||||
gpio_request_by_name_nodev(offset_to_ofnode(node), "button-gpio", 0,
|
||||
&gpio, GPIOD_IS_IN);
|
||||
|
||||
if (dm_gpio_is_valid(&gpio)) {
|
||||
if (dm_gpio_get_value(&gpio))
|
||||
puts("usr button is at HIGH LEVEL\n");
|
||||
else
|
||||
puts("usr button is at LOW LEVEL\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user