From: Andrew Lunn <andrew@lunn•ch>
To: Maxime Chevallier <maxime.chevallier@bootlin•com>
Cc: davem@davemloft•net, Rob Herring <robh+dt@kernel•org>,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org,
devicetree@vger•kernel.org, thomas.petazzoni@bootlin•com,
Florian Fainelli <f.fainelli@gmail•com>,
Heiner Kallweit <hkallweit1@gmail•com>,
Russell King <linux@armlinux•org.uk>,
linux-arm-kernel@lists•infradead.org,
Richard Cochran <richardcochran@gmail•com>,
Horatiu.Vultur@microchip•com, Allan.Nielsen@microchip•com,
UNGLinuxDriver@microchip•com
Subject: Re: [PATCH net-next 4/6] net: phy: Add support for inband extensions
Date: Thu, 19 May 2022 16:28:13 +0200 [thread overview]
Message-ID: <YoZT/QMLiWVVctKx@lunn.ch> (raw)
In-Reply-To: <20220519135647.465653-5-maxime.chevallier@bootlin.com>
> +static int phy_set_inband_ext(struct phy_device *phydev, u32 mask, u32 ext)
> +{
> +/*
> + * TODO : Doc
> + */
> +enum {
> + __PHY_INBAND_EXT_PCH = 0,
> +};
I'm not so happy with this API passing masks and values, when you are
actually dealing with a feature which is a boolean, exists, does not
exist.
> +int phy_inband_ext_enable(struct phy_device *phydev, u32 ext);
> +int phy_inband_ext_disable(struct phy_device *phydev, u32 ext);
I would prefer enum phy_inband_ext ext;
phy_inband_ext_set_available(struct phy_device *phydev, enum phy_inband_ext ext);
and add
phy_inband_ext_set_unavailable(struct phy_device *phydev, enum phy_inband_ext ext);
Internally you can then turn these into operations on a u32.
Andrew
next prev parent reply other threads:[~2022-05-19 14:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-19 13:56 [PATCH net-next 0/6] net: Introduce Ethernet Inband Extensions Maxime Chevallier
2022-05-19 13:56 ` [PATCH net-next 1/6] net: phy: Introduce QUSGMII PHY mode Maxime Chevallier
2022-05-19 13:56 ` [PATCH net-next 2/6] dt-bindings: net: ethernet-controller: add QUSGMII mode Maxime Chevallier
2022-06-01 21:10 ` Rob Herring
2022-05-19 13:56 ` [PATCH net-next 3/6] net: lan966x: Add QUSGMII support for lan966x Maxime Chevallier
2022-05-19 14:26 ` Russell King (Oracle)
2022-07-27 13:48 ` Maxime Chevallier
2022-05-19 13:56 ` [PATCH net-next 4/6] net: phy: Add support for inband extensions Maxime Chevallier
2022-05-19 14:10 ` Andrew Lunn
2022-05-19 14:28 ` Andrew Lunn [this message]
2022-05-19 13:56 ` [PATCH net-next 5/6] net: lan966x: Allow using PCH extension for PTP Maxime Chevallier
2022-05-19 13:56 ` [PATCH net-next 6/6] net: phy: micrel: Add QUSGMII support and PCH extension Maxime Chevallier
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=YoZT/QMLiWVVctKx@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=Allan.Nielsen@microchip$(echo .)com \
--cc=Horatiu.Vultur@microchip$(echo .)com \
--cc=UNGLinuxDriver@microchip$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=devicetree@vger$(echo .)kernel.org \
--cc=f.fainelli@gmail$(echo .)com \
--cc=hkallweit1@gmail$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=maxime.chevallier@bootlin$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=richardcochran@gmail$(echo .)com \
--cc=robh+dt@kernel$(echo .)org \
--cc=thomas.petazzoni@bootlin$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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