linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: stefan@agner.ch
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-gpio@vger.kernel.org, kernel@pengutronix.de,
	linux-arm-kernel@lists.infradead.org,
	patchwork-lst@pengutronix.de
Subject: Re: [PATCH 2/2] pinctrl: imx: add driver for i.MX8MQ
Date: Thu, 18 Jan 2018 13:44:08 +0100	[thread overview]
Message-ID: <1516279448.19307.7.camel@pengutronix.de> (raw)
In-Reply-To: <253551c30748ebcb3777baa4a232f656@agner.ch>

Hi Stefan,

Am Donnerstag, den 18.01.2018, 13:41 +0100 schrieb stefan@agner.ch:
> Hi Lucas,
> 
> On 17.01.2018 19:28, Lucas Stach wrote:
> > The i.MX8MQ pincontrol works in a similar way to the earlier i.MX
> > SoCs.
> > 
> > The driver code is largely copied from NXP's downstream driver
> > written
> > by Anson Huang. Only some small changes for upstream adaption are
> > done
> > by myself.
> > 
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > ---
[...]

> > +static struct imx_pinctrl_soc_info imx8mq_pinctrl_info = {
> > +	.pins = imx8mq_pinctrl_pads,
> > +	.npins = ARRAY_SIZE(imx8mq_pinctrl_pads),
> > +	.gpr_compatible = "nxp,imx8mq-iomuxc-gpr",
> > +};
> 
> I recently sent a patchset which allow to pass the struct
> imx_pinctrl_soc_info as const to imx_pinctrl_probe, hence this should
> be
> const.
> 
> See:
> https://lkml.org/lkml/2018/1/6/131
> 
> > +
> > +static struct of_device_id imx8mq_pinctrl_of_match[] = {
> > +	{ .compatible = "nxp,imx8mq-iomuxc", .data =
> > &imx8mq_pinctrl_info, },
> > +	{ /* sentinel */ }
> > +};
> > +
> > +static int imx8mq_pinctrl_probe(struct platform_device *pdev)
> > +{
> > +	const struct of_device_id *match;
> > +	struct imx_pinctrl_soc_info *pinctrl_info;
> > +
> > +	match = of_match_device(imx8mq_pinctrl_of_match, &pdev-
> > >dev);
> > +
> > +	if (!match)
> > +		return -ENODEV;
> > +
> > +	pinctrl_info = (struct imx_pinctrl_soc_info *) match-
> > >data;
> 
> ...and allow to make use of of_device_get_match_data 

Thanks for the hint, I'll change this for the next revision of this
patch.

Regards,
Lucas

      reply	other threads:[~2018-01-18 12:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17 18:28 [PATCH 1/2] dt-bindings: add binding for i.MX8MQ IOMUXC Lucas Stach
2018-01-17 18:28 ` [PATCH 2/2] pinctrl: imx: add driver for i.MX8MQ Lucas Stach
2018-01-18 12:41   ` stefan
2018-01-18 12:44     ` Lucas Stach [this message]

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=1516279448.19307.7.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=patchwork-lst@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=stefan@agner.ch \
    /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).