From: "Marek Behún" <kabel@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Holger Brunck <holger.brunck@hitachienergy.com>,
netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH 2/2] dsa: mv88e6xxx: make serdes SGMII/Fiber output amplitude configurable
Date: Fri, 26 Nov 2021 22:13:45 +0100 [thread overview]
Message-ID: <20211126221345.5e17e48d@thinkpad> (raw)
In-Reply-To: <YaFHAbXbEH1fokkx@lunn.ch>
On Fri, 26 Nov 2021 21:43:45 +0100
Andrew Lunn <andrew@lunn.ch> wrote:
> > > + if (chip->info->ops->serdes_set_out_amplitude && np) {
> > > + if (!of_property_read_u32(np, "serdes-output-amplitude",
> >
> > Hmm. Andrew, why don't we use <linux/property.h> instead of
> > <linux/of*.h> stuff in this dirver? Is there a reason or is this just
> > because it wasn't converted yet?
>
> The problem with device_property_read is that it takes a device. But
> this is not actually a device scoped property, it should be considered
> a port scoped property. And the port is not a device. DSA is not
> likely to convert to the device API because the device API is too
> limiting.
You're right, device_property_read() needs a device, and this seems
like a port-specific property. But from the patch it seems Holger is
using the switch device node:
struct device_node *np = chip->dev->of_node;
so either this is wrong or he could use device_property API. Of course
that would need a complete conversion, with device_* or fwnode_*.
functions. I was wondering if device_* + fwnode_* functions are
preferred instead of of_* functions (since they can be used also with
ACPI, for example).
Marek
next prev parent reply other threads:[~2021-11-26 21:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-26 15:42 [PATCH 1/2] Docs/devicetree: add serdes-output-amplitude to marvell.txt Holger Brunck
2021-11-26 15:42 ` [PATCH 2/2] dsa: mv88e6xxx: make serdes SGMII/Fiber output amplitude configurable Holger Brunck
2021-11-26 16:16 ` Andrew Lunn
2021-11-26 19:56 ` Marek Behún
2021-11-26 20:43 ` Andrew Lunn
2021-11-26 21:13 ` Marek Behún [this message]
2021-11-26 21:49 ` Andrew Lunn
2021-11-29 11:17 ` Holger Brunck
2021-11-26 16:08 ` [PATCH 1/2] Docs/devicetree: add serdes-output-amplitude to marvell.txt Andrew Lunn
2021-11-29 10:40 ` Holger Brunck
2021-11-26 16:12 ` Andrew Lunn
2021-11-29 11:14 ` Holger Brunck
2021-11-26 18:37 ` Jakub Kicinski
2021-11-26 19:57 ` Jakub Kicinski
2021-11-26 23:14 ` 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=20211126221345.5e17e48d@thinkpad \
--to=kabel@kernel.org \
--cc=andrew@lunn.ch \
--cc=holger.brunck@hitachienergy.com \
--cc=kuba@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.