devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: "Cousson, Benoit" <b-cousson@ti.com>
Cc: "Nayak, Rajendra" <rnayak@ti.com>,
	"Hilman, Kevin" <khilman@ti.com>,
	"tony@atomide.com" <tony@atomide.com>,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"DebBarma, Tarun Kanti" <tarun.kanti@ti.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Varadarajan, Charulatha" <charu@ti.com>
Subject: Re: [PATCH 02/13] gpio/omap: Adapt GPIO driver to DT
Date: Wed, 28 Sep 2011 16:32:47 -0500	[thread overview]
Message-ID: <4E83927F.1060309@freescale.com> (raw)
In-Reply-To: <4E838A41.8010408@ti.com>

On 09/28/2011 03:57 PM, Cousson, Benoit wrote:
> On 9/28/2011 8:23 PM, Scott Wood wrote:
>> What does "the id" mean, in relation to the actual hardware?
> 
> It's true that the description is not super meaningful...
> This is the HW instance number. We have 6 gpios, named gpio1 to gpio6,
> but the pin numbering is global, meaning from 1 to 192, sine only the
> global number is referenced in the pinmuxing control, we have to
> maintain the order to ensure the right number.

I'd either have one node that handles all the banks (with multiple "reg"
resources in the order that they should be mapped to the numberspace),
or avoid using that global numberspace and reference things by
bank/offset (with the bank identified by alias or phandle).

> I still do not know how to use that with the way gpio binding is
> working. Because in theory each gpio controller should be referenced
> with the local number, not the global one. And converting that global
> number from HW spec to a gpio instance + local number seems to me very
> error prone.

You could say the same thing about a chip whose manual is written
assuming a global IRQ numberspace with a certain encoding scheme.

Or in the other direction, Freescale's manuals split up MPIC interrupts
into external/internal/MSI, while they really just map to different
regions of the openpic (hardware standard that Freescale's MPIC is an
instance of) interrupt space.  The device trees use the raw openpic
interrupt numbers.

There's certainly potential for confusion, but at least the device tree
representation is internally consistent and doesn't make assumptions
about the overall system.

-Scott


  reply	other threads:[~2011-09-28 21:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-26 16:50 [PATCH 00/13] OMAP3+: Add DT support for early devices and i2c / twl6030 Benoit Cousson
2011-09-26 16:50 ` [PATCH 01/13] hwspinlock: OMAP4: Add spinlock support in DT Benoit Cousson
2011-10-10 12:49   ` Ohad Ben-Cohen
2011-09-26 16:50 ` [PATCH 02/13] gpio/omap: Adapt GPIO driver to DT Benoit Cousson
     [not found]   ` <1317055821-20652-3-git-send-email-b-cousson-l0cyMroinI0@public.gmane.org>
2011-09-27  5:40     ` Rajendra Nayak
2011-09-28  8:15       ` Cousson, Benoit
2011-09-28 18:23         ` Scott Wood
2011-09-28 20:57           ` Cousson, Benoit
2011-09-28 21:32             ` Scott Wood [this message]
2011-09-28  8:20       ` Cousson, Benoit
2011-09-30 11:53       ` Cousson, Benoit
     [not found] ` <1317055821-20652-1-git-send-email-b-cousson-l0cyMroinI0@public.gmane.org>
2011-09-26 16:50   ` [PATCH 03/13] arm/dts: OMAP4: Add gpio nodes Benoit Cousson
2011-09-26 16:50 ` [PATCH 04/13] irq: Add stub for none DT build in irqdomain.h Benoit Cousson
2011-09-26 16:50 ` [PATCH 05/13] i2c: OMAP: Add DT support for i2c controller Benoit Cousson
2011-09-26 16:50 ` [PATCH 06/13] mfd: twl-core: Add initial DT support for twl4030/twl6030 Benoit Cousson
2011-09-27  5:42   ` Rajendra Nayak
2011-09-28  8:52     ` Cousson, Benoit
2011-09-26 16:50 ` [PATCH 07/13] rtc: rtc-twl: Add DT support for RTC inside twl4030/twl6030 Benoit Cousson
2011-09-26 16:50 ` [PATCH 08/13] arm/dts: OMAP4: Add i2c controller nodes Benoit Cousson
2011-09-27  5:42   ` Rajendra Nayak
2011-09-26 16:50 ` [PATCH 09/13] arm/dts: OMAP3: " Benoit Cousson
2011-09-26 16:50 ` [PATCH 10/13] arm/dts: omap4-panda: Add twl6030 and i2c EEPROM Benoit Cousson
2011-09-26 16:50 ` [PATCH 11/13] arm/dts: omap4-sdp: Add twl6030, i2c3 and i2c4 devices Benoit Cousson
2011-09-26 16:50 ` [PATCH 12/13] arm/dts: omap3-beagle: Add twl4030 and i2c EEPROM Benoit Cousson
     [not found]   ` <1317055821-20652-13-git-send-email-b-cousson-l0cyMroinI0@public.gmane.org>
2011-09-29 17:25     ` Grant Likely
2011-09-26 16:50 ` [PATCH 13/13] OMAP2+: board-generic: Remove i2c static init Benoit Cousson

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=4E83927F.1060309@freescale.com \
    --to=scottwood@freescale.com \
    --cc=b-cousson@ti.com \
    --cc=charu@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=rnayak@ti.com \
    --cc=tarun.kanti@ti.com \
    --cc=tony@atomide.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).