From: Christian Lamparter <chunkeey@googlemail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "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-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Álvaro Fernández Rojas" <noltari@gmail.com>,
"Kumar Gala" <galak@codeaurora.org>,
"Alexander Shiyan" <shc_work@mail.ru>,
"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
"Mark Rutland" <mark.rutland@arm.com>,
"Pawel Moll" <pawel.moll@arm.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Alexandre Courbot" <gnurou@gmail.com>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>
Subject: Re: [PATCH v8 2/3] gpio: mmio: add DT support for memory-mapped GPIOs
Date: Tue, 10 May 2016 21:55:15 +0200 [thread overview]
Message-ID: <3359834.V76Y1cJiRU@debian64> (raw)
In-Reply-To: <CACRpkdaeZ14hfz-gRetRcdj8NzzyqigV1ZtDSWAwveFxwAgt0w@mail.gmail.com>
On Tuesday, May 10, 2016 02:08:45 PM Linus Walleij wrote:
> On Sun, May 8, 2016 at 3:08 PM, Christian Lamparter
> <chunkeey@googlemail.com> wrote:
>
> > From: Álvaro Fernández Rojas <noltari@gmail.com>
> >
> > This patch adds support for defining memory-mapped GPIOs which
> > are compatible with the existing gpio-mmio interface.
>
> Overall very nice, just waiting for the next version.
K, will deliver. I noticed that you sent a mail in which you stated
that you applied the dt binding already. Can you update your devel
branch on git.kernel.org's linux-gpio? Then, I'll simply rebase my
series and sent the remaining two patches.
(unless you tell me otherwise).
> > The first user for this binding is "wd,mbl-gpio".
>
> And that binding defines that we have a register named "dat".
Yeah, I had to remove all non wd related bits. But since this
series was posted (over and over :D) on a public mailing-list
the original "generic" linux-mmio binding is available for
everybody to perusal[0] and study. I think what we can make
would be something like a devicetree template out of it. This
way people can remove unused flags and regnames for their
compatible device tree binding. (But first: need to finish
that ppc-gpio.txt).
> > + if (of_property_read_bool(dev->of_node, "no-output"))
>
> And then this too.
>
> Do we want these generic MMIO bindings (dat, no-output)
> in a special document like
> Documentation/devicetree/bindings/gpio/gpio-mmio.txt?
>
> Going forward?
Ah, I was thinking about Documentation/gpio... Since there's no
way it would go in the devicetree/bindings without having a compatible?
(And there's technically none). As far as I know the problem here is not
that it would be impossible to do that (updating a .dts file is "easy"...),
but updating .dtb to a tiny flash-rom on the device might not be. So we
have to make every effort to preserve compatibility for those devices
(and old/incomplete/broken dtbs) as long as the device is supported.
About adding new device:
This will work in the following way:
1. new drives will need to supply their hardware-specific devicetree
binding file to the dt maintainers (This "vendor,device.txt" file
will be like the wd,mbl-gpio.txt - but modified for the hardware
(this is where the template would be handy)
2. Make a one-liner patch which adds a compatible string to
gpio-mmio.c's bgpio_of_match table:
+ { .compatible = "vendor,device", .data = bgpio_basic_mmio_parse_dt },
(Of course, not having parses for the "ngpio" property and the flags like
big-endian, reg-output-reg,set, unreadable-reg-dir, ... properties from
the get-go is sad, these can add back once a driver/binding needs it).
I think brcm63xx will be following shortly. So we can test the
procedure.
> This patch set mainly deals with refactorings, but in the
> long run we want to slim things down a bit and use standard
> bindings I think.
Well, to do that, I think we need to collect enough devices to
make it a real "class" of devices first.
Regards,
Christian
[0] <https://lkml.org/lkml/2016/4/28/921>
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: chunkeey@googlemail.com (Christian Lamparter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8 2/3] gpio: mmio: add DT support for memory-mapped GPIOs
Date: Tue, 10 May 2016 21:55:15 +0200 [thread overview]
Message-ID: <3359834.V76Y1cJiRU@debian64> (raw)
In-Reply-To: <CACRpkdaeZ14hfz-gRetRcdj8NzzyqigV1ZtDSWAwveFxwAgt0w@mail.gmail.com>
On Tuesday, May 10, 2016 02:08:45 PM Linus Walleij wrote:
> On Sun, May 8, 2016 at 3:08 PM, Christian Lamparter
> <chunkeey@googlemail.com> wrote:
>
> > From: ?lvaro Fern?ndez Rojas <noltari@gmail.com>
> >
> > This patch adds support for defining memory-mapped GPIOs which
> > are compatible with the existing gpio-mmio interface.
>
> Overall very nice, just waiting for the next version.
K, will deliver. I noticed that you sent a mail in which you stated
that you applied the dt binding already. Can you update your devel
branch on git.kernel.org's linux-gpio? Then, I'll simply rebase my
series and sent the remaining two patches.
(unless you tell me otherwise).
> > The first user for this binding is "wd,mbl-gpio".
>
> And that binding defines that we have a register named "dat".
Yeah, I had to remove all non wd related bits. But since this
series was posted (over and over :D) on a public mailing-list
the original "generic" linux-mmio binding is available for
everybody to perusal[0] and study. I think what we can make
would be something like a devicetree template out of it. This
way people can remove unused flags and regnames for their
compatible device tree binding. (But first: need to finish
that ppc-gpio.txt).
> > + if (of_property_read_bool(dev->of_node, "no-output"))
>
> And then this too.
>
> Do we want these generic MMIO bindings (dat, no-output)
> in a special document like
> Documentation/devicetree/bindings/gpio/gpio-mmio.txt?
>
> Going forward?
Ah, I was thinking about Documentation/gpio... Since there's no
way it would go in the devicetree/bindings without having a compatible?
(And there's technically none). As far as I know the problem here is not
that it would be impossible to do that (updating a .dts file is "easy"...),
but updating .dtb to a tiny flash-rom on the device might not be. So we
have to make every effort to preserve compatibility for those devices
(and old/incomplete/broken dtbs) as long as the device is supported.
About adding new device:
This will work in the following way:
1. new drives will need to supply their hardware-specific devicetree
binding file to the dt maintainers (This "vendor,device.txt" file
will be like the wd,mbl-gpio.txt - but modified for the hardware
(this is where the template would be handy)
2. Make a one-liner patch which adds a compatible string to
gpio-mmio.c's bgpio_of_match table:
+ { .compatible = "vendor,device", .data = bgpio_basic_mmio_parse_dt },
(Of course, not having parses for the "ngpio" property and the flags like
big-endian, reg-output-reg,set, unreadable-reg-dir, ... properties from
the get-go is sad, these can add back once a driver/binding needs it).
I think brcm63xx will be following shortly. So we can test the
procedure.
> This patch set mainly deals with refactorings, but in the
> long run we want to slim things down a bit and use standard
> bindings I think.
Well, to do that, I think we need to collect enough devices to
make it a real "class" of devices first.
Regards,
Christian
[0] <https://lkml.org/lkml/2016/4/28/921>
WARNING: multiple messages have this Message-ID (diff)
From: Christian Lamparter <chunkeey@googlemail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "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-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Álvaro Fernández Rojas" <noltari@gmail.com>,
"Kumar Gala" <galak@codeaurora.org>,
"Alexander Shiyan" <shc_work@mail.ru>,
"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
"Mark Rutland" <mark.rutland@arm.com>,
"Pawel Moll" <pawel.moll@arm.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Alexandre Courbot" <gnurou@gmail.com>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>
Subject: Re: [PATCH v8 2/3] gpio: mmio: add DT support for memory-mapped GPIOs
Date: Tue, 10 May 2016 21:55:15 +0200 [thread overview]
Message-ID: <3359834.V76Y1cJiRU@debian64> (raw)
In-Reply-To: <CACRpkdaeZ14hfz-gRetRcdj8NzzyqigV1ZtDSWAwveFxwAgt0w@mail.gmail.com>
On Tuesday, May 10, 2016 02:08:45 PM Linus Walleij wrote:
> On Sun, May 8, 2016 at 3:08 PM, Christian Lamparter
> <chunkeey@googlemail.com> wrote:
>
> > From: Álvaro Fernández Rojas <noltari@gmail.com>
> >
> > This patch adds support for defining memory-mapped GPIOs which
> > are compatible with the existing gpio-mmio interface.
>
> Overall very nice, just waiting for the next version.
K, will deliver. I noticed that you sent a mail in which you stated
that you applied the dt binding already. Can you update your devel
branch on git.kernel.org's linux-gpio? Then, I'll simply rebase my
series and sent the remaining two patches.
(unless you tell me otherwise).
> > The first user for this binding is "wd,mbl-gpio".
>
> And that binding defines that we have a register named "dat".
Yeah, I had to remove all non wd related bits. But since this
series was posted (over and over :D) on a public mailing-list
the original "generic" linux-mmio binding is available for
everybody to perusal[0] and study. I think what we can make
would be something like a devicetree template out of it. This
way people can remove unused flags and regnames for their
compatible device tree binding. (But first: need to finish
that ppc-gpio.txt).
> > + if (of_property_read_bool(dev->of_node, "no-output"))
>
> And then this too.
>
> Do we want these generic MMIO bindings (dat, no-output)
> in a special document like
> Documentation/devicetree/bindings/gpio/gpio-mmio.txt?
>
> Going forward?
Ah, I was thinking about Documentation/gpio... Since there's no
way it would go in the devicetree/bindings without having a compatible?
(And there's technically none). As far as I know the problem here is not
that it would be impossible to do that (updating a .dts file is "easy"...),
but updating .dtb to a tiny flash-rom on the device might not be. So we
have to make every effort to preserve compatibility for those devices
(and old/incomplete/broken dtbs) as long as the device is supported.
About adding new device:
This will work in the following way:
1. new drives will need to supply their hardware-specific devicetree
binding file to the dt maintainers (This "vendor,device.txt" file
will be like the wd,mbl-gpio.txt - but modified for the hardware
(this is where the template would be handy)
2. Make a one-liner patch which adds a compatible string to
gpio-mmio.c's bgpio_of_match table:
+ { .compatible = "vendor,device", .data = bgpio_basic_mmio_parse_dt },
(Of course, not having parses for the "ngpio" property and the flags like
big-endian, reg-output-reg,set, unreadable-reg-dir, ... properties from
the get-go is sad, these can add back once a driver/binding needs it).
I think brcm63xx will be following shortly. So we can test the
procedure.
> This patch set mainly deals with refactorings, but in the
> long run we want to slim things down a bit and use standard
> bindings I think.
Well, to do that, I think we need to collect enough devices to
make it a real "class" of devices first.
Regards,
Christian
[0] <https://lkml.org/lkml/2016/4/28/921>
next prev parent reply other threads:[~2016-05-10 19:55 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-08 13:08 [PATCH v8 0/3] gpio: add DT support for memory-mapped GPIOs Christian Lamparter
2016-05-08 13:08 ` Christian Lamparter
2016-05-08 13:08 ` Christian Lamparter
2016-05-08 13:08 ` [PATCH v8 1/3] gpio: dt-bindings: add wd,mbl-gpio bindings Christian Lamparter
2016-05-08 13:08 ` Christian Lamparter
[not found] ` <9bc9349d6e13d81c6200b0cd8fa20c76263043f6.1462543458.git.chunkeey-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-05-10 11:58 ` Linus Walleij
2016-05-10 11:58 ` Linus Walleij
2016-05-10 11:58 ` Linus Walleij
2016-05-08 13:08 ` [PATCH v8 2/3] gpio: mmio: add DT support for memory-mapped GPIOs Christian Lamparter
2016-05-08 13:08 ` Christian Lamparter
2016-05-08 13:08 ` Christian Lamparter
2016-05-08 17:17 ` Joachim Eastwood
2016-05-08 17:17 ` Joachim Eastwood
2016-05-08 17:17 ` Joachim Eastwood
2016-05-08 18:27 ` Christian Lamparter
2016-05-08 18:27 ` Christian Lamparter
[not found] ` <535f785bf6116c0fb6f46afbb77e6d4bd3ef5f60.1462543458.git.chunkeey-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-05-10 12:08 ` Linus Walleij
2016-05-10 12:08 ` Linus Walleij
2016-05-10 12:08 ` Linus Walleij
2016-05-10 19:55 ` Christian Lamparter [this message]
2016-05-10 19:55 ` Christian Lamparter
2016-05-10 19:55 ` Christian Lamparter
2016-05-11 11:05 ` Álvaro Fernández Rojas
2016-05-08 13:08 ` [PATCH v8 3/3] gpio: move clps711x, moxart, ts4800 and gpio-ge into gpio-mmio Christian Lamparter
2016-05-08 13:08 ` Christian Lamparter
2016-05-08 13:19 ` [PATCH v8 0/3] gpio: add DT support for memory-mapped GPIOs Andy Shevchenko
2016-05-08 13:19 ` Andy Shevchenko
2016-05-08 13:19 ` Andy Shevchenko
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=3359834.V76Y1cJiRU@debian64 \
--to=chunkeey@googlemail.com \
--cc=andy.shevchenko@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=gnurou@gmail.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=noltari@gmail.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=shc_work@mail.ru \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.