linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Guillaume La Roque <glaroque@baylibre.com>
Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org,
	khilman@baylibre.com, daniel.lezcano@linaro.org,
	linux-kernel@vger.kernel.org,
	Neil Armstrong <narmstrong@baylibre.com>,
	linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 2/6] thermal: amlogic: Add thermal driver to support G12 SoCs
Date: Sun, 11 Aug 2019 17:43:49 +0200	[thread overview]
Message-ID: <CAFBinCAMjtWTAvVEhMxDx1NPvCp9dU8HewxBxxp1TAtr3ZbKtw@mail.gmail.com> (raw)
In-Reply-To: <20190806130506.8753-3-glaroque@baylibre.com>

Hi Guillaume,

[...]
> +struct amlogic_thermal {
> +       struct platform_device *pdev;
> +       const struct amlogic_thermal_data *data;
> +       struct regmap *regmap;
> +       struct regmap *sec_ao_map;
> +       struct clk *clk;
> +       struct thermal_zone_device *tzd;
> +       u32 trim_info;
> +       void __iomem *base;
nit-pick: this is only used in _probe() so you could make it a local
variable there

[...]
> +static const struct of_device_id of_amlogic_thermal_match[] = {
> +       {
> +               .compatible = "amlogic,g12-ddr-thermal",
> +               .data = &amlogic_thermal_g12_ddr_param,
> +       },
> +       {
> +               .compatible = "amlogic,g12-cpu-thermal",
> +               .data = &amlogic_thermal_g12_cpu_param,
> +       },
I assume you are using "g12" to indicate that it's valid for both,
G12A and G12B?
meson-g12-common.dtsi currently does not use any other "amlogic,g12-*"
compatible string (there are some meson-axg-*, meson-gx-* and
meson-g12a-* ones, but no g12-*)
I would like to hear Kevin's and Neil's opinion on this one whether we
should introduce that "amlogic,g12-*" prefix or stick to
"amlogic,g12a-*"

[...]
> +       ret = amlogic_thermal_enable(pdata);
> +       if (ret)
> +               clk_disable_unprepare(pdata->clk);
amlogic_thermal_enable only returns an error-code if clk_prepare_enable() fails
in that case the clock is neither prepared nor enabled so we must not
call clk_disable_unprepare

apart from that it looks good to me (as someone who doesn't know the
thermal framework)


Martin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2019-08-11 15:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-06 13:05 [PATCH v3 0/6] Add support of New Amlogic temperature sensor for G12 SoCs Guillaume La Roque
2019-08-06 13:05 ` [PATCH v3 1/6] dt-bindings: thermal: Add DT bindings documentation for Amlogic Thermal Guillaume La Roque
2019-08-21 19:31   ` Rob Herring
2019-08-06 13:05 ` [PATCH v3 2/6] thermal: amlogic: Add thermal driver to support G12 SoCs Guillaume La Roque
2019-08-11 15:43   ` Martin Blumenstingl [this message]
2019-08-06 13:05 ` [PATCH v3 3/6] arm64: dts: amlogic: g12: add temperature sensor Guillaume La Roque
2019-08-06 13:05 ` [PATCH v3 4/6] arm64: dts: meson: sei510: Add minimal thermal zone Guillaume La Roque
2019-08-06 19:24   ` Martin Blumenstingl
2019-08-06 13:05 ` [PATCH v3 5/6] arm64: dts: amlogic: odroid-n2: add " Guillaume La Roque
2019-08-06 19:25   ` Martin Blumenstingl
2019-08-06 13:05 ` [PATCH v3 6/6] MAINTAINERS: add entry for Amlogic Thermal driver Guillaume La Roque
2019-08-10  0:11 ` [PATCH v3 0/6] Add support of New Amlogic temperature sensor for G12 SoCs Kevin Hilman
2019-08-21 21:30   ` Kevin Hilman
2019-08-14 12:24 ` Christian Hewitt
2019-08-21 21:19   ` guillaume La Roque

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=CAFBinCAMjtWTAvVEhMxDx1NPvCp9dU8HewxBxxp1TAtr3ZbKtw@mail.gmail.com \
    --to=martin.blumenstingl@googlemail.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=glaroque@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    /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;
as well as URLs for NNTP newsgroup(s).