[lkml]   [2022]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Patch net] net: dsa: microchip: remove IRQF_TRIGGER_FALLING in request_threaded_irq
Hi Paolo,

On Thursday, 15 December 2022, 12:29:22 CET, Paolo Abeni wrote:
> On Tue, 2022-12-13 at 15:44 +0530, Arun Ramadoss wrote:
> > KSZ swithes used interrupts for detecting the phy link up and down.
> > During registering the interrupt handler, it used IRQF_TRIGGER_FALLING
> > flag. But this flag has to be retrieved from device tree instead of hard
> > coding in the driver,
> Out of sheer ignorance, why?

As far as I know, some IRQF_ flags should be set through the firmware
(e.g. device tree) instead hard coding them into the driver. On my
platform, I have to use IRQF_TRIGGER_LOW instead of IRQF_TRIGGER_FALLING.
If the value is hard coded into the driver, the value from the driver
will have precedence.

See also:

> > so removing the flag.
> It looks like the device tree currently lack such item, so this is
> effecivelly breaking phy linkup/linkdown?
What is "the" device tree. Do you mean the device tree for your specific
board, or the example under
The latter doesn't mention the irq at all.

BTW: In my kernel log I get the following messages:

> ksz9477-switch 0-005f: configuring for fixed/rmii link mode
> ksz9477-switch 0-005f lan0 (uninitialized): PHY [dsa-0.0:00] driver [Microchip KSZ9477] (irq=POLL)
> ksz9477-switch 0-005f: Link is Up - 100Mbps/Full - flow control off
> ksz9477-switch 0-005f lan1 (uninitialized): PHY [dsa-0.0:01] driver [Microchip KSZ9477] (irq=POLL)

Should I see something different than "irq=POLL" when an
irq line is provided in the device tree?


 \ /
  Last update: 2022-12-15 14:51    [W:0.084 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site