question about Network Space v2 LED driver
Hi,
the leds-ns2 kernel driver has allows 3 modes for a LED:
OFF, ON and blinking on SATA activity
This third mode is activated via another sysfs file in the LED device sysfs directory: /sys/class/leds/<LED>/sata.
Since we now support LED private HW triggers, it would be better if this was rewritten to use this new API.
The question is how many people use this mode and may complain if we change this sysfs ABI?
Another question is whether the LED supports another HW blinking mode, or just SATA? How is this wired on the board?
Marek
Quoted 1 line · Marek Behun
Hi,
Hi Marek,
Quoted 9 lines
the leds-ns2 kernel driver has allows 3 modes for a LED:
OFF, ON and blinking on SATA activityThis third mode is activated via another sysfs file in the LED device sysfs directory: /sys/class/leds/<LED>/sata.
Since we now support LED private HW triggers, it would be better if this was rewritten to use this new API.
It sounds like a great idea.
Quoted 3 lines
The question is how many people use this mode and may complain if we change this sysfs ABI?
Not a lot IMHO. This LED devices are found in some LaCie/Seagate NAS. Most of them, such as the Seagate NAS 4-Bay (Marvell Armada 370 SoC) are supported by the Debian distribution. For the users I have been in contact with, I am pretty confident they should be able to deal with this changes. They already dealt with worse.
Another user is the Seagate NAS distribution. And this user will be happy to switch to the new ABI.
Quoted 3 lines
Another question is whether the LED supports another HW blinking mode, or just SATA? How is this wired on the board?
Three different LED modes are available: off, on and SATA activity blinking. The LED modes are controlled through two GPIOs (command and slow): each combination of values for the command/slow GPIOs corresponds to a LED mode.
For an example, have a look at the leds-ns2 DT node in the armada-370-seagate-nas-4bay.dts file.
The only hardware blinking mechanism for this LED device is SATA. Basically the SATA blinking signal is built from the SATA pin activity of the HDD. This signal is a little bit reworked by some electronic components in order to produce a blinking rate OK for the human eye.
Hope this helps.
Simon
Quoted 42 lines · On Fri, 18 Sep 2020 15:42:01 +0200 Simon Guinot <[email protected]>…
Quoted 1 line · Marek Behun
Hi,
Hi Marek,
Quoted 9 lines
the leds-ns2 kernel driver has allows 3 modes for a LED:
OFF, ON and blinking on SATA activityThis third mode is activated via another sysfs file in the LED device sysfs directory: /sys/class/leds/<LED>/sata.
Since we now support LED private HW triggers, it would be better if this was rewritten to use this new API.
It sounds like a great idea.
Quoted 3 lines
The question is how many people use this mode and may complain if we change this sysfs ABI?
Not a lot IMHO. This LED devices are found in some LaCie/Seagate NAS. Most of them, such as the Seagate NAS 4-Bay (Marvell Armada 370 SoC) are supported by the Debian distribution. For the users I have been in contact with, I am pretty confident they should be able to deal with this changes. They already dealt with worse.
Another user is the Seagate NAS distribution. And this user will be happy to switch to the new ABI.
Quoted 3 lines
Another question is whether the LED supports another HW blinking mode, or just SATA? How is this wired on the board?
Three different LED modes are available: off, on and SATA activity blinking. The LED modes are controlled through two GPIOs (command and slow): each combination of values for the command/slow GPIOs corresponds to a LED mode.
For an example, have a look at the leds-ns2 DT node in the
armada-370-seagate-nas-4bay.dtsfile.
Quoted 8 lines
The only hardware blinking mechanism for this LED device is SATA. Basically the SATA blinking signal is built from the SATA pin activity of the HDD. This signal is a little bit reworked by some electronic components in order to produce a blinking rate OK for the human eye.
Hope this helps.
Simon
I apologize, I accidentaly sent the question from my private e-mail :)
Simon, thanks for the info.
Another question: Is there only one disk on this device?
The reason why I am asking is this:
We already have disk-activity trigger. I would like to implement a generic LED trigger offloading API, so that if user chooses disk-activity and the LED can offload that to hardware, it wil.
But the disk-activity trigger blinks the LED on activity of any disk, you can't choose one as in the netdev trigger.
If it is possible to have only one disk on that device (which is improbable if there are USB ports) than implementing offloading will be trivial.
If not, than we would need to allow disk-activity trigger to select the disk as well. This is probably good anyway.
Are you willing to work on this with me? At least reviewing and testing patches?
Are you anywhere on IRC or another real-time chat, XMPP for example?
Thanks.
Marek
Quoted 52 lines · Marek Behun
Quoted 49 lines · On Fri, 18 Sep 2020 15:42:01 +0200 Simon Guinot <[email protected]>…
Quoted 1 line · Marek Behun
Hi,
Hi Marek,
Quoted 9 lines
the leds-ns2 kernel driver has allows 3 modes for a LED:
OFF, ON and blinking on SATA activityThis third mode is activated via another sysfs file in the LED device sysfs directory: /sys/class/leds/<LED>/sata.
Since we now support LED private HW triggers, it would be better if this was rewritten to use this new API.
It sounds like a great idea.
Quoted 3 lines
The question is how many people use this mode and may complain if we change this sysfs ABI?
Not a lot IMHO. This LED devices are found in some LaCie/Seagate NAS. Most of them, such as the Seagate NAS 4-Bay (Marvell Armada 370 SoC) are supported by the Debian distribution. For the users I have been in contact with, I am pretty confident they should be able to deal with this changes. They already dealt with worse.
Another user is the Seagate NAS distribution. And this user will be happy to switch to the new ABI.
Quoted 3 lines
Another question is whether the LED supports another HW blinking mode, or just SATA? How is this wired on the board?
Three different LED modes are available: off, on and SATA activity blinking. The LED modes are controlled through two GPIOs (command and slow): each combination of values for the command/slow GPIOs corresponds to a LED mode.
For an example, have a look at the leds-ns2 DT node in the
armada-370-seagate-nas-4bay.dtsfile.The only hardware blinking mechanism for this LED device is SATA. Basically the SATA blinking signal is built from the SATA pin activity of the HDD. This signal is a little bit reworked by some electronic components in order to produce a blinking rate OK for the human eye.
Hope this helps.
Quoted 7 lines
Quoted 1 line
Simon
I apologize, I accidentaly sent the question from my private e-mail :)
Simon, thanks for the info.
Another question: Is there only one disk on this device?
There are several NAS devices using the leds-ns2 driver. On most of them the activity is wired to a single disk. But on some (such as the Network Space v2 Max), the activity is wired to two disks.
Quoted 13 lines
The reason why I am asking is this:
We already have disk-activity trigger. I would like to implement a generic LED trigger offloading API, so that if user chooses disk-activity and the LED can offload that to hardware, it wil.But the disk-activity trigger blinks the LED on activity of any disk, you can't choose one as in the netdev trigger.
If it is possible to have only one disk on that device (which is improbable if there are USB ports) than implementing offloading will be trivial.
Quoted 5 lines
If not, than we would need to allow disk-activity trigger to select the disk as well. This is probably good anyway.
Are you willing to work on this with me? At least reviewing and testing patches?
Yes I'll review and test your patches.
Simon
Quoted 5 lines · On Mon, 21 Sep 2020 16:15:40 +0200 Simon Guinot <[email protected]>…
There are several NAS devices using the leds-ns2 driver. On most of them the activity is wired to a single disk. But on some (such as the Network Space v2 Max), the activity is wired to two disks.
Are they implemented via device-tree or platform-data?
If we are going to implement the disk trigger offloading, we will need to use the trigger-sources property so that the driver will know which disks can be offloaded.
Marek
Quoted 10 lines · Marek Behun
Quoted 5 lines · On Mon, 21 Sep 2020 16:15:40 +0200 Simon Guinot <[email protected]>…
There are several NAS devices using the leds-ns2 driver. On most of them the activity is wired to a single disk. But on some (such as the Network Space v2 Max), the activity is wired to two disks.
Are they implemented via device-tree or platform-data?
Everything is provided via DT:
arch/arm/boot/dts/armada-370-seagate-nas-4bay.dtsarch/arm/boot/dts/kirkwood-d2net.dtsarch/arm/boot/dts/kirkwood-is2.dtsarch/arm/boot/dts/kirkwood-ns2.dtsarch/arm/boot/dts/kirkwood-ns2max.dtsarch/arm/boot/dts/kirkwood-ns2mini.dts
Quoted 4 lines
If we are going to implement the disk trigger offloading, we will need to use the trigger-sources property so that the driver will know which disks can be offloaded.
Yes, we will need to add this property to the "ns2-leds" DT nodes.
Simon