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]
Message-ID: <6cf47684e92d21a343dbb7861f5d4e5ad1949cdc.camel@pengutronix.de>
Date:   Thu, 21 Jul 2022 13:49:03 +0200
From:   Lucas Stach <l.stach@...gutronix.de>
To:     Martin Kepplinger <martin.kepplinger@...i.sm>, rafael@...nel.org,
        khilman@...nel.org, ulf.hansson@...aro.org, robh@...nel.org,
        krzysztof.kozlowski@...aro.org, shawnguo@...nel.org,
        s.hauer@...gutronix.de, festevam@...il.com, pavel@....cz
Cc:     kernel@...i.sm, linux-imx@....com, broonie@...nel.org,
        aford173@...il.com, linux-pm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v5 3/3] soc: imx: gpcv2: fix suspend/resume by setting
 GENPD_FLAG_IRQ_ON

Am Donnerstag, dem 21.07.2022 um 06:36 +0200 schrieb Martin Kepplinger:
> For boards that use power-domains' power-supplies that need interrupts
> to work (like regulator over i2c), set GENPD_FLAG_IRQ_ON.
> This will tell genpd to adjust accordingly. Currently it "only" sets the
> correct suspend/resume callbacks.
> 
> This fixes suspend/resume on imx8mq-librem5 boards (tested) and
> imx8mq-evk (by looking at dts) and possibly more.
> 
> Signed-off-by: Martin Kepplinger <martin.kepplinger@...i.sm>
> ---
>  drivers/soc/imx/gpcv2.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> index 6383a4edc360..e058aed76602 100644
> --- a/drivers/soc/imx/gpcv2.c
> +++ b/drivers/soc/imx/gpcv2.c
> @@ -1337,6 +1337,9 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
>  		regmap_update_bits(domain->regmap, domain->regs->map,
>  				   domain->bits.map, domain->bits.map);
>  
> +	if (of_parse_phandle(domain->dev->of_node, "power-supply", 0))

We don't actually need to parse the phandle. For a simple presence
check of_property_read_bool() is enough.

Regards,
Lucas

> +		domain->genpd.flags |= GENPD_FLAG_IRQ_ON;
> +
>  	ret = pm_genpd_init(&domain->genpd, NULL, true);
>  	if (ret) {
>  		dev_err(domain->dev, "Failed to init power domain\n");


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ