From: Andrew Lunn <andrew@lunn.ch>
To: Divya Koppera <Divya.Koppera@microchip.com>
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
kuba@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, UNGLinuxDriver@microchip.com
Subject: Re: [PATCH net-next] net: phy: micrel: Adding interrupt support for Link up/Link down in LAN8814 Quad phy
Date: Tue, 21 Dec 2021 10:00:49 +0100 [thread overview]
Message-ID: <YcGXwQ63DFzdpSoj@lunn.ch> (raw)
In-Reply-To: <20211221070502.14811-1-Divya.Koppera@microchip.com>
On Tue, Dec 21, 2021 at 12:35:02PM +0530, Divya Koppera wrote:
> This patch add support for Link up or Link down
> interrupt support in LAN8814 Quad phy.
>
> Signed-off-by: Divya Koppera <Divya.Koppera@microchip.com>
> ---
> drivers/net/phy/micrel.c | 71 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 71 insertions(+)
>
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index 44a24b99c894..46931020ef84 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -66,6 +66,23 @@
> #define KSZ8081_LMD_SHORT_INDICATOR BIT(12)
> #define KSZ8081_LMD_DELTA_TIME_MASK GENMASK(8, 0)
>
> +/* Lan8814 general Interrupt control/status reg in GPHY specific block. */
> +#define LAN8814_INTC 0x18
> +#define LAN8814_INTC_LINK_DOWN BIT(2)
> +#define LAN8814_INTC_LINK_UP BIT(0)
> +#define LAN8814_INTC_LINK (LAN8814_INTC_LINK_UP |\
> + LAN8814_INTC_LINK_DOWN)
> +
> +#define LAN8814_INTS 0x1B
> +#define LAN8814_INTS_LINK_DOWN BIT(2)
> +#define LAN8814_INTS_LINK_UP BIT(0)
> +#define LAN8814_INTS_LINK (LAN8814_INTS_LINK_UP |\
I've never seen an interrupt controller where the interrupt control
bits and the interrupt status bits are different. So just define the
two interesting bits as LAN8814_INT_LINK_DOWN and LAN8814_INT_LINK_UP
and share them across the two registers.
Otherwise this looks good.
Andrew
prev parent reply other threads:[~2021-12-21 9:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-21 7:05 [PATCH net-next] net: phy: micrel: Adding interrupt support for Link up/Link down in LAN8814 Quad phy Divya Koppera
2021-12-21 9:00 ` Andrew Lunn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YcGXwQ63DFzdpSoj@lunn.ch \
--to=andrew@lunn.ch \
--cc=Divya.Koppera@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox