Skip to contentSkip to conversation

How to use phosphor-multi-gpio-monitor for GPIOs with both edge but different behaviors

DISCUSSION Thang Nguyen OS 2 participants 2 messages Oct 28, 2022 – Nov 24, 2022

lore
Share & tools
lore
#0 lore raw

Hi,

Do you know how to support GPIOs with both edges but different behaviors? For example, I have a GPIO named OverTemp and I would like to support like below:

- OverTemp = 1: power OFF the Host to protect the hardware. And lock the power control.

- OverTemp = 0: unlock the power control.

Although phosphor-multi-gpio-monitor support BOTH attribute, I have not found any way to check current value of GPIO to do the appropriate behavior. I can't also specify 2 entries in phosphor-multi-gpio-monitor.json with RISING and FALLING respectively as the first one will block the GPIO line. So, to support this behavior I can just specify the GPIO as gpio-keys in device tree and use phosphor-gpio-monitor to support different edges, with is not expected.

It is helpful if you have any idea to use phosphor-multi-gpio-monitor to support or any idea on changing phosphor-multi-gpio-monitor to support this.

Thanks,

Thang Q. Nguyen -

#1 lore raw

Hi,
Is there any comment on this issue?

Thanks,
Thang Q. Nguyen

Quoted 20 lines · Thang Nguyen OS

Hi,

Do you know how to support GPIOs with both edges but different behaviors? For example, I have a GPIO named OverTemp and I would like to support like below:

- OverTemp = 1: power OFF the Host to protect the hardware. And lock the power control.

- OverTemp = 0: unlock the power control.

Although phosphor-multi-gpio-monitor support BOTH attribute, I have not found any way to check current value of GPIO to do the appropriate behavior. I can't also specify 2 entries in phosphor-multi-gpio-monitor.json with RISING and FALLING respectively as the first one will block the GPIO line. So, to support this behavior I can just specify the GPIO as gpio-keys in device tree and use phosphor-gpio-monitor to support different edges, with is not expected.

It is helpful if you have any idea to use phosphor-multi-gpio-monitor to support or any idea on changing phosphor-multi-gpio-monitor to support this.

Thanks,

Thang Q. Nguyen -