From: Florian Fainelli <f.fainelli@gmail.com>
To: Michael Grzeschik <m.grzeschik@pengutronix.de>, andrew@lunn.ch
Cc: netdev@vger.kernel.org, davem@davemloft.net, kernel@pengutronix.de
Subject: Re: [PATCH] mdio-bitbang: add support for lowlevel mdio read/write
Date: Thu, 19 Dec 2019 14:05:09 -0800 [thread overview]
Message-ID: <d1b76c8e-a9b3-b284-9a79-752afa73bb90@gmail.com> (raw)
In-Reply-To: <20191218162919.5293-1-m.grzeschik@pengutronix.de>
On 12/18/19 8:29 AM, Michael Grzeschik wrote:
> Some phys support special opcode handling when communicating via mdio.
> This patch introduces mdio_ll_read/write which makes it possible to set
> the opcode. It implements these functions in the gpio-bitbang driver,
> which is capable of setting the opcode on read and write.
>
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> ---
> Hi Andrew,
>
> I worked on your suggestion moving the proprietary call to
> mdio-ksz88x3.c which does not seem to work out very well.
> I still end up having an MII_ADDR_SMI???? define in linux/phy.h.
>
> Instead of having to support this special case in one extra file
> what do you think of adding mdiobus_lowlevel_write/read to mdio_bus.
> This way it would be possible to add the opcode directly as user.
>
> Other controllers which have the possibility to set the op code in hardware
> will also profit from that and can implement these functions.
I am not sure it makes sense for the entire struct mii_bus to gain two
new pointers, when you could just exported the mdiobb_ll_read() and
mdiobb_ll_write() to the kernel modules that needs those, and wrap them
however you need them to implement the mdiobus->read() and
mdiobus->write() operations?
--
Florian
next prev parent reply other threads:[~2019-12-19 22:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-07 11:00 [PATCH v1 0/4] microchip: add support for ksz88x3 driver family Michael Grzeschik
2019-11-07 11:00 ` [PATCH v1 1/4] mdio-bitbang: add SMI0 mode support Michael Grzeschik
2019-11-07 15:42 ` Andrew Lunn
2019-12-18 16:29 ` [PATCH] mdio-bitbang: add support for lowlevel mdio read/write Michael Grzeschik
2019-12-19 20:39 ` Andrew Lunn
2019-12-19 22:01 ` Michael Grzeschik
2019-12-19 22:05 ` Florian Fainelli [this message]
2019-12-21 16:41 ` Andrew Lunn
2020-01-29 15:42 ` Michael Grzeschik
2020-01-29 15:53 ` Andrew Lunn
2020-01-29 21:48 ` Michael Grzeschik
2020-04-21 14:31 ` Michael Grzeschik
2019-11-07 11:00 ` [PATCH v1 2/4] net: tag: ksz: Add KSZ8863 tag code Michael Grzeschik
2019-11-07 15:44 ` Andrew Lunn
2019-11-07 11:00 ` [PATCH v1 3/4] ksz: Add Microchip KSZ8863 SMI-DSA driver Michael Grzeschik
2019-11-07 15:56 ` Andrew Lunn
2019-11-09 8:08 ` kbuild test robot
2019-11-07 11:00 ` [PATCH v1 4/4] dt-bindings: net: dsa: document additional Microchip KSZ8863/8873 switch Michael Grzeschik
2019-11-13 13:34 ` Rob Herring
2019-11-07 15:36 ` [PATCH v1 0/4] microchip: add support for ksz88x3 driver family Michael Grzeschik
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=d1b76c8e-a9b3-b284-9a79-752afa73bb90@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=m.grzeschik@pengutronix.de \
--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;
as well as URLs for NNTP newsgroup(s).