netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vikas Singh <vikas.singh@puresoftware.com>
To: andrew@lunn.ch, f.fainelli@gmail.com, hkallweit1@gmail.com,
	linux@armlinux.org.uk, netdev@vger.kernel.org
Cc: calvin.johnson@oss.nxp.com, kuldip.dwivedi@puresoftware.com,
	madalin.bucur@oss.nxp.com, vikas.singh@nxp.com,
	Vikas Singh <vikas.singh@puresoftware.com>
Subject: [PATCH 2/2] net: phy: Associate device node with fixed PHY
Date: Wed, 22 Jul 2020 17:02:27 +0530	[thread overview]
Message-ID: <1595417547-18957-3-git-send-email-vikas.singh@puresoftware.com> (raw)
In-Reply-To: <1595417547-18957-1-git-send-email-vikas.singh@puresoftware.com>

This patch will extend "struct fixed_phy_status" by adding new
"struct device *dev" member entry in it.
This change will help to handle the fixed phy registration in
ACPI probe case for fwnodes.

Signed-off-by: Vikas Singh <vikas.singh@puresoftware.com>
---
 drivers/net/phy/fixed_phy.c | 2 ++
 include/linux/phy_fixed.h   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index c4641b1..011c033 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -267,6 +267,8 @@ static struct phy_device *__fixed_phy_register(unsigned int irq,
 		phy->duplex = status->duplex;
 		phy->pause = status->pause;
 		phy->asym_pause = status->asym_pause;
+		if (!np)
+			phy->mdio.dev.fwnode = status->dev->fwnode;
 	}
 
 	of_node_get(np);
diff --git a/include/linux/phy_fixed.h b/include/linux/phy_fixed.h
index 52bc8e4..155fea6 100644
--- a/include/linux/phy_fixed.h
+++ b/include/linux/phy_fixed.h
@@ -8,6 +8,8 @@ struct fixed_phy_status {
 	int duplex;
 	int pause;
 	int asym_pause;
+	/* Associated device node */
+	struct device *dev;
 };
 
 struct device_node;
-- 
2.7.4


-- 




*Disclaimer* -The information transmitted is intended solely for the 
individual
or entity to which it is addressed and may contain confidential 
and/or
privileged material. Any review, re-transmission, dissemination or 
other use of
or taking action in reliance upon this information by persons 
or entities other
than the intended recipient is prohibited. If you have 
received this email in
error please contact the sender and delete the 
material from any computer. In
such instances you are further prohibited 
from reproducing, disclosing,
distributing or taking any action in reliance 
on it.As a recipient of this email,
you are responsible for screening its 
contents and the contents of any
attachments for the presence of viruses. 
No liability is accepted for any
damages caused by any virus transmitted by 
this email.

  parent reply	other threads:[~2020-07-22 11:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22 11:32 [PATCH 0/2] Add fwnode helper functions to MDIO bus driver Vikas Singh
2020-07-22 11:32 ` [PATCH 1/2] net: phy: Add fwnode helper functions Vikas Singh
2020-07-22 11:32 ` Vikas Singh [this message]
2020-07-22 12:55 ` [PATCH 0/2] Add fwnode helper functions to MDIO bus driver Andrew Lunn
2020-07-28 12:13 Vikas Singh
2020-07-28 12:13 ` [PATCH 2/2] net: phy: Associate device node with fixed PHY Vikas Singh
2020-07-28 13:00   ` Andrew Lunn
     [not found]     ` <CADvVLtXVVfU3-U8DYPtDnvGoEK2TOXhpuE=1vz6nnXaFBA8pNA@mail.gmail.com>
2020-07-31 15:31       ` Andrew Lunn
     [not found]         ` <CADvVLtUrZDGqwEPO_ApCWK1dELkUEjrH47s1CbYEYOH9XgZMRg@mail.gmail.com>
2020-08-01  9:41           ` Russell King - ARM Linux admin
2020-08-01 15:11             ` Andrew Lunn
2020-08-03  8:33               ` Madalin Bucur (OSS)
2020-08-03  9:07                 ` Russell King - ARM Linux admin
2020-08-03 11:45                   ` Madalin Bucur (OSS)
2020-08-03 12:57                     ` Andrew Lunn
2020-08-03 14:33                       ` Madalin Bucur (OSS)
2020-08-03 15:00                         ` Andrew Lunn
2020-08-03 16:59                           ` Russell King - ARM Linux admin
2020-08-03 14:10                     ` Russell King - ARM Linux admin
2020-08-03 14:47                       ` Madalin Bucur (OSS)
2020-08-03 16:53                         ` Russell King - ARM Linux admin
2020-08-04  5:36                           ` Madalin Bucur (OSS)

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=1595417547-18957-3-git-send-email-vikas.singh@puresoftware.com \
    --to=vikas.singh@puresoftware.com \
    --cc=andrew@lunn.ch \
    --cc=calvin.johnson@oss.nxp.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuldip.dwivedi@puresoftware.com \
    --cc=linux@armlinux.org.uk \
    --cc=madalin.bucur@oss.nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=vikas.singh@nxp.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;
as well as URLs for NNTP newsgroup(s).