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] [day] [month] [year] [list]
Message-ID: <CAGb2v66CnNEw0Rhh0SLnr73b+TPJXCZ_eY3n4nH8_9LiXj2Ydw@mail.gmail.com>
Date: Sat, 12 Jul 2025 16:25:42 +0800
From: Chen-Yu Tsai <wens@...e.org>
To: iuncuim <iuncuim@...il.com>
Cc: Srinivas Kandagatla <srini@...nel.org>, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Jernej Skrabec <jernej.skrabec@...il.com>, Samuel Holland <samuel@...lland.org>, 
	Vasily Khoruzhick <anarsoul@...il.com>, Yangtao Li <tiny.windzz@...il.com>, 
	"Rafael J . Wysocki" <rafael@...nel.org>, Daniel Lezcano <daniel.lezcano@...aro.org>, 
	Zhang Rui <rui.zhang@...el.com>, Lukasz Luba <lukasz.luba@....com>, 
	Philipp Zabel <p.zabel@...gutronix.de>, Maxime Ripard <mripard@...nel.org>, devicetree@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev, 
	linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH v2 3/8] thermal/drivers/sun8i: add gpadc clock

On Thu, Jul 3, 2025 at 11:13 PM iuncuim <iuncuim@...il.com> wrote:
>
> From: Mikhail Kalashnikov <iuncuim@...il.com>
>
> Some processors (e.g. Allwinner A523) require GPADC clocking activation for
> temperature sensors to work. So let's add support for enabling it.
>
> Signed-off-by: Mikhail Kalashnikov <iuncuim@...il.com>
> ---
>  drivers/thermal/sun8i_thermal.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
> index 226747906..45aaf5348 100644
> --- a/drivers/thermal/sun8i_thermal.c
> +++ b/drivers/thermal/sun8i_thermal.c
> @@ -66,8 +66,9 @@ struct tsensor {
>  };
>
>  struct ths_thermal_chip {
> -       bool            has_mod_clk;
> -       bool            has_bus_clk_reset;
> +       bool            has_gpadc_clk;
> +       bool            has_mod_clk;
> +       bool            has_bus_clk_reset;

What's with the random whitespace change here?

>         bool            needs_sram;
>         int             sensor_num;
>         int             offset;
> @@ -89,7 +90,8 @@ struct ths_device {
>         struct regmap_field                     *sram_regmap_field;
>         struct reset_control                    *reset;
>         struct clk                              *bus_clk;
> -       struct clk                              *mod_clk;
> +       struct clk                              *mod_clk;
> +       struct clk                              *gpadc_clk;

And here?

>         struct tsensor                          sensor[MAX_SENSOR_NUM];
>  };
>
> @@ -417,6 +419,12 @@ static int sun8i_ths_resource_init(struct ths_device *tmdev)
>         if (ret)
>                 return ret;
>
> +       if (tmdev->chip->has_gpadc_clk) {
> +               tmdev->gpadc_clk = devm_clk_get_enabled(&pdev->dev, "gpadc");
> +               if (IS_ERR(tmdev->gpadc_clk))
> +                       return PTR_ERR(tmdev->gpadc_clk);
> +       }
> +

This looks correct.


ChenYu

>         if (tmdev->chip->needs_sram) {
>                 struct regmap *regmap;
>
> --
> 2.49.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ