* question about Network Space v2 LED driver
@ 2020-09-17 22:52 Marek Behun
2020-09-18 13:42 ` Simon Guinot
0 siblings, 1 reply; 6+ messages in thread
From: Marek Behun @ 2020-09-17 22:52 UTC (permalink / raw)
To: Simon Guinot, Simon Guinot, Vincent Donnefort, Linus Walleij
Cc: Thomas Petazzoni, linux-leds
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: question about Network Space v2 LED driver
2020-09-17 22:52 question about Network Space v2 LED driver Marek Behun
@ 2020-09-18 13:42 ` Simon Guinot
2020-09-18 17:43 ` Marek Behun
0 siblings, 1 reply; 6+ messages in thread
From: Simon Guinot @ 2020-09-18 13:42 UTC (permalink / raw)
To: Marek Behun
Cc: Simon Guinot, Vincent Donnefort, Linus Walleij, Thomas Petazzoni,
linux-leds
[-- Attachment #1: Type: text/plain, Size: 1775 bytes --]
On Fri, Sep 18, 2020 at 12:52:58AM +0200, Marek Behun wrote:
> Hi,
Hi Marek,
>
> 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.
It sounds like a great idea.
>
> 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.
>
> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: question about Network Space v2 LED driver
2020-09-18 13:42 ` Simon Guinot
@ 2020-09-18 17:43 ` Marek Behun
2020-09-21 14:15 ` Simon Guinot
0 siblings, 1 reply; 6+ messages in thread
From: Marek Behun @ 2020-09-18 17:43 UTC (permalink / raw)
To: Simon Guinot
Cc: Simon Guinot, Vincent Donnefort, Linus Walleij, Thomas Petazzoni,
linux-leds
On Fri, 18 Sep 2020 15:42:01 +0200
Simon Guinot <simon.guinot@sequanux.org> wrote:
> On Fri, Sep 18, 2020 at 12:52:58AM +0200, Marek Behun wrote:
> > Hi,
>
> Hi Marek,
>
> >
> > 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.
>
> It sounds like a great idea.
>
> >
> > 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.
>
> >
> > 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
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: question about Network Space v2 LED driver
2020-09-18 17:43 ` Marek Behun
@ 2020-09-21 14:15 ` Simon Guinot
2020-09-21 14:47 ` Marek Behun
0 siblings, 1 reply; 6+ messages in thread
From: Simon Guinot @ 2020-09-21 14:15 UTC (permalink / raw)
To: Marek Behun
Cc: Simon Guinot, Vincent Donnefort, Linus Walleij, Thomas Petazzoni,
linux-leds
[-- Attachment #1: Type: text/plain, Size: 3338 bytes --]
On Fri, Sep 18, 2020 at 07:43:15PM +0200, Marek Behun wrote:
> On Fri, 18 Sep 2020 15:42:01 +0200
> Simon Guinot <simon.guinot@sequanux.org> wrote:
>
> > On Fri, Sep 18, 2020 at 12:52:58AM +0200, Marek Behun wrote:
> > > Hi,
> >
> > Hi Marek,
> >
> > >
> > > 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.
> >
> > It sounds like a great idea.
> >
> > >
> > > 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.
> >
> > >
> > > 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
>
> 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.
>
> 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?
Yes I'll review and test your patches.
Simon
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: question about Network Space v2 LED driver
2020-09-21 14:15 ` Simon Guinot
@ 2020-09-21 14:47 ` Marek Behun
2020-09-21 15:10 ` Simon Guinot
0 siblings, 1 reply; 6+ messages in thread
From: Marek Behun @ 2020-09-21 14:47 UTC (permalink / raw)
To: Simon Guinot
Cc: Simon Guinot, Vincent Donnefort, Linus Walleij, Thomas Petazzoni,
linux-leds
On Mon, 21 Sep 2020 16:15:40 +0200
Simon Guinot <simon.guinot@sequanux.org> wrote:
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: question about Network Space v2 LED driver
2020-09-21 14:47 ` Marek Behun
@ 2020-09-21 15:10 ` Simon Guinot
0 siblings, 0 replies; 6+ messages in thread
From: Simon Guinot @ 2020-09-21 15:10 UTC (permalink / raw)
To: Marek Behun
Cc: Simon Guinot, Vincent Donnefort, Linus Walleij, Thomas Petazzoni,
linux-leds
[-- Attachment #1: Type: text/plain, Size: 977 bytes --]
On Mon, Sep 21, 2020 at 04:47:43PM +0200, Marek Behun wrote:
> On Mon, 21 Sep 2020 16:15:40 +0200
> Simon Guinot <simon.guinot@sequanux.org> wrote:
>
> >
> > 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.dts
arch/arm/boot/dts/kirkwood-d2net.dts
arch/arm/boot/dts/kirkwood-is2.dts
arch/arm/boot/dts/kirkwood-ns2.dts
arch/arm/boot/dts/kirkwood-ns2max.dts
arch/arm/boot/dts/kirkwood-ns2mini.dts
>
> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-09-21 15:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-17 22:52 question about Network Space v2 LED driver Marek Behun
2020-09-18 13:42 ` Simon Guinot
2020-09-18 17:43 ` Marek Behun
2020-09-21 14:15 ` Simon Guinot
2020-09-21 14:47 ` Marek Behun
2020-09-21 15:10 ` Simon Guinot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).