[SOLVED] Gpio_issues: Error Operation not permitted


#1

I’m triyng to activate my gpio in pin 22 like in the demo of the sample App “PowerLed”
but I’m getting this error

Nov 29 11:42:52 swi-mdm9x28-wp user.err kernel: [10237.486788] gpio-9 (sysfs): _gpiod_direction_output_raw: tried to set a GPIO tied to an IRQ as output
Nov 29 11:42:52 swi-mdm9x28-wp user.emerg Legato: *EMR* | gpioService[1399]/sysfsGpio T=main | gpioSysfsUtils.c WriteSysGpioSignalAttr() 202 | Failed to write out to GPIO config /sys/class/gpio/gpio22/direction. Error Operation not permitted
Nov 29 11:42:52 swi-mdm9x28-wp user.err kernel: [10237.535876] gpio-9 (sysfs): _gpiod_direction_output_raw: tried to set a GPIO tied to an IRQ as output
Nov 29 11:42:52 swi-mdm9x28-wp user.emerg Legato: *EMR* | gpioService[1399]/sysfsGpio T=main | gpioSysfsUtils.c WriteSysGpioSignalAttr() 202 | Failed to write out to GPIO config /sys/class/gpio/gpio22/direction. Error Operation not permitted
Nov 29 11:42:52 swi-mdm9x28-wp user.err Legato: =ERR= | gpioService[1399]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs_Activate() 751 | Failed to set Direction on GPIO gpio22
Nov 29 11:42:52 swi-mdm9x28-wp user.emerg Legato: *EMR* | gpioService[1399]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs_SetChangeCallback() 596 | Only one change handler can be registered
Nov 29 11:42:52 swi-mdm9x28-wp user.info Legato:  INFO | gpioService[1399]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs_SessionCloseHandlerFunc() 1178 | Releasing GPIO 22



#2

Can you share your code?