netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Johan Hovold <johan@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 8/9] net: phy: micrel: clean up led-mode setup
Date: Wed, 12 Nov 2014 10:29:52 +0100	[thread overview]
Message-ID: <20141112092952.GD15215@localhost> (raw)
In-Reply-To: <546282EA.7040508@gmail.com>

On Tue, Nov 11, 2014 at 01:43:06PM -0800, Florian Fainelli wrote:
> On 11/11/2014 01:41 PM, Sergei Shtylyov wrote:
> > Hello.
> > 
> > On 11/11/2014 10:00 PM, Johan Hovold wrote:
> > 
> >> Clean up led-mode setup by introducing proper defines for PHY Control
> >> registers 1 and 2 and only passing the register to the setup function.
> > 
> >    Not sure that's really better that it was before (modulo naming).
> 
> We do have proper error handling in kszphy_setup_led() which is already
> an improvement.

This also means handling the led mode in one place rather than spreading
it all over the driver, with multiple config functions providing one of
the same two combinations of register and shift.

It's usefulness will perhaps become more apparent if you look at the
follow up patches, which does further refactoring and store the led-mode
register in the type data.

Johan

  reply	other threads:[~2014-11-12  9:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 19:00 [PATCH 0/9] net: phy: micrel: refactoring and KSZ8081/KSZ8091 features Johan Hovold
2014-11-11 19:00 ` [PATCH 1/9] dt/bindings: fix documentation of ethernet-phy compatible property Johan Hovold
2014-11-11 19:00 ` [PATCH 2/9] net: phy: micrel: fix config_intr error handling Johan Hovold
2014-11-11 19:00 ` [PATCH 3/9] net: phy: micrel: use BIT macro Johan Hovold
2014-11-11 19:00 ` [PATCH 4/9] net: phy: micrel: refactor broadcast disable Johan Hovold
2014-11-11 19:00 ` [PATCH 5/9] net: phy: micrel: disable broadcast for KSZ8081/KSZ8091 Johan Hovold
2014-11-11 19:00 ` [PATCH 6/9] net: phy: micrel: add led-mode sanity check Johan Hovold
2014-11-11 19:00 ` [PATCH 7/9] net: phy: micrel: refactor led-mode error handling Johan Hovold
2014-11-11 19:00 ` [PATCH 8/9] net: phy: micrel: clean up led-mode setup Johan Hovold
2014-11-11 21:41   ` Sergei Shtylyov
2014-11-11 21:43     ` Florian Fainelli
2014-11-12  9:29       ` Johan Hovold [this message]
2014-11-11 19:00 ` [PATCH 9/9] net: phy: micrel: enable led-mode for KSZ8081/KSZ8091 Johan Hovold
2014-11-12 18:56 ` [PATCH 0/9] net: phy: micrel: refactoring and KSZ8081/KSZ8091 features David Miller

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=20141112092952.GD15215@localhost \
    --to=johan@kernel.org \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.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).