GPIO/DTS on x86

Hi
I have a Packard Bell iMedia S2883 with two GPIO available on the motherboard and the power led is also controllable via GPIO.
How do I define this in x86?
Of course, I can export the GPIO to sysfs. But, how do I get the correct names?
Can I create a DTS file for x86?

 gpio-465 (it87_gp31           |sysfs               ) out hi
 gpio-466 (it87_gp32           |sysfs               ) out hi
 gpio-472 (it87_gp40           |sysfs               ) out hi

Reviving this (slightly old) thread, I'm in the same situation: I need to define GPIOs so they will show up in sysfs to be used for LED triggers. As far as I can tell, x86 currently doesn't make use of DTS.

Is there a how-to or precedent for DTS on x86, or is there an alternative way to achieve our goal?

That would be ACPI, but probably not quite what you're looking for. Other than that, I remember this old project (which hopefully provides some pointers):
https://bues.ch/cms/unmaintained/btgpio.html

Thank you for your answer, but I believe you misread my/our question, which is probably my fault for posing it too vaguely.

I have here an x86 box (an I-O Data HDL4-X NAS enclosure that I plan to use with OpenWrt because, honestly, I'm familiar with it). It has two LEDs for each drive, controllable by GPIO. I mapped out the GPIOs for those LEDs already, and I can turn them on and off "manually" after exporting them. But to use them for LED triggers, specifically disk-activity, they will probably need to go into a DTS. Right?

I did understand, but that's the only pointer I have (I know, not very fitting) - and there is no DTS on x86 (might need driver changes to trigger the GPIOs directly).

1 Like

Ugh, that was indeed a pointer. So x86, by its nature, does not have DTS. What would be needed is going down a rabbit hole of writing a specific driver for the specific GPIO chip with this specific LED configuration. Yeah, I think this is not going to happen, my disks will have to do without an activity LED then. :slight_smile:

Edit: For posterity, should anyone else ever have a HDL4-x series device: The disk LEDs can be turned on and off using GPIOs, but they will show disk activity by flickering the LEDs off on their own. This perfectly achieves my goal to indicate whether the drives are awake (the turned-on LED will flicker with activity) or asleep (the turned-off LEDs will not do anything).

1 Like