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: <CAMuHMdVX6s9At21wGVO0Z6fY=gYkw9dooo0WsCorbrkoqBkehQ@mail.gmail.com>
Date: Fri, 23 Feb 2024 09:08:21 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: forbidden405@...look.com
Cc: Rob Herring <robh+dt@...nel.org>, 
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>, 
	Philipp Zabel <p.zabel@...gutronix.de>, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] drivers: bus: simple-pm-bus: Get and deassert resets exclusively

Hi Yang,

On Fri, Feb 23, 2024 at 4:49 AM Yang Xiwen via B4 Relay
<devnull+forbidden405.outlook.com@...nel.org> wrote:
> From: Yang Xiwen <forbidden405@...look.com>
>
> Simple Power-Managed bus controller may need functional reset(s)
> to be deasserted before child devices connected to the bus can be
> accessed.  Get the reset(s) as an array and assert/deassert the
> reset(s) when the bus is being power managed.
>
> One example is that HiSilicon USB2 INNO PHY test bus needs to deassert
> the reset to the bus before accessing its registers.
>
> Signed-off-by: Yang Xiwen <forbidden405@...look.com>

Thanks for your patch!

> --- a/drivers/bus/simple-pm-bus.c
> +++ b/drivers/bus/simple-pm-bus.c
> @@ -62,6 +64,10 @@ static int simple_pm_bus_probe(struct platform_device *pdev)
>         if (bus->num_clks < 0)
>                 return dev_err_probe(&pdev->dev, bus->num_clks, "failed to get clocks\n");
>
> +       bus->rsts = devm_reset_control_array_get(dev, false, true);

Please use the devm_reset_control_array_get_optional_exclusive()
wrapper.

> +       if (IS_ERR(bus->rsts))
> +               return dev_err_probe(&pdev->dev, PTR_ERR(bus->rsts), "failed to get resets\n");
> +
>         dev_set_drvdata(&pdev->dev, bus);
>
>         dev_dbg(&pdev->dev, "%s\n", __func__);

The rest LGTM, so
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68korg

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ