Gpio runtime error


#1

Jan 6 01:13:23 | gpioService[729]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs_SessionOpenHandlerFunc() 1139 | Assigning GPIO 22
Jan 6 01:13:23 | UNKNOWN[3440]/framework T=main | LE_FILENAME le_fdMonitor_Create() 672 | FD Monitor object name ‘gpioCf3Demo.gpioCf3PinComponent.le_gpioPin22’ truncated to ‘gpioCf3Demo.gpioCf3PinComponent’.
Jan 6 01:13:23 | gpioCf3Demo[3440]/gpioCf3PinComponent T=main | gpioCf3Pin.c _gpioCf3PinComponent_COMPONENT_INIT() 147 | This is sample gpioctl Legato CF3 GPIO app by using le_gpio.api
Jan 6 01:13:23 | gpioCf3Demo[3440]/gpioCf3PinComponent T=main | gpio.c DOUT1_pin_init() 24 | IO status(1-O/0-I):1
Jan 6 01:13:23 | gpioService[729]/sysfsGpio T=main | gpioSysfsUtils.c WriteSysGpioSignalAttr() 202 | Failed to write out to GPIO config /sys/class/gpio/gpio22/direction. Error Operation not permitted
Jan 6 01:13:23 | gpioCf3Demo[3440]/gpioCf3PinComponent T=main | gpio.c DOUT2_pin_init() 30 | IO status(1-O/0-I):0
Jan 6 01:13:23 | gpioCf3Demo[3440]/gpioCf3PinComponent T=main | gpio.c Dout1_pin_output() 45 | Active status :1
Jan 6 01:13:23 | gpioService[729]/sysfsGpio T=main | gpioSysfsUtils.c WriteSysGpioSignalAttr() 202 | Failed to write out to GPIO config /sys/class/gpio/gpio22/direction. Error Operation not permitted
Jan 6 01:13:23 | gpioService[729]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs_Activate() 751 | Failed to set Direction on GPIO gpio22
Jan 6 01:13:23 | gpioService[729]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs_IsActive() 805 | Attempt to check if an input is active
Jan 6 01:13:23 | gpioCf3Demo[3440]/gpioCf3PinComponent T=main | gpio.c Dout2_pin_output() 60 | Active status :0
Jan 6 01:13:23 | gpioCf3Demo[3440]/gpioCf3PinComponent T=main | gpio.c Dout1_pin_output() 45 | Active status :0
Jan 6 01:13:23 | gpioService[729]/sysfsGpio T=main | gpioSysfsUtils.c WriteSysGpioSignalAttr() 202 | Failed to write out to GPIO config /sys/class/gpio/gpio22/direction. Error Operation not permitted
Jan 6 01:13:23 | gpioService[729]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs_Deactivate() 777 | Failed to set Direction on GPIO gpio22
Jan 6 01:13:23 | gpioService[729]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs_IsActive() 805 | Attempt to check if an input is active
Jan 6 01:13:23 | gpioCf3Demo[3440]/gpioCf3PinComponent T=main | gpio.c Dout2_pin_output() 60 | Active status :0

Error

->Failed to set Direction on GPIO gpio22
->Failed to write out to GPIO config /sys/class/gpio/gpio22/direction. Error Operation not permitted

i need solution for this one.


#2

Hi,
May I know on which module you are checking. please provide the log of cm info, fwupdate query and commands tried for setting directions.


#3

module wp7608
Legato Version : 18.05,1


#4

Hi,

We have verified with legato-18.05.1 on top of Release 9, Also with Release 10.1(legato-18.06.3) and Release 9(legato-18.03.0) using WP7607 we are able to set the direction succesfully without any issues. Below are commands which we tried,
echo 22 > /sys/class/gpio/export
echo up > /sys/class/gpio/gpio22/pull
echo in > /sys/class/gpio/gpio22/direction

On top of which Release version you are using legato-18.05.1?

Below are the logs for your reference:

root@swi-mdm9x28:~# cm info
Device: WP7607
IMEI: 359779080100320
IMEISV: 4
FSN: VN737585210102
Firmware Version: SWI9X07Y_02.16.02.00 000000 jenkins 2018/04/19 19:59:02
Bootloader Version: SWI9X07Y_02.16.02.00 000000 jenkins 2018/04/19 19:59:02
MCU Version: 002.009
PRI Part Number (PN): 9907327
PRI Revision: 001.000
Carrier PRI Name: GENERIC
Carrier PRI Revision: 002.032_000
SKU: 1103511
Last Reset Cause: Power Down
Resets Count: Expected: 27 Unexpected: 1
root@swi-mdm9x28:~# legato version
18.05.1_7d52eac8b1b744886f7d15869713cc5c
root@swi-mdm9x28:~# echo 22 > /sys/class/gpio/export
root@swi-mdm9x28:~# echo up > /sys/class/gpio/gpio22/pull
root@swi-mdm9x28:~# echo in > /sys/class/gpio/gpio22/direction