Skip to contentSkip to conversation

gpiolib and pinmux interaction

DISCUSSION Fried, Ramon 1 participant 2 messages Jul 30, 2019 5 messages not in the archive GPIO

lore
Share & tools
lore
#5 lore raw
In reply to a message not in the archive
Quoted 14 lines · Ramon Fried
Quoted 7 lines · Stefan Wahren

Hi Ramon,

Am 17.03.19 um 10:09 schrieb Ramon Fried:

Quoted 3 lines

Hi Linus, Stefan,

Great patch, If you need help testing it on other HW tell me.

yes, please. I didn't get what kind of hardware you are using.

Hi.

custom mips based SOC with sta2x11 gpio driver & proprietary pin muxing ip allowing every pin to be muxed as gpio.

Quoted 2 lines

Regards
Stefan

Hey Linus, Stefan,

I'm not sure where are we standing with the patch.
I didn't find it merged, so I just took it and tested it. (It took my a while, hehe) It's working, but not as I would expect, instead of marking the gpio as used,
it adds [kernel] flag. Which is OK, but I think it's clearer to also make the "used" column. (see below)

What do you think ?

Thanks,

Ramon.

See below:

# gpioinfo
gpiochip1 - 23 lines:
        line   0:      unnamed       unused   input  active-high
        line   1:      unnamed       unused   input  active-high
        line   2:      unnamed       unused   input  active-high
        line   3:      unnamed       unused   input  active-high
        line   4:      unnamed       unused   input  active-high
        line   5:      unnamed       unused   input  active-high
        line   6:      unnamed       unused   input  active-high
        line   7:      unnamed       unused   input  active-high
        line   8:      unnamed       unused   input  active-high [kernel]
        line   9:      unnamed       unused   input  active-high [kernel]
        line  10:      unnamed       unused   input  active-high [kernel]
        line  11:      unnamed       unused   input  active-high [kernel]
        line  12:      unnamed       unused   input  active-high
        line  13:      unnamed       unused   input  active-high
#6 lore raw
Quoted 32 lines · Ramon
Quoted 14 lines · Ramon Fried
Quoted 7 lines · Stefan Wahren

Hi Ramon,

Am 17.03.19 um 10:09 schrieb Ramon Fried:

Quoted 3 lines

Hi Linus, Stefan,

Great patch, If you need help testing it on other HW tell me.

yes, please. I didn't get what kind of hardware you are using.

Hi.

custom mips based SOC with sta2x11 gpio driver & proprietary pin muxing ip allowing every pin to be muxed as gpio.

Quoted 2 lines

Regards
Stefan

Hey Linus, Stefan,

I'm not sure where are we standing with the patch.
I didn't find it merged, so I just took it and tested it. (It took my a while, hehe) It's working, but not as I would expect, instead of marking the gpio as used,
it adds [kernel] flag. Which is OK, but I think it's clearer to also make the "used" column. (see below)

What do you think ?

Thanks,

Ramon.

See below:

Quoted 17 lines
# gpioinfo
gpiochip1 - 23 lines:
        line   0:      unnamed       unused   input  active-high
        line   1:      unnamed       unused   input  active-high
        line   2:      unnamed       unused   input  active-high
        line   3:      unnamed       unused   input  active-high
        line   4:      unnamed       unused   input  active-high
        line   5:      unnamed       unused   input  active-high
        line   6:      unnamed       unused   input  active-high
        line   7:      unnamed       unused   input  active-high
        line   8:      unnamed       unused   input  active-high [kernel]
        line   9:      unnamed       unused   input  active-high [kernel]
        line  10:      unnamed       unused   input  active-high [kernel]
        line  11:      unnamed       unused   input  active-high [kernel]
        line  12:      unnamed       unused   input  active-high
        line  13:      unnamed       unused   input  active-high

Adding Bartosz.
Turns out I was running and old version of libgpiod, in current version it's printed "[used] instead of [kernel]. The patch from Stefan is perfectly fine from my standpoint, but the output of gpioinfo can be improved,

I'll post a patch to LIBGPIOD.

Thanks.
Ramon