lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 17 Jul 2018 10:52:03 -0300
From:   Fabio Estevam <festevam@...il.com>
To:     Anson Huang <Anson.Huang@....com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        NXP Linux Team <Linux-imx@....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@....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@....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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ