public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arun Ramadoss <arun.ramadoss@microchip.com>
To: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	<UNGLinuxDriver@microchip.com>
Subject: [RFC PATCH net-next 0/2] net: phy: lan87xx: use genphy_read_master_slave function
Date: Mon, 7 Mar 2022 15:47:41 +0530	[thread overview]
Message-ID: <20220307101743.8567-1-arun.ramadoss@microchip.com> (raw)

LAN87xx T1 Phy has the same register field as gigabit phy for reading the
master slave configuration. But the genphy_read_master_slave function has a
check of gigabit phy. So refactored the function in such a way, moved the speed
check to the genphy_read_status function. Analyzed the nxp-tja11xx function for
refactoring, but the register for configuring master/slave is nxp specific
which is not extended phy register.
And analyzed the reusing genphy_setup_master_slave, but for LAN87xx
MASTER_ENABLE is always 1 and Preferred state is always 0. So, I didn't try to
change it.

Arun Ramadoss (2):
  net: phy: exported the genphy_read_master_slave function
  net: phy: lan87xx: use genphy_read_master_slave in read_status

 drivers/net/phy/microchip_t1.c | 30 +-----------------------------
 drivers/net/phy/phy_device.c   | 20 ++++++++++----------
 include/linux/phy.h            |  1 +
 3 files changed, 12 insertions(+), 39 deletions(-)


base-commit: 669b258a793db9f1c3bff29ce2bbd61b810503ad
-- 
2.33.0


             reply	other threads:[~2022-03-07 10:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 10:17 Arun Ramadoss [this message]
2022-03-07 10:17 ` [RFC PATCH net-next 1/2] net: phy: exported the genphy_read_master_slave function Arun Ramadoss
2022-03-07 13:53   ` Andrew Lunn
2022-03-07 10:17 ` [RFC PATCH net-next 2/2] net: phy: lan87xx: use genphy_read_master_slave in read_status Arun Ramadoss
2022-03-07 13:53   ` Andrew Lunn

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=20220307101743.8567-1-arun.ramadoss@microchip.com \
    --to=arun.ramadoss@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --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