Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1601623

Summary: leds-gpio and gpio-pca953x modules not built and GPIO sysfs support disabled
Product: [Fedora] Fedora Reporter: Dominik 'Rathann' Mierzejewski <dominik>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: airlied, bskeggs, ewk, hdegoede, ichavero, itamar, jarodwilson, jglisse, john.j5live, jonathan, josef, kernel-maint, labbott, linville, mchehab, mjg59, pbrobinson, steved
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-14 22:01:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dominik 'Rathann' Mierzejewski 2018-07-16 23:05:01 UTC
Description of problem:
The leds-gpio module is missing from Fedora kernel and GPIO sysfs support is disabled.

Version-Release number of selected component (if applicable):
kernel-4.17.5-200.fc28.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. modprobe -a gpio-pca953x leds-gpio
2. egrep 'LEDS_GPIO|GPIO_SYSFS' /boot/config-4.17.5-200.fc28.x86_64
2. egrep 'LEDS_GPIO|GPIO_SYSFS|GPIO_PCA953' /boot/config-4.17.5-200.fc28.x86_64

Actual results:
modprobe: WARNING: Module gpio-pca953x not found in directory /lib/modules/4.17.5-200.fc28.x86_64
modprobe: WARNING: Module leds-gpio not found in directory /lib/modules/4.17.5-200.fc28.x86_64

# CONFIG_GPIO_SYSFS is not set
# CONFIG_GPIO_PCA953X is not set
# CONFIG_LEDS_GPIO is not set

Expected results:
Modules should be built and available. GPIO sysfs support should be built and enabled.

Additional info:
This is required to drive the LEDs in Thecus N5550 NAS box. See also: https://bugs.centos.org/view.php?id=7310 and https://bugzilla.redhat.com/show_bug.cgi?id=1595163 .

Comment 1 Dominik 'Rathann' Mierzejewski 2018-09-13 16:47:01 UTC
Still not enabled in 4.18.5-200.fc28.x86_64.

Comment 2 Dominik 'Rathann' Mierzejewski 2018-10-26 22:26:09 UTC
Ping. Still not enabled in 4.18.16-200.fc28.x86_64.

Comment 3 Dominik 'Rathann' Mierzejewski 2018-11-20 23:59:44 UTC
Still not enabled in 4.19.2-300.fc29.

Comment 4 Dominik 'Rathann' Mierzejewski 2019-01-13 21:31:02 UTC
$ egrep 'LEDS_GPIO|GPIO_SYSFS|GPIO_PCA953' /boot/config-4.19.13-300.fc29.x86_64 
# CONFIG_GPIO_SYSFS is not set
# CONFIG_GPIO_PCA953X is not set
# CONFIG_LEDS_GPIO is not set

Comment 5 Hans de Goede 2019-01-14 10:40:23 UTC
CONFIG_GPIO_SYSFS is deprecated, for commandline / script access you can install libgpiod-utils and the use commands like gpioget and gpioset, these also avoid the need to find the magic gpio-number and as such are much nicer to work with.

If you have other apps which need CONFIG_GPIO_SYSFS they really should be patched to use the new chardev + ioctls interface.

I think that enabling the other 2 options as modules is fine.

Comment 6 Dominik 'Rathann' Mierzejewski 2019-01-14 10:59:56 UTC
Thanks for the reply, Hans.

(In reply to Hans de Goede from comment #5)
> CONFIG_GPIO_SYSFS is deprecated,

OK, it looks like it was deprecated in 4.16.

> for commandline / script access you can
> install libgpiod-utils and the use commands like gpioget and gpioset, these
> also avoid the need to find the magic gpio-number and as such are much nicer
> to work with.

Thanks for the tip. I installed the package, but gpiodetect and gpioinfo give
me empty output. What am I missing? The other two modules?

> If you have other apps which need CONFIG_GPIO_SYSFS they really should be
> patched to use the new chardev + ioctls interface.
> 
> I think that enabling the other 2 options as modules is fine.

Great! Is that the only thing missing before I can interact with the LEDs
using gpio* utils?

Comment 7 Hans de Goede 2019-01-14 11:30:54 UTC
(In reply to Dominik 'Rathann' Mierzejewski from comment #6)
> Thanks for the reply, Hans.
> 
> (In reply to Hans de Goede from comment #5)
> > CONFIG_GPIO_SYSFS is deprecated,
> 
> OK, it looks like it was deprecated in 4.16.
> 
> > for commandline / script access you can
> > install libgpiod-utils and the use commands like gpioget and gpioset, these
> > also avoid the need to find the magic gpio-number and as such are much nicer
> > to work with.
> 
> Thanks for the tip. I installed the package, but gpiodetect and gpioinfo give
> me empty output. What am I missing? The other two modules?

Yes, I guess you need the CONFIG_GPIO_PCA953X module to get the GPIOs working.
CONFIG_LEDS_GPIO is only needed if you want to hookup led-triggers like disk/net
activity to the LEDs.

> > If you have other apps which need CONFIG_GPIO_SYSFS they really should be
> > patched to use the new chardev + ioctls interface.
> > 
> > I think that enabling the other 2 options as modules is fine.
> 
> Great! Is that the only thing missing before I can interact with the LEDs
> using gpio* utils?

Yes I would expect so.

Comment 8 Laura Abbott 2019-01-14 22:01:11 UTC
As Hans noted, the gpio sysfs interface is deprecated. I went ahead and enabled the other two options on rawhide. They should be picked up on stable on rebase.

Comment 9 Peter Robinson 2019-01-15 01:24:35 UTC
(In reply to Dominik 'Rathann' Mierzejewski from comment #6)
> Thanks for the reply, Hans.
> 
> (In reply to Hans de Goede from comment #5)
> > CONFIG_GPIO_SYSFS is deprecated,
> 
> OK, it looks like it was deprecated in 4.16.

For reference it was quite a bit earlier than that, if memory serves it was 4.8