From: stefan@agner.ch (Stefan Agner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/5] pinctrl: imx: use struct imx_pinctrl_soc_info as a const
Date: Mon, 08 Jan 2018 21:52:36 +0100 [thread overview]
Message-ID: <f12aa7b7b3aea7a691a1acd14b8daa58@agner.ch> (raw)
In-Reply-To: <20180108164855.GA6504@t450s.lan>
On 2018-01-08 17:48, Gary Bisson wrote:
> Hi Stefan,
>
> On Sat, Jan 06, 2018 at 03:25:49PM +0100, Stefan Agner wrote:
>> For some SoCs the struct imx_pinctrl_soc_info is passed through
>> of_device_id.data which is const. Most variables are already const
>> or otherwise not written. However, some fields are modified at
>> runtime. Move those fields to the dynamically allocated struct
>> imx_pinctrl.
>>
>> Fixes: b3060044e495 ("pinctrl: freescale: imx7d: make of_device_ids const")
>> Cc: Shawn Guo <shawnguo@kernel.org>
>> Cc: Arvind Yadav <arvind.yadav.cs@gmail.com>
>> Cc: Dong Aisheng <aisheng.dong@nxp.com>
>> Cc: Gary Bisson <gary.bisson@boundarydevices.com>
>> Signed-off-by: Stefan Agner <stefan@agner.ch>
>
> This is actually more or less a revert of a previous commit:
> b28742be4709 pinctrl: imx: remove const qualifier of imx_pinctrl_soc_info
Hm, I see. However, back then imx_pinctrl_probe still consumed a
non-const struct imx_pinctrl_soc_info pointer. So this constifies all
the way through.
>
> Note that the idea for this commit was to get dt-overlays working and
> able to do pinctrl changes using configfs interface to load an overlay
> (using Pantelis patch). Not sure where we stand on loading such overlay
> from user-space, is it still something that will happen?
I am all for dt-overlays and actually also hope that it will make it
completely into mainline. So whatever prevents using device tree
overlays should be addressed.
It seems that ngroups is now part of struct pinctrl_dev (num_groups),
which is still writable. So we should be fine?
As far as I can tell all remaining properties come from the drivers
directly and should not be influenced by anything in the device tree....
--
Stefan
next prev parent reply other threads:[~2018-01-08 20:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-06 14:25 [PATCH v2 0/5] constify struct imx_pinctrl_soc_info Stefan Agner
2018-01-06 14:25 ` [PATCH v2 1/5] pinctrl: imx: use struct imx_pinctrl_soc_info as a const Stefan Agner
2018-01-08 16:48 ` Gary Bisson
2018-01-08 20:52 ` Stefan Agner [this message]
2018-01-09 14:33 ` Gary Bisson
2018-01-11 9:24 ` Linus Walleij
2018-01-06 14:25 ` [PATCH v2 2/5] pinctrl: imx7d: simplify imx7d_pinctrl_probe Stefan Agner
2018-01-11 9:25 ` Linus Walleij
2018-01-06 14:25 ` [PATCH v2 3/5] pinctrl: imx: constify struct imx_pinctrl_soc_info Stefan Agner
2018-01-11 9:26 ` Linus Walleij
2018-01-06 14:25 ` [PATCH v2 4/5] pinctrl: imx7ulp: constify struct imx_cfg_params_decode Stefan Agner
2018-01-11 9:27 ` Linus Walleij
2018-01-06 14:25 ` [PATCH v2 5/5] pinctrl: imx6ul: add IOMUXC SNVS pinctrl driver for i.MX 6ULL Stefan Agner
2018-01-09 14:07 ` Linus Walleij
2018-01-09 14:11 ` Fabio Estevam
2018-01-09 14:33 ` Linus Walleij
2018-01-10 5:35 ` A.s. Dong
2018-01-08 10:32 ` [PATCH v2 0/5] constify struct imx_pinctrl_soc_info Dong Aisheng
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=f12aa7b7b3aea7a691a1acd14b8daa58@agner.ch \
--to=stefan@agner.ch \
--cc=linux-arm-kernel@lists.infradead.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).