From: Mark Rutland <mark.rutland@arm.com>
To: Christian Lamparter <chunkeey@googlemail.com>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.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>,
"Pawel Moll" <pawel.moll@arm.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Alexandre Courbot" <gnurou@gmail.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>
Subject: Re: [PATCH v7 2/3] gpio: mmio: add DT support for memory-mapped GPIOs
Date: Fri, 6 May 2016 12:50:10 +0100 [thread overview]
Message-ID: <20160506114916.GA18053@leverpostej> (raw)
In-Reply-To: <50f7f506364f84effd5224677b21726fd2e511a4.1462372360.git.chunkeey@googlemail.com>
Hi,
On Fri, May 06, 2016 at 01:10:20PM +0200, Christian Lamparter wrote:
> +static int bgpio_basic_mmio_parse_dt(struct platform_device *pdev,
> + struct bgpio_pdata *pdata,
> + unsigned long *flags)
> +{
> + struct device *dev = &pdev->dev;
> + int err;
> +
> + pdata->base = -1;
> + /* If ngpio property is not specified, of_property_read_u32
> + * will return -EINVAL. In this case the number of GPIOs is
> + * automatically determined by the register width. Any
> + * other error of of_property_read_u32 is due bad data and
> + * needs to be dealt with.
> + */
> + err = of_property_read_u32(dev->of_node, "ngpio", &pdata->ngpio);
> + if (err && err != -EINVAL)
> + return err;
> +
> + if (of_device_is_big_endian(dev->of_node))
> + *flags |= BGPIOF_BIG_ENDIAN_BYTE_ORDER;
> +
> + if (of_property_read_bool(dev->of_node, "unreadable-reg-set"))
> + *flags |= BGPIOF_UNREADABLE_REG_SET;
> +
> + if (of_property_read_bool(dev->of_node, "unreadable-reg-dir"))
> + *flags |= BGPIOF_UNREADABLE_REG_DIR;
> +
> + if (of_property_read_bool(dev->of_node, "big-endian-byte-order"))
> + *flags |= BGPIOF_BIG_ENDIAN;
> +
> + if (of_property_read_bool(dev->of_node, "read-output-reg-set"))
> + *flags |= BGPIOF_READ_OUTPUT_REG_SET;
> +
> + if (of_property_read_bool(dev->of_node, "no-output"))
> + *flags |= BGPIOF_NO_OUTPUT;
> + return 0;
> +}
Other than no-output, none of these are in the wd,mbl-gpio binding.
Please remove them for now. We can add them as/when other users of this
binding appear and begin to need them.
Thanks,
Mark.
next prev parent reply other threads:[~2016-05-06 11:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 11:10 [PATCH v7 0/3] gpio: add DT support for memory-mapped GPIOs Christian Lamparter
2016-05-06 11:10 ` [PATCH v7 1/3] gpio: dt-bindings: add wd,mbl-gpio bindings Christian Lamparter
[not found] ` <cover.1462372360.git.chunkeey-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-05-06 11:10 ` [PATCH v7 2/3] gpio: mmio: add DT support for memory-mapped GPIOs Christian Lamparter
2016-05-06 11:44 ` Andy Shevchenko
[not found] ` <CAHp75VcDPY+LbV5+j9DUMJ8Ws=O9=+KmAa9Nog-JuKkPGAM6Cw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-06 12:22 ` Christian Lamparter
2016-05-06 11:50 ` Mark Rutland [this message]
2016-05-06 11:10 ` [PATCH v7 3/3] gpio: move clps711x, moxart, ts4800 and gpio-ge into gpio-mmio Christian Lamparter
2016-05-06 11:53 ` Andy Shevchenko
[not found] ` <CAHp75VeFjcPX+f3j+h+OL2jEpfGP+aqL78ymcsj4JwUfO0RvtA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-06 13:06 ` Christian Lamparter
2016-05-06 13:25 ` 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=20160506114916.GA18053@leverpostej \
--to=mark.rutland@arm.com \
--cc=andy.shevchenko@gmail.com \
--cc=chunkeey@googlemail.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=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 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).