mbox series

[net-next,0/2] dsa: add MT7530 GPIO support

Message ID 20210111054428.3273-1-dqfext@gmail.com (mailing list archive)
Headers show
Series dsa: add MT7530 GPIO support | expand

Message

Qingfang Deng Jan. 11, 2021, 5:44 a.m. UTC
MT7530's LED controller can be used as GPIO controller. Add support for
it.

DENG Qingfang (2):
  dt-bindings: net: dsa: add MT7530 GPIO controller binding
  drivers: net: dsa: mt7530: MT7530 optional GPIO support

 .../devicetree/bindings/net/dsa/mt7530.txt    |  6 ++
 drivers/net/dsa/mt7530.c                      | 96 +++++++++++++++++++
 drivers/net/dsa/mt7530.h                      | 20 ++++
 3 files changed, 122 insertions(+)

Comments

Vladimir Oltean Jan. 11, 2021, 1:43 p.m. UTC | #1
On Mon, Jan 11, 2021 at 01:44:26PM +0800, DENG Qingfang wrote:
> MT7530's LED controller can be used as GPIO controller. Add support for
> it.
> 
> DENG Qingfang (2):
>   dt-bindings: net: dsa: add MT7530 GPIO controller binding
>   drivers: net: dsa: mt7530: MT7530 optional GPIO support
> 
>  .../devicetree/bindings/net/dsa/mt7530.txt    |  6 ++
>  drivers/net/dsa/mt7530.c                      | 96 +++++++++++++++++++
>  drivers/net/dsa/mt7530.h                      | 20 ++++
>  3 files changed, 122 insertions(+)
> 
> -- 
> 2.25.1

Adding GPIO and LED maintainers to also have a look.
https://patchwork.kernel.org/project/netdevbpf/cover/20210111054428.3273-1-dqfext@gmail.com/
Marek Behún Jan. 11, 2021, 3:46 p.m. UTC | #2
Qingfang,

what modes does the LED support? Does it support blinking on rx/tx?
What about link status?
I'd like to know because I am still working on patches which add
ethernet PHY/switch LEDs, with transparent offloading of netdev trigger.

Marek

On Mon, 11 Jan 2021 13:44:26 +0800
DENG Qingfang <dqfext@gmail.com> wrote:

> MT7530's LED controller can be used as GPIO controller. Add support for
> it.
> 
> DENG Qingfang (2):
>   dt-bindings: net: dsa: add MT7530 GPIO controller binding
>   drivers: net: dsa: mt7530: MT7530 optional GPIO support
> 
>  .../devicetree/bindings/net/dsa/mt7530.txt    |  6 ++
>  drivers/net/dsa/mt7530.c                      | 96 +++++++++++++++++++
>  drivers/net/dsa/mt7530.h                      | 20 ++++
>  3 files changed, 122 insertions(+)
>
Qingfang Deng Jan. 12, 2021, 2:50 a.m. UTC | #3
Hi Marek,

On Mon, Jan 11, 2021 at 11:46 PM Marek Behún <kabel@kernel.org> wrote:
>
> what modes does the LED support? Does it support blinking on rx/tx?
> What about link status?

Yes. But unfortunately they cannot be controlled individually, unless
on GPIO mode.

> I'd like to know because I am still working on patches which add
> ethernet PHY/switch LEDs, with transparent offloading of netdev trigger.
>
> Marek
Bartosz Golaszewski Jan. 14, 2021, 9:36 a.m. UTC | #4
On Mon, Jan 11, 2021 at 2:43 PM Vladimir Oltean <olteanv@gmail.com> wrote:
>
> On Mon, Jan 11, 2021 at 01:44:26PM +0800, DENG Qingfang wrote:
> > MT7530's LED controller can be used as GPIO controller. Add support for
> > it.
> >
> > DENG Qingfang (2):
> >   dt-bindings: net: dsa: add MT7530 GPIO controller binding
> >   drivers: net: dsa: mt7530: MT7530 optional GPIO support
> >
> >  .../devicetree/bindings/net/dsa/mt7530.txt    |  6 ++
> >  drivers/net/dsa/mt7530.c                      | 96 +++++++++++++++++++
> >  drivers/net/dsa/mt7530.h                      | 20 ++++
> >  3 files changed, 122 insertions(+)
> >
> > --
> > 2.25.1
>
> Adding GPIO and LED maintainers to also have a look.
> https://patchwork.kernel.org/project/netdevbpf/cover/20210111054428.3273-1-dqfext@gmail.com/

Can you resend the series with GPIO maintainers in CC?

Bart
Florian Fainelli Jan. 14, 2021, 5:08 p.m. UTC | #5
On 1/11/21 6:50 PM, DENG Qingfang wrote:
> Hi Marek,
> 
> On Mon, Jan 11, 2021 at 11:46 PM Marek Behún <kabel@kernel.org> wrote:
>>
>> what modes does the LED support? Does it support blinking on rx/tx?
>> What about link status?

Just to be crystal clear here, if you configure the LEDs to be in GPIO
mode, you can defer to the leds-gpio driver for all configuration, and
you can still offload blinking of the LEDs to the hardware or does
blinking require you to use a software managed timer?