Question
GPIO changes with Linux v5.15
I've upgraded from 5.10 to 5.15 and can't make GPIO work anymore
I've tried this
gpio_keys {
compatible = "gpio-keys";
input-name = "gpio-keys";
status = "okay";
halt {
label = "Halt";
linux,code = <KEY_POWER>; // Key event to match with poweroff daemon
gpios = <&gpioa 2 GPIO_ACTIVE_LOW>; // WKUP2 on falling edge
status = "okay";
};
wakeup {
label = "Wakeup";
linux,code = <BTN_1>;
gpios = <&gpioa 2 GPIO_ACTIVE_HIGH>;
status = "okay";
wakeup-source;
};
}but am getting
[ 1.950701] gpio-keys gpio_keys: failed to get gpio: -16
[ 1.950728] gpio-keys: probe of gpio_keys failed with error -16
[ 2.205292] hci_uart_qca serial0-0: failed to acquire enable gpioI've also tried, according to the kernel documentation:
wakeup {
label = "Wakeup";
linux,code = <BTN_1>; // Can be anything, not used
interrupt-parent = <&pwr_irq>;
//cell 1: wake-up pin id from 0 to 5
//cell 2: IRQ_TYPE_EDGE_FALLING or IRQ_TYPE_EDGE_RISING
//cell 3: Pull config: 0 = No Pull, 1=Pull Up, 2=Pull Down
interrupts = <1 IRQ_TYPE_EDGE_RISING 0>; // WKUP2 - PA2 = ID 1
wakeup-source;
};Still not working...
[ 1.940288] stm32_pwr 50001020.pwr: Failed to request wake-up pin
[ 1.940381] genirq: Failed to request resources for Wakeup (irq 64) on irqchip stm32-pwr-irqMy working DT for 5.10 was:
gpio_keys {
compatible = "gpio-keys";
input-name = "gpio-keys";
status = "okay";
halt {
label = "Halt";
linux,code = <KEY_POWER>;
gpios = <&gpioa 2 GPIO_ACTIVE_LOW>;
status = "okay";
};
wakeup {
label = "Wakeup";
linux,code = <BTN_1>;
interrupts-extended = <&exti_pwr 56 IRQ_TYPE_EDGE_RISING>;
wakeup-source;
status = "okay";
};
};Also, documentation is blocked: https://wiki.st.com/stm32mpu/wiki/How_to_configure_PWR_Wake-up_pins
Any ideas?
