From: Anson Huang <anson.huang@nxp.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>
Subject: RE: [PATCH V2] gpio: mxc: add power management support
Date: Wed, 18 Jul 2018 00:54:36 +0000 [thread overview]
Message-ID: <AM3PR04MB13159925074BB583DD83B54DF5530@AM3PR04MB1315.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <CAOMZO5D9MBOwQtKVqSD8XUtDBf9RH5+soV2jreBYHZrXzLWm6A@mail.gmail.com>
Hi, Fabio
Anson Huang
Best Regards!
> -----Original Message-----
> From: Fabio Estevam [mailto:festevam@gmail.com]
> Sent: Tuesday, July 17, 2018 9:52 PM
> To: Anson Huang <anson.huang@nxp.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>; open list:GPIO SUBSYSTEM
> <linux-gpio@vger.kernel.org>; linux-kernel <linux-kernel@vger.kernel.org>;
> dl-linux-imx <linux-imx@nxp.com>
> Subject: Re: [PATCH V2] gpio: mxc: add power management support
>
> Hi Anson,
>
> [Next time please put the i.mx maintainers on Cc]
>
> On Mon, Jul 16, 2018 at 3:06 AM, Anson Huang <Anson.Huang@nxp.com>
> wrote:
> > GPIO registers could lose context on i.MX7D, when enter LPSR mode, the
> > whole SoC will be powered off except LPSR domain, GPIO banks will lose
> > context in this case, need to restore the context after resume from
> > LPSR mode.
> >
> > This patch adds GPIO save/restore for those necessary registers, and
> > put the save/restore operations in noirq suspend/resume phase, since
> > GPIO is fundamental module which could be used by other peripherals'
> > resume phase.
> >
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
>
> > static struct mxc_gpio_hwdata imx1_imx21_gpio_hwdata = { @@ -434,6
> > +445,9 @@ static int mxc_gpio_probe(struct platform_device *pdev)
> > return err;
> > }
> >
> > + if (of_machine_is_compatible("fsl,imx7d"))
> > + port->support_power_off = true;
>
> This does not scale well as we need to support mx8 soon.
>
> Like I replied in my last message the best solution here is to add a
> "fsl,imx7d-gpio" compatible entry in this driver.
>
> Then you can set a flag in the "fsl,imx7d-gpio" case to handle the 'power_off'
> feature.
>
> With this method there will be no need to touch this driver again for adding
> mx8 support.
Thanks for detail suggestion, I will sent a V3 patch accordingly.
Anson.
prev parent reply other threads:[~2018-07-18 0:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-16 6:06 Anson Huang
2018-07-17 13:52 ` Fabio Estevam
2018-07-18 0:54 ` Anson Huang [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=AM3PR04MB13159925074BB583DD83B54DF5530@AM3PR04MB1315.eurprd04.prod.outlook.com \
--to=anson.huang@nxp.com \
--cc=festevam@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®