Re: Registering IRQ for MT7530 internal PHYs
From: Andrew Lunn
Date: Wed Dec 30 2020 - 10:12:30 EST
> > +static void mt7530_irq_bus_lock(struct irq_data *d)
> > +{
> > + struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
> > +
> > + mutex_lock(&priv->reg_mutex);
>
> Are you always guaranteed to be in a thread context? I guess that
> is the case, given that you request a threaded interrupt, but
> it would be worth documenting.
Hi Marc
These Ethernet switches are often connected by MDIO, SPI or I2C busses
to the SoC. So in order to access switch registers over these busses,
sleeping is required. So yes, threaded interrupts are required.
Andrew