Skip to contentSkip to conversation

Nagging free/reclaim gpio's

DISCUSSION Philip Balister 2 participants 3 messages Aug 30, 2010 – Aug 31, 2010 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

I've got a module that claims gpio's when it is loaded and frees them when it is unloaded. It looks like something goes wrong when I free them:

gpio_unexport: gpio144 status -22
gpio_unexport: gpio146 status -22
gpio_unexport: gpio14 status -22
gpio_unexport: gpio21 status -22
gpio_unexport: gpio22 status -22
gpio_unexport: gpio23 status -22

Then when I try to reclaim them I get this:

gpio_request: gpio-175 (sysfs) status -16
export_store: status -16
gpio_request: gpio-175 (sysfs) status -16
export_store: status -16
gpio_request: gpio-114 (sysfs) status -16
export_store: status -16
gpio_request: gpio-114 (sysfs) status -16
export_store: status -16
gpio_request: gpio-173 (sysfs) status -16
export_store: status -16
gpio_request: gpio-173 (sysfs) status -16
export_store: status -16

This has to be silly, but I can't find the problem. Everything works fine, I just would like the messages to go away :)

Philip

#1 lore raw

Hi,

Quoted 2 lines · Philip Balister

I've got a module that claims gpio's when it is loaded and frees them when it is unloaded. It looks like something goes wrong when I free

them:

Quoted 7 lines

gpio_unexport: gpio144 status -22
gpio_unexport: gpio146 status -22
gpio_unexport: gpio14 status -22
gpio_unexport: gpio21 status -22
gpio_unexport: gpio22 status -22
gpio_unexport: gpio23 status -22

this is telling you, you have entered invalid
arguments to gpio_unexport.

Quoted 16 lines

Then when I try to reclaim them I get this:

gpio_request: gpio-175 (sysfs) status -16
export_store: status -16
gpio_request: gpio-175 (sysfs) status -16
export_store: status -16
gpio_request: gpio-114 (sysfs) status -16
export_store: status -16
gpio_request: gpio-114 (sysfs) status -16
export_store: status -16
gpio_request: gpio-173 (sysfs) status -16
export_store: status -16
gpio_request: gpio-173 (sysfs) status -16
export_store: status -16

Quoted 2 lines

This has to be silly, but I can't find the problem. Everything works fine, I just would like the messages to go away :)

it's telling you that the gpio is busy, claimed by sysfs usage, so you can't claim it again.

Signature · 1 line
balbi

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hi,

Quoted 4 lines · Philip Balister
Quoted 2 lines

this is telling you, you have entered invalid
arguments to gpio_unexport.

I'm calling gpio_free, it must then be calling gpio_unexport for me ...

yes, but please always keep the list in Cc.

Signature · 1 line
balbi