linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] pinctrl: handle dummy state in core
Date: Wed, 18 Apr 2012 14:28:32 +0200	[thread overview]
Message-ID: <20120418122832.GP20478@pengutronix.de> (raw)
In-Reply-To: <CACRpkdYH06_kGbSdozKPWZcOG0FvoOyHvjHwhz-xUL1pfSX9DQ@mail.gmail.com>

On Wed, Apr 18, 2012 at 01:31:17PM +0200, Linus Walleij wrote:
> On Tue, Apr 17, 2012 at 5:42 AM, Dong Aisheng
> <aisheng.dong@freescale.com> wrote:
> 
> > I think the main issue is for one platform neither supports dt nor using pinctrl
> > subsystem, do you think it still makes too much sense to force that platform
> > to define a _PINCTRL_ dummy state in their machine code?
> >
> > But the driver is commonly shared between these different platforms(using pinctrl
> > or not).
> 
> So this is for the situation where some machines have pinctrl and some haven't.
> 
> And I think that's how some archs have used the regulator dummies earlier,
> so I clearly see the point. So if converting a subset of machines in an
> architecture you will need this for a transitional period.
> 
> Is this helpful to get i.MX support in place?
> 
> On one hand I'd say we merge it for that reason alone, instead of requiring
> all i.MX machines to be converted at once.
> 
> On the other hand, I fear that this will be used to avoid *ever* migrating
> the old machines to pinctrl. And it's a generic disease that people working
> in the arch/arm/* tree want to ditch old hardware without actually deleting
> the code.

'existing' doesn't necessarily mean 'old'

> 
> I'd like Sascha's view on this to make a good decision.

Currently Dong Aisheng is working on i.MX6, we have i.MX31, i.MX35,
i.MX51 and i.MX53 enabled in the same defconfig. Waiting for all
machines turn over at once to pinctrl is illusionary. We have to make
drivers work with and without pinctrl. We have a bunch of bad choices:

- create a dummy pinctrl for all boards which do not have real pinmux
  support
- ignore pinctrl_request errors in drivers.
- generate and return a dummy pinctrl in the core if no real pinctrl is
  found.

(replace pinctrl with regulators or clocks, it's the same situation, and
it's not only i.MX specific)

I don't have a good solution for this, only the idea that it should be
possible to attach these kinds of resources to a device and then a
driver would only call a make_me_work(dev).

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2012-04-18 12:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16 14:24 [PATCH 1/1] pinctrl: handle dummy state in core Dong Aisheng
2012-04-16 16:03 ` Stephen Warren
2012-04-17  3:42   ` Dong Aisheng
2012-04-17 19:53     ` Stephen Warren
2012-04-18 11:31     ` Linus Walleij
2012-04-18 12:28       ` Sascha Hauer [this message]
2012-04-18 13:52         ` Linus Walleij
2012-04-18 14:00           ` Sascha Hauer
2012-04-18 14:38             ` Dong Aisheng
2012-04-19 17:22               ` Linus Walleij
2012-04-18 17:37           ` Stephen Warren

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=20120418122832.GP20478@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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).