linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Jason Cooper <jason@lakedaemon.net>,
	linux-gpio@vger.kernel.org,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 0/5] mvebu cleanups and preparation for Armada 7k/8k
Date: Fri, 13 Jan 2017 11:02:40 +0000	[thread overview]
Message-ID: <20170113110240.GA29164@n2100.armlinux.org.uk> (raw)

(Resend including linux-arm-kernel)

This patch series cleans up the mvebu pin controller implementation
such that we can support multiple pin controllers as found in Armada
7k and 8k SoCs.

Currently, in order to do that, we would have to have static variables
and multiple implementations of functions whose only purpose is to
read from the correct static variable.  This is caused by a lack of
driver private data passed into the mvebu pin controller's methods.

Most mvebu pin controllers methods are performing exactly the same
action, so it makes sense to generalise the methods, which in turn
lets us come up with a fairly standardised set of methods.

Another important side effect of these changes is that the structures
with function pointers are now marked const - as they should be in
today's security concious kernel programming environment.

I've included everything except the 7k and 8k drivers, which, before
Thomas went away, he suggested changes to these, so they aren't ready
for submission yet.  However, the rest of the ground work is, and I'd
like users of this code to test it - I don't have all these platforms!

I'm aware of other mvebu SoC support, so I think it's probably a good
idea to get these patches out there and known about, so folk can
consider how they'd like to order merging the changes - obviously new
SoCs with new pinctrl files will need updates somewhere...

The cleanup side of these patches (without the last adding the regmap
support) shows a reduction in code size:

 drivers/pinctrl/mvebu/pinctrl-armada-370.c | 24 +-------
 drivers/pinctrl/mvebu/pinctrl-armada-375.c | 24 +-------
 drivers/pinctrl/mvebu/pinctrl-armada-38x.c | 24 +-------
 drivers/pinctrl/mvebu/pinctrl-armada-39x.c | 24 +-------
 drivers/pinctrl/mvebu/pinctrl-armada-xp.c  | 35 +++--------
 drivers/pinctrl/mvebu/pinctrl-dove.c       | 96 +++++++++++++++++-------------
 drivers/pinctrl/mvebu/pinctrl-kirkwood.c   | 32 +++-------
 drivers/pinctrl/mvebu/pinctrl-mvebu.c      | 77 +++++++++++++++++++++---
 drivers/pinctrl/mvebu/pinctrl-mvebu.h      | 51 +++++++---------
 drivers/pinctrl/mvebu/pinctrl-orion.c      |  8 ++-
 10 files changed, 183 insertions(+), 212 deletions(-)

Adding regmap support increases the code size again:

 drivers/pinctrl/mvebu/pinctrl-armada-370.c |  24 +----
 drivers/pinctrl/mvebu/pinctrl-armada-375.c |  24 +----
 drivers/pinctrl/mvebu/pinctrl-armada-38x.c |  24 +----
 drivers/pinctrl/mvebu/pinctrl-armada-39x.c |  24 +----
 drivers/pinctrl/mvebu/pinctrl-armada-xp.c  |  35 ++------
 drivers/pinctrl/mvebu/pinctrl-dove.c       |  96 +++++++++++---------
 drivers/pinctrl/mvebu/pinctrl-kirkwood.c   |  32 ++-----
 drivers/pinctrl/mvebu/pinctrl-mvebu.c      | 137 +++++++++++++++++++++++++++--
 drivers/pinctrl/mvebu/pinctrl-mvebu.h      |  65 ++++++++------
 drivers/pinctrl/mvebu/pinctrl-orion.c      |   8 +-
 10 files changed, 257 insertions(+), 212 deletions(-)

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

             reply	other threads:[~2017-01-13 11:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 11:02 Russell King - ARM Linux [this message]
2017-01-13 11:03 ` [PATCH RFC 1/5] pinctrl: mvebu: constify mvebu_mpp_ctrl structures Russell King
2017-01-18  8:53   ` Linus Walleij
2017-01-13 11:03 ` [PATCH RFC 2/5] pinctrl: mvebu: provide per-control private data Russell King
2017-01-18  8:55   ` Linus Walleij
2017-01-13 11:03 ` [PATCH RFC 3/5] pinctrl: mvebu: provide generic simple mmio-based implementation Russell King
2017-01-13 11:03 ` [PATCH RFC 4/5] pinctrl: mvebu: switch drivers to generic simple mmio Russell King
2017-01-18  8:57   ` Linus Walleij
2017-01-13 11:03 ` [PATCH RFC 5/5] pinctrl: mvebu: add simple regmap based pinctrl implementation Russell King
2017-01-18  8:58   ` Linus Walleij
2017-01-13 11:28 ` [PATCH RFC 0/5] mvebu cleanups and preparation for Armada 7k/8k Russell King - ARM Linux
2017-01-18  8:52   ` Linus Walleij
2017-01-18 10:54     ` Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2017-01-13 10:28 Russell King - ARM Linux

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=20170113110240.GA29164@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=gregory.clement@free-electrons.com \
    --cc=jason@lakedaemon.net \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=thomas.petazzoni@free-electrons.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).