configure GPIO as input in imx8mp

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

configure GPIO as input in imx8mp

2,036 Views
DEEPIKA19
Contributor I

Hi team

I would like to use the GPIO5_IO25 as a input pin in our design. By default when exported from sysfs I am getting the following value.

 

root@root:/sys/class/gpio/gpio153# cat direction

in

root@root:/sys/class/gpio/gpio153# cat value

0

 

The GPIO5_IO05 is connected to a 10k pullup but the value is 0. Please could someone suggest me on how to debug this. Should any dts changes be added for this?

 

Regards,

Deepika

0 Kudos
Reply
5 Replies

2,018 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @DEEPIKA19,

In the case of the GPIO5_IO25, it should be mentioned that when a GPIO is exported in the sysfs, by default, the direction of the GPIO is set as "input," and the value is set to "zero." The processor itself drives the voltage level of that particular GPIO.

 

For the GPIO5_IO05, please confirm the voltage at the processor side of the GPIO5_IO05 before and after exporting the GPIO. 

And also, please confirm if the GPIO5_IO05 is not used in the device tree by any other peripheral.

 

Thanks & Regards,
Dhruvit.

0 Kudos
Reply

1,974 Views
DEEPIKA19
Contributor I

hi @Dhruvit ,

Thanks for your reply.

 

Regards,

Deepika

0 Kudos
Reply

1,926 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @DEEPIKA19 

If this issue is resolved, then Can I mark this case to close state?

Thanks & Regards

Dhruvit Vasavda

0 Kudos
Reply

1,916 Views
DEEPIKA19
Contributor I

hi @Dhruvit ,

The issue is not resolved.

I tried to add device_init_wakeup(&client->dev, 1) as suggested but i am still facing the the same issue.

Regards,

Deepika

0 Kudos
Reply

1,895 Views
DEEPIKA19
Contributor I

Thanks for your support @Dhruvit ,

The issues is resolved making driver change in reference with similar touch drivers .

 

Regards,

Deepika

0 Kudos
Reply