devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
To: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Russell King - ARM Linux
	<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>
Subject: Re: Pin control mappings for DT
Date: Fri, 2 Dec 2011 08:30:24 -0800	[thread overview]
Message-ID: <20111202163023.GO13928@atomide.com> (raw)
In-Reply-To: <CACRpkdYL8tzwrdkeuGFWsL=NC5wPqGrhrx093VevyanqUq+QkQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

* Linus Walleij <linus.walleij@linaro.org> [111202 01:56]:
> On Thu, Dec 1, 2011 at 11:22 PM, Tony Lindgren <tony@atomide.com> wrote:
> 
> > But how does the second pinmux driver instance know if it's OK
> > to add to the mapping or not? The mapping exists, but it might be
> > also from the previous time you loaded the pinmux driver..
> 
> The mappings are not added from pinmux drivers, atleast not
> the in-tree drivers. Mappings are board data.
> 
> The existing U300 driver only defines it's pins and groups
> (and these are indeed per-device)
> 
> The map is defined by arch/arm/mach-u300/core.c
> and registered when that MACHINE_TYPE is registered.
> 
> So that's why I say it's like the clkdev maps.

Right, but there may not be board data necessarily. With device
tree there really should not be any need for static maps. All the
necessary information can be pulled from device tree to dynamically
build the maps.
 
> >> That the mapping is for all devices doesn't stop you from
> >> loading and unloading pinmux drivers as much as you
> >> want, we already handle that (well there may be bugs in the
> >> code since it's not deployed on any system adding/removing
> >> controllers, but the idea sure is there...)  if you're only
> >> using hogs and no pinmux_get() from elsewhere on it,
> >> it will even work in practice :-)
> >
> > Well if there are dynamic maps, we still need to release
> > the maps also.
> 
> Hm I think I'm not grasping the concept of dynamic maps
> simply.
> 
> The current maps are dynamic in the sense that they are
> registered by the board files, and can also be (with
> the recent patches) additively added, say if the SoC
> has one big chunk of common mappings and smaller
> chunks of per-board mappings (implemented for PXA).

Sure, sounds like that's working fine as long as you have board
files and maps passed from board files.
 
> > How about we pass the static map in platform_data to the pinmux
> > driver in question, then have the pinmux driver set it up with
> > pinctrl fwk as per-pinctrl map.
> 
> That would be a refactoring making it more like how
> regulators pass their consumer lists, but it's not
> fixing something that is broken IMO.

Yeah I understand it's not broken right now with maps
passed from board files.

I guess I'll try to fix it up at some point to make it
behave also for device tree.
 
> > This would remove the need for the global map. This would
> > also allow making the pinctrl fwk into loadable modules
> > in some cases.
> 
> The drivers are loadable today, but why should the pinctrl
> *framework* be a loadable module? Regulators and
> clocks are bool I don't see why the pinctrl core should
> be any different?

Heh just because we could.. to make development easier? :)

I think currently only pinmux_register_mappings would block
that.

Regards,

Tony
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

  parent reply	other threads:[~2011-12-02 16:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-29  7:42 Pin control mappings for DT Linus Walleij
     [not found] ` <CACRpkdYYvG2OXzwpiptbK4VWdeWVGTmE9c4PPC+EecFMkRZEiA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-29 17:42   ` Tony Lindgren
     [not found]     ` <20111129174255.GQ31337-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2011-11-29 18:02       ` Stephen Warren
     [not found]         ` <74CDBE0F657A3D45AFBB94109FB122FF174FDAFB24-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-11-29 19:59           ` Tony Lindgren
     [not found]             ` <20111129195937.GO13928-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2011-11-30 15:14               ` Linus Walleij
     [not found]                 ` <CACRpkdYY0Am52m2Lss+_wxnxXA9nHiGJ2TTdXymAPk=g4Zg+Jw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-30 16:54                   ` Tony Lindgren
     [not found]                     ` <20111130165415.GR13928-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2011-11-30 17:45                       ` Stephen Warren
     [not found]                         ` <74CDBE0F657A3D45AFBB94109FB122FF174FDAFE75-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-11-30 18:49                           ` Tony Lindgren
2011-12-01 12:50                       ` Linus Walleij
     [not found]                         ` <CACRpkdayqNgmOQAG+Kr_xPX8aeKghmeoDdaR4mK0N3U1CcYt-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-01 22:22                           ` Tony Lindgren
     [not found]                             ` <20111201222202.GG13928-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2011-12-02 10:31                               ` Linus Walleij
     [not found]                                 ` <CACRpkdYL8tzwrdkeuGFWsL=NC5wPqGrhrx093VevyanqUq+QkQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-02 16:30                                   ` Tony Lindgren [this message]
2011-11-30 18:16               ` Stephen Warren
     [not found]                 ` <74CDBE0F657A3D45AFBB94109FB122FF174FDAFE9E-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-11-30 19:34                   ` Tony Lindgren
     [not found]                     ` <20111130193410.GW13928-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2011-12-01 21:20                       ` Stephen Warren
     [not found]                         ` <74CDBE0F657A3D45AFBB94109FB122FF174FDB02DE-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-12-01 22:04                           ` Tony Lindgren
2011-11-29 17:55   ` Stephen Warren
     [not found]     ` <74CDBE0F657A3D45AFBB94109FB122FF174FDAFB12-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-11-30 13:35       ` Linus Walleij
     [not found]         ` <CACRpkdb=dMWhyXv1g9-8jrF3kdqe1kM+fhbJy8kRO5BSR_GBvg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-30 17:12           ` Tony Lindgren

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=20111202163023.GO13928@atomide.com \
    --to=tony-4v6ys6ai5vpbdgjk7y7tuq@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.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).