From: Andrew Lunn <andrew@lunn.ch>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
f.fainelli@gmail.com, mark.rutland@arm.com, robh+dt@kernel.org,
davem@davemloft.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/7] net: phy: icplus: allow configuring the interrupt function on IP101GR
Date: Sun, 18 Nov 2018 18:13:40 +0100 [thread overview]
Message-ID: <20181118171340.GG5591@lunn.ch> (raw)
In-Reply-To: <20181117182007.14791-8-martin.blumenstingl@googlemail.com>
Hi Martin
> +static int ip101a_g_probe(struct phy_device *phydev)
> +{
> + struct device *dev = &phydev->mdio.dev;
> + struct ip101a_g_phy_priv *priv;
> +
> + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> + if (!priv)
> + return -ENOMEM;
> +
> + if (device_property_read_bool(dev, "icplus,select-rx-error"))
> + priv->sel_intr32 = IP101GR_SEL_INTR32_RXER;
> + else if (device_property_read_bool(dev, "icplus,select-interrupt"))
> + priv->sel_intr32 = IP101GR_SEL_INTR32_INTR;
> + else
> + priv->sel_intr32 = IP101GR_SEL_INTR32_KEEP;
It would be good to return -EINVAL if both properties are found.
This looks good otherwise.
Andrew
next prev parent reply other threads:[~2018-11-18 17:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-17 18:20 [PATCH 0/7] IP101GR: devicetree based configuration of SEL_INTR32 Martin Blumenstingl
2018-11-17 18:20 ` [PATCH 1/7] dt-bindings: vendor-prefix: add prefix for IC Plus Corp Martin Blumenstingl
2018-11-17 18:20 ` [PATCH 2/7] dt-bindings: net: phy: add bindings for the IC Plus Corp. IP101A/G PHYs Martin Blumenstingl
2018-11-18 17:03 ` Andrew Lunn
2018-11-18 17:29 ` Martin Blumenstingl
2018-11-17 18:20 ` [PATCH 3/7] net: phy: icplus: keep all ip101a_g functions together Martin Blumenstingl
2018-11-18 17:04 ` Andrew Lunn
2018-11-17 18:20 ` [PATCH 4/7] net: phy: icplus: use the BIT macro where possible Martin Blumenstingl
2018-11-18 17:04 ` Andrew Lunn
2018-11-17 18:20 ` [PATCH 5/7] net: phy: icplus: rename IP101A_G_NO_IRQ to IP101A_G_IRQ_ALL_MASK Martin Blumenstingl
2018-11-18 17:06 ` Andrew Lunn
2018-11-17 18:20 ` [PATCH 6/7] net: phy: icplus: implement .did_interrupt for IP101A/G Martin Blumenstingl
2018-11-18 17:09 ` Andrew Lunn
2018-11-17 18:20 ` [PATCH 7/7] net: phy: icplus: allow configuring the interrupt function on IP101GR Martin Blumenstingl
2018-11-18 17:13 ` Andrew Lunn [this message]
2018-11-18 17:30 ` Martin Blumenstingl
2018-11-18 17:45 ` Andrew Lunn
2018-11-18 21:25 ` Martin Blumenstingl
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=20181118171340.GG5591@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).