From: Grant Likely <grant.likely@linaro.org>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: rob.herring@calxeda.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH v2] of: make of_get_phy_mode parse 'phy-connection-type'
Date: Sat, 16 Nov 2013 12:24:51 +0000 [thread overview]
Message-ID: <20131116122451.3F0B9C4038F@trevor.secretlab.ca> (raw)
In-Reply-To: <1384496612-28392-1-git-send-email-f.fainelli@gmail.com>
On Fri, 15 Nov 2013 06:23:32 +0000, Florian Fainelli <f.fainelli@gmail.com> wrote:
> Per the ePAPR v1.1 specification, 'phy-connection-type' is the canonical
> property name for describing an Ethernet to PHY connection type. Make
> sure that of_get_phy_mode() also attempts to parse that property and
> update the comments mentioning 'phy-mode' to also include
> 'phy-connection-type'.
>
> Acked-by: Grant Likely <grant.likely@linaro.org>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Applied, thanks
g.
> ---
> Changes since v2:
> - reworked the error condition to look nicer per Grant's suggestion
> - added Grant's Acked-by tag
> - fixed a typo in the commit message on "mentioning"
>
> drivers/of/of_net.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
> index 8f9be2e..651e249 100644
> --- a/drivers/of/of_net.c
> +++ b/drivers/of/of_net.c
> @@ -13,8 +13,8 @@
>
> /**
> * It maps 'enum phy_interface_t' found in include/linux/phy.h
> - * into the device tree binding of 'phy-mode', so that Ethernet
> - * device driver can get phy interface from device tree.
> + * into the device tree binding of 'phy-mode' or 'phy-connection-type',
> + * so that Ethernet device driver can get phy interface from device tree.
> */
> static const char *phy_modes[] = {
> [PHY_INTERFACE_MODE_NA] = "",
> @@ -36,8 +36,9 @@ static const char *phy_modes[] = {
> * of_get_phy_mode - Get phy mode for given device_node
> * @np: Pointer to the given device_node
> *
> - * The function gets phy interface string from property 'phy-mode',
> - * and return its index in phy_modes table, or errno in error case.
> + * The function gets phy interface string from property 'phy-mode' or
> + * 'phy-connection-type', and return its index in phy_modes table, or errno in
> + * error case.
> */
> int of_get_phy_mode(struct device_node *np)
> {
> @@ -46,6 +47,8 @@ int of_get_phy_mode(struct device_node *np)
>
> err = of_property_read_string(np, "phy-mode", &pm);
> if (err < 0)
> + err = of_property_read_string(np, "phy-connection-type", &pm);
> + if (err < 0)
> return err;
>
> for (i = 0; i < ARRAY_SIZE(phy_modes); i++)
> --
> 1.8.3.2
>
next prev parent reply other threads:[~2013-11-16 12:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 23:42 [PATCH] " Florian Fainelli
2013-11-14 7:47 ` Grant Likely
[not found] ` < 1384496612-28392-1-git-send-email-f.fainelli@gmail.com>
2013-11-15 6:23 ` [PATCH v2] " Florian Fainelli
2013-11-16 12:24 ` Grant Likely [this message]
2014-01-26 3:04 ` Florian Fainelli
2014-02-03 14:37 ` Grant Likely
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=20131116122451.3F0B9C4038F@trevor.secretlab.ca \
--to=grant.likely@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
/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
all inboxes | Powered by JetHome®