linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Paul Cercueil <paul@crapouillou.net>
Cc: Rob Herring <robh@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Maarten ter Huurne <maarten@treewalker.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Paul Burton <paul.burton@imgtec.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux MIPS <linux-mips@linux-mips.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	James Hogan <james.hogan@imgtec.com>
Subject: Re: [PATCH v3 01/14] Documentation: dt/bindings: Document pinctrl-ingenic
Date: Tue, 31 Jan 2017 14:09:54 +0100	[thread overview]
Message-ID: <CACRpkdbAgy4sh6NT5DdQD6EQtOZEwevohEA6OGRcVz98yqS52Q@mail.gmail.com> (raw)
In-Reply-To: <12dc62a7255bd453ff4e5e89f93ebc58@mail.crapouillou.net>

On Tue, Jan 31, 2017 at 11:31 AM, Paul Cercueil <paul@crapouillou.net> wrote:
> [Rob]:
>> From the overlapping register addresses in the examples and this
>> description, it looks like the pinctrlr and gpio controller are 1 block.
>> If so, then there should only be 1 node.
>
> Well, that's what I had until Linus W. just told me to do the opposite:
>
>> Just pull all these down two levels and make them one device
>> each instead of having them inside the pin controller node
>> like this.

I guess the argument is that they are in the same coherent memory
range so they should be one device node. That is how we handle
e.g. system controllers so it makes some sense.

So can the two GPIO controllers be modeled as two subnodes of
the pin controller then?

Subnodes are certainly OK, we have that for many other devices
such as interrupt controllers on PCI bridges and what not.

So when the probing of the pin controller is ready it can just
walk down and populate the GPIO subdevices with
of_platform_default_populate() or simply by registering the
device directly with platform_device_add_data() just like an
MFD device does?

This is nice because we want to use the standard gpio ranges
to map pins to GPIO lines.

I'm sorry about the unclarities here, but it's essentially an intrinsic
problem with GPIO that has been with us for years: do we model
each "bank" as a device or do we just register each bank as a
gpiochip, or do we even make one gpiochip to cover all the banks.
All solutions can be found in the kernel... also the different DT bindings:
one node for a whole slew of GPIO controllers, or seveal nodes
and I bet also several nodes for memory ranges in close proximity.

I don't know for sure what is the most elegant solution, we might
need to build some consensus here for the future so it doesn't
get to heterogeneous.

Yours,
Linus Walleij

  reply	other threads:[~2017-01-31 13:10 UTC|newest]

Thread overview: 162+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-17 23:14 [PATCH 00/13] Ingenic JZ4740 / JZ4780 pinctrl driver Paul Cercueil
2017-01-17 23:14 ` [PATCH 01/13] Documentation: dt/bindings: Document pinctrl-ingenic Paul Cercueil
2017-01-18 23:45   ` Linus Walleij
2017-01-17 23:14 ` [PATCH 02/13] pinctrl-jz4740: add a pinctrl driver for the Ingenic jz4740 SoC Paul Cercueil
2017-01-18 10:16   ` Linus Walleij
2017-01-17 23:14 ` [PATCH 03/13] pinctrl-jz4780: add a pinctrl driver for the Ingenic jz4780 SoC Paul Cercueil
2017-01-17 23:14 ` [PATCH 04/13] MIPS: ingenic: Enable pinctrl for all ingenic SoCs Paul Cercueil
2017-01-17 23:14 ` [PATCH 05/13] MIPS: jz4740: DTS: Add node for the jz4740-pinctrl driver Paul Cercueil
2017-01-18 23:50   ` Linus Walleij
2017-01-17 23:14 ` [PATCH 06/13] MIPS: jz4780: DTS: Add node for the jz4780-pinctrl driver Paul Cercueil
2017-01-17 23:14 ` [PATCH 07/13] MIPS: JZ4740: Qi LB60: Add pinctrl configuration for several drivers Paul Cercueil
2017-01-17 23:14 ` [PATCH 08/13] MIPS: JZ4780: CI20: " Paul Cercueil
2017-01-17 23:14 ` [PATCH 09/13] mmc: jz4740: Let the pinctrl driver configure the pins Paul Cercueil
2017-01-19 10:55   ` Ulf Hansson
2017-01-20 11:59     ` Paul Cercueil
2017-01-17 23:14 ` [PATCH 10/13] mtd: nand: " Paul Cercueil
2017-01-27 17:33   ` Boris Brezillon
2017-01-17 23:14 ` [PATCH 11/13] fbdev: jz4740-fb: " Paul Cercueil
2017-01-17 23:14 ` [PATCH 12/13] pwm: jz4740: " Paul Cercueil
2017-01-18  7:20   ` Thierry Reding
2017-01-17 23:14 ` [PATCH 13/13] MIPS: jz4740: Remove custom GPIO code Paul Cercueil
2017-01-18  7:27   ` Thierry Reding
2017-01-19 11:24     ` Paul Cercueil
2017-01-19  9:07   ` Linus Walleij
2017-01-20 10:01     ` Paul Cercueil
2017-01-18  7:15 ` [PATCH 00/13] Ingenic JZ4740 / JZ4780 pinctrl driver Thierry Reding
2017-01-19 11:19   ` Paul Cercueil
2017-01-20  8:40     ` Linus Walleij
2017-01-20 10:17       ` Paul Cercueil
2017-01-22 14:49     ` [PATCH v2 00/14] " Paul Cercueil
2017-01-22 14:49       ` [PATCH v2 01/14] Documentation: dt/bindings: Document pinctrl-ingenic Paul Cercueil
2017-01-27 11:18         ` Linus Walleij
2017-01-27 15:27           ` Paul Cercueil
2017-01-31 12:59             ` Linus Walleij
2017-01-22 14:49       ` [PATCH v2 02/14] Documentation: dt/bindings: Document pinctrl-gpio Paul Cercueil
2017-01-22 14:49       ` [PATCH v2 03/14] pinctrl-ingenic: add a pinctrl driver for the Ingenic jz47xx SoCs Paul Cercueil
2017-01-22 14:49       ` [PATCH v2 04/14] GPIO: Add gpio-ingenic driver Paul Cercueil
2017-01-22 16:21         ` kbuild test robot
2017-01-22 16:21           ` kbuild test robot
2017-01-22 17:49         ` kbuild test robot
2017-01-22 17:49           ` kbuild test robot
2017-01-22 17:49         ` [PATCH] GPIO: fix semicolon.cocci warnings kbuild test robot
2017-01-22 17:49           ` kbuild test robot
2017-01-22 14:49       ` [PATCH v2 05/14] MIPS: ingenic: Enable pinctrl for all ingenic SoCs Paul Cercueil
2017-01-22 14:49       ` [PATCH v2 06/14] MIPS: jz4740: DTS: Add nodes for ingenic pinctrl and gpio drivers Paul Cercueil
2017-01-22 14:49       ` [PATCH v2 07/14] MIPS: jz4780: " Paul Cercueil
2017-01-22 14:49       ` [PATCH v2 08/14] MIPS: JZ4740: Qi LB60: Add pinctrl configuration for several drivers Paul Cercueil
2017-01-22 14:49       ` [PATCH v2 09/14] MIPS: JZ4780: CI20: " Paul Cercueil
2017-01-22 14:49       ` [PATCH v2 10/14] mmc: jz4740: Let the pinctrl driver configure the pins Paul Cercueil
2017-01-23 10:40         ` Ulf Hansson
2017-01-22 14:49       ` [PATCH v2 11/14] mtd: nand: " Paul Cercueil
2017-01-22 14:49       ` [PATCH v2 12/14] fbdev: jz4740-fb: " Paul Cercueil
2017-01-22 14:49       ` [PATCH v2 13/14] pwm: jz4740: " Paul Cercueil
2017-01-22 14:49       ` [PATCH v2 14/14] MIPS: jz4740: Remove custom GPIO code Paul Cercueil
2017-01-25 18:51     ` [PATCH v3 00/14] Ingenic JZ4740 / JZ4780 pinctrl driver Paul Cercueil
2017-01-25 18:51       ` [PATCH v3 01/14] Documentation: dt/bindings: Document pinctrl-ingenic Paul Cercueil
2017-01-30 20:36         ` Rob Herring
2017-01-30 20:36           ` Rob Herring
2017-01-31 10:31           ` Paul Cercueil
2017-01-31 13:09             ` Linus Walleij [this message]
2017-02-09 17:28               ` Paul Cercueil
2017-02-20 13:56                 ` Linus Walleij
2017-02-21 11:20                   ` Paul Cercueil
2017-02-23  9:59                     ` Linus Walleij
2017-04-02 20:42         ` [PATCH v4 00/14] Ingenic JZ4740 / JZ4780 pinctrl driver Paul Cercueil
2017-04-02 20:42           ` [PATCH v4 01/14] dt/bindings: Document pinctrl-ingenic Paul Cercueil
2017-04-04 14:48             ` Rob Herring
2017-04-28 20:08             ` [PATCH v4 00/14] Ingenic JZ4740 / JZ4780 pinctrl driver Paul Cercueil
2017-04-28 20:08               ` [PATCH v5 01/14] dt/bindings: Document pinctrl-ingenic Paul Cercueil
2017-05-12 16:52                 ` [PATCH v6 " Paul Cercueil
2017-05-12 16:52                   ` [PATCH v6 02/14] dt/bindings: Document gpio-ingenic Paul Cercueil
2017-05-12 16:52                   ` [PATCH v6 03/14] pinctrl: add a pinctrl driver for the Ingenic jz47xx SoCs Paul Cercueil
2017-05-12 16:52                   ` [PATCH v6 04/14] GPIO: Add gpio-ingenic driver Paul Cercueil
2017-05-12 16:52                   ` [PATCH v6 05/14] MIPS: ingenic: Enable pinctrl for all ingenic SoCs Paul Cercueil
2017-05-12 16:52                   ` [PATCH v6 06/14] MIPS: jz4740: DTS: Add nodes for ingenic pinctrl and gpio drivers Paul Cercueil
2017-05-12 16:53                   ` [PATCH v6 07/14] MIPS: jz4780: " Paul Cercueil
2017-05-12 16:53                   ` [PATCH v6 08/14] MIPS: JZ4740: Qi LB60: Add pinctrl configuration for several drivers Paul Cercueil
2017-05-12 16:53                   ` [PATCH v6 09/14] MIPS: JZ4780: CI20: " Paul Cercueil
2017-05-12 16:53                   ` [PATCH v6 10/14] mmc: jz4740: Let the pinctrl driver configure the pins Paul Cercueil
2017-05-12 16:53                   ` [PATCH v6 11/14] mtd: nand: " Paul Cercueil
2017-05-12 16:53                   ` [PATCH v6 12/14] fbdev: jz4740-fb: " Paul Cercueil
2017-05-12 16:53                   ` [PATCH v6 13/14] pwm: jz4740: " Paul Cercueil
2017-05-12 16:53                   ` [PATCH v6 14/14] MIPS: jz4740: Remove custom GPIO code Paul Cercueil
2017-04-28 20:08               ` [PATCH v5 02/14] dt/bindings: Document gpio-ingenic Paul Cercueil
2017-05-05 19:57                 ` Rob Herring
2017-04-28 20:08               ` [PATCH v5 03/14] pinctrl: add a pinctrl driver for the Ingenic jz47xx SoCs Paul Cercueil
2017-05-03  9:12                 ` Paul Cercueil
2017-05-11 11:01                   ` Linus Walleij
2017-04-28 20:08               ` [PATCH v5 04/14] GPIO: Add gpio-ingenic driver Paul Cercueil
2017-05-07 22:05                 ` Paul Cercueil
2017-05-11 11:06                   ` Linus Walleij
2017-04-28 20:08               ` [PATCH v5 05/14] MIPS: ingenic: Enable pinctrl for all ingenic SoCs Paul Cercueil
2017-05-11 11:08                 ` Linus Walleij
2017-05-12 17:00                   ` Paul Cercueil
2017-05-22 15:31                 ` Linus Walleij
2017-07-02 16:35                   ` Paul Cercueil
2017-07-03  9:07                     ` Linus Walleij
2017-07-03 13:55                       ` Ralf Baechle
2017-07-31 13:29                         ` Linus Walleij
2017-04-28 20:08               ` [PATCH v5 06/14] MIPS: jz4740: DTS: Add nodes for ingenic pinctrl and gpio drivers Paul Cercueil
2017-04-28 20:08               ` [PATCH v5 07/14] MIPS: jz4780: " Paul Cercueil
2017-04-28 20:08               ` [PATCH v5 08/14] MIPS: JZ4740: Qi LB60: Add pinctrl configuration for several drivers Paul Cercueil
2017-04-28 20:08               ` [PATCH v5 09/14] MIPS: JZ4780: CI20: " Paul Cercueil
2017-04-28 20:08               ` [PATCH v5 10/14] mmc: jz4740: Let the pinctrl driver configure the pins Paul Cercueil
2017-04-28 20:08               ` [PATCH v5 11/14] mtd: nand: " Paul Cercueil
2017-04-28 20:08               ` [PATCH v5 12/14] fbdev: jz4740-fb: " Paul Cercueil
2017-04-28 20:08               ` [PATCH v5 13/14] pwm: jz4740: " Paul Cercueil
2017-04-28 20:08               ` [PATCH v5 14/14] MIPS: jz4740: Remove custom GPIO code Paul Cercueil
2017-04-02 20:42           ` [PATCH v4 02/14] dt/bindings: Document gpio-ingenic Paul Cercueil
2017-04-04 14:52             ` Rob Herring
2017-04-02 20:42           ` [PATCH v4 03/14] pinctrl-ingenic: add a pinctrl driver for the Ingenic jz47xx SoCs Paul Cercueil
2017-04-07  9:41             ` Linus Walleij
2017-04-07 10:56               ` Lee Jones
2017-04-02 20:42           ` [PATCH v4 04/14] GPIO: Add gpio-ingenic driver Paul Cercueil
2017-04-03 14:15             ` kbuild test robot
2017-04-03 14:15               ` kbuild test robot
2017-04-07  9:34             ` Linus Walleij
2017-04-02 20:42           ` [PATCH v4 05/14] MIPS: ingenic: Enable pinctrl for all ingenic SoCs Paul Cercueil
2017-04-02 20:42           ` [PATCH v4 06/14] MIPS: jz4740: DTS: Add nodes for ingenic pinctrl and gpio drivers Paul Cercueil
2017-04-03  9:57             ` Sergei Shtylyov
2017-04-03 10:20               ` Paul Cercueil
2017-04-03 10:32                 ` Sergei Shtylyov
2017-04-07  9:44             ` Linus Walleij
2017-04-07 13:57               ` Paul Cercueil
2017-04-24 12:58                 ` Linus Walleij
2017-04-02 20:42           ` [PATCH v4 07/14] MIPS: jz4780: " Paul Cercueil
2017-04-02 20:42           ` [PATCH v4 08/14] MIPS: JZ4740: Qi LB60: Add pinctrl configuration for several drivers Paul Cercueil
2017-04-02 20:42           ` [PATCH v4 09/14] MIPS: JZ4780: CI20: " Paul Cercueil
2017-04-02 20:42           ` [PATCH v4 10/14] mmc: jz4740: Let the pinctrl driver configure the pins Paul Cercueil
2017-04-02 20:42           ` [PATCH v4 11/14] mtd: nand: " Paul Cercueil
2017-04-02 20:42           ` [PATCH v4 12/14] fbdev: jz4740-fb: " Paul Cercueil
2017-04-02 20:42           ` [PATCH v4 13/14] pwm: jz4740: " Paul Cercueil
2017-04-06 14:40             ` Thierry Reding
2017-04-02 20:42           ` [PATCH v4 14/14] MIPS: jz4740: Remove custom GPIO code Paul Cercueil
2017-01-25 18:51       ` [PATCH v3 02/14] Documentation: dt/bindings: Document pinctrl-gpio Paul Cercueil
2017-01-30 20:33         ` Rob Herring
2017-01-25 18:51       ` [PATCH v3 03/14] pinctrl-ingenic: add a pinctrl driver for the Ingenic jz47xx SoCs Paul Cercueil
2017-01-31 14:05         ` Linus Walleij
2017-01-31 14:12           ` Paul Cercueil
2017-01-25 18:51       ` [PATCH v3 04/14] GPIO: Add gpio-ingenic driver Paul Cercueil
2017-01-31 14:13         ` Linus Walleij
2017-02-09 17:14           ` Paul Cercueil
2017-02-12 20:48             ` Linus Walleij
2017-01-31 14:20         ` Linus Walleij
2017-01-31 15:29           ` Paul Cercueil
2017-02-03 13:58             ` Linus Walleij
2017-01-25 18:51       ` [PATCH v3 05/14] MIPS: ingenic: Enable pinctrl for all ingenic SoCs Paul Cercueil
2017-01-25 18:51       ` [PATCH v3 06/14] MIPS: jz4740: DTS: Add nodes for ingenic pinctrl and gpio drivers Paul Cercueil
2017-01-31 14:16         ` Linus Walleij
2017-01-25 18:52       ` [PATCH v3 07/14] MIPS: jz4780: " Paul Cercueil
2017-01-25 18:52       ` [PATCH v3 08/14] MIPS: JZ4740: Qi LB60: Add pinctrl configuration for several drivers Paul Cercueil
2017-01-25 18:52       ` [PATCH v3 09/14] MIPS: JZ4780: CI20: " Paul Cercueil
2017-01-25 18:52       ` [PATCH v3 10/14] mmc: jz4740: Let the pinctrl driver configure the pins Paul Cercueil
2017-01-26  6:11         ` kbuild test robot
2017-01-26  6:11           ` kbuild test robot
2017-01-26 10:10           ` Paul Cercueil
2017-01-25 18:52       ` [PATCH v3 11/14] mtd: nand: " Paul Cercueil
2017-01-25 18:52       ` [PATCH v3 12/14] fbdev: jz4740-fb: " Paul Cercueil
2017-01-30 16:10         ` Bartlomiej Zolnierkiewicz
2017-01-25 18:52       ` [PATCH v3 13/14] pwm: jz4740: " Paul Cercueil
2017-01-25 18:52       ` [PATCH v3 14/14] MIPS: jz4740: Remove custom GPIO code Paul Cercueil
2017-01-19  6:38 ` [PATCH 00/13] Ingenic JZ4740 / JZ4780 pinctrl driver Linus Walleij

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=CACRpkdbAgy4sh6NT5DdQD6EQtOZEwevohEA6OGRcVz98yqS52Q@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=devicetree@vger.kernel.org \
    --cc=james.hogan@imgtec.com \
    --cc=lars@metafoo.de \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=maarten@treewalker.org \
    --cc=mark.rutland@arm.com \
    --cc=paul.burton@imgtec.com \
    --cc=paul@crapouillou.net \
    --cc=ralf@linux-mips.org \
    --cc=robh@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=ulf.hansson@linaro.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).