From: stefan@agner.ch (Stefan Agner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: imx6ul: add IOMUXC SNVS pinctrl driver for i.MX 6ULL
Date: Sat, 06 Jan 2018 12:14:28 +0100 [thread overview]
Message-ID: <b6d157d12f87caa1ad2ab7c500aa17b2@agner.ch> (raw)
In-Reply-To: <CACRpkdYKiLeRZdBCWie+UGK=96FicXXmWvGUvwNFD2ZWOUx7Rw@mail.gmail.com>
On 2018-01-03 09:09, Linus Walleij wrote:
> On Tue, Jan 2, 2018 at 5:40 PM, Stefan Agner <stefan@agner.ch> wrote:
>
>> From: Bai Ping <ping.bai@nxp.com>
>>
>> On i.MX 6ULL, the BOOT_MODEx and TAMPERx pin MUX and CTRL registers
>> are available in a separate IOMUXC_SNVS module. Add support for the
>> IOMUXC_SNVS module to the i.MX 6UL pinctrl driver.
>>
>> Signed-off-by: Bai Ping <ping.bai@nxp.com>
>> Signed-off-by: Stefan Agner <stefan@agner.ch>
>
> So 6 unsigned long 32 bit is succeeded by 6 unsigned long long, 64 bit?
>
> Someone is having fun naming these platforms I see.
Hehe, yeah definitely. At least they use proper type suffixes ;-)
>
>> Required properties:
>> -- compatible: "fsl,imx6ul-iomuxc"
>> +- compatible: "fsl,imx6ul-iomuxc" for main IOMUX controller or
>> + "fsl,imx6ull-iomuxc-snvs" for i.MX 6ULL's SNVS IOMUX controller.
>
> Pretty uncontroversial change but still nice to give the DT people a chance
> to ACK it.
>
>> static int imx6ul_pinctrl_probe(struct platform_device *pdev)
>> {
>> - return imx_pinctrl_probe(pdev, &imx6ul_pinctrl_info);
>> + const struct of_device_id *match;
>> + struct imx_pinctrl_soc_info *pinctrl_info;
>> +
>> + match = of_match_device(imx6ul_pinctrl_of_match, &pdev->dev);
>> +
>> + if (!match)
>> + return -ENODEV;
>> +
>> + pinctrl_info = (struct imx_pinctrl_soc_info *) match->data;
>
> 1. Do not use a cast on void * pointers.
>
> 2. Use this function:
> extern const void *of_device_get_match_data(const struct device *dev);
>
> From <linux/of_device.h>
Ok. We use the same code in pinmux-imx7d.c, will send a patch to
simplify that too.
--
Stefan
next prev parent reply other threads:[~2018-01-06 11:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-02 16:40 [PATCH] pinctrl: imx6ul: add IOMUXC SNVS pinctrl driver for i.MX 6ULL Stefan Agner
2018-01-03 8:09 ` Linus Walleij
2018-01-06 11:14 ` Stefan Agner [this message]
2018-01-06 12:16 ` Stefan Agner
2018-01-05 16:42 ` Rob Herring
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=b6d157d12f87caa1ad2ab7c500aa17b2@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).