About using gpio for jetson nano production module

Hello,

jetson-io.py가 production module에서는 작동 안한다는 걸 알게되었습니다.

I found out that jetson-io.py doesn’t work in production module.

Does jetson-gpio also work in production module?

If so, what should I do to configure gpio in the production module?

Thank you.

hello neuezeal,

may I know what’s the actual use-case to configure GPIO for a production module?

Hello,

This is the purpose of using a hardware device connected through gpio.

I tested audio.

Thank you.

hello neuezeal,

yes, you may still using Jetson-GPIO to configure GPIO pins.
thanks

1 Like

Hello,

You mean, Jetson-GPIO can also be used in production modules?

Thank you.

yes

1 Like

Thank you

Hello,

  1. How do I set up GPIO at the device driver level?
  2. Which method do you recommend between Jetson.GPIO and gpio setting at the device driver level?

Thank you.

hello neuezeal,

you may refer to standard APIs to control GPIOs from kernel driver side.
for example,
$L4T_Sources/r32.4.3/Linux_for_Tegra/source/public/kernel/kernel-4.9/include/linux/gpio.h

static inline int gpio_get_value(unsigned int gpio)
{
        return __gpio_get_value(gpio);
}

static inline void gpio_set_value(unsigned int gpio, int value)
{
        __gpio_set_value(gpio, value);
}

there’s an example of IMX185 camera driver.
please refer to below kernel sources of the sensor driver to call these APIs for setting reset GPIO pin.
for example,
$L4T_Sources/r32.4.3/Linux_for_Tegra/source/public/kernel/nvidia/drivers/media/i2c/imx185.c

        if (pw->reset_gpio)
                gpio_set_value(pw->reset_gpio, 0);
1 Like