public inbox for cip-dev@lists.cip-project.org
 help / color / mirror / Atom feed
From: ben.hutchings@codethink.co.uk (Ben Hutchings)
To: cip-dev@lists.cip-project.org
Subject: [cip-dev] [PATCH 57/62] thermal: rcar: enable to use thermal-zone on DT
Date: Wed, 30 May 2018 16:29:04 +0100	[thread overview]
Message-ID: <1527694144.2289.10.camel@codethink.co.uk> (raw)
In-Reply-To: <OSBPR01MB21031EC0D28B91DAFEF38990B8950@OSBPR01MB2103.jpnprd01.prod.outlook.com>

On Mon, 2018-05-21 at 13:46 +0000, Biju Das wrote:
> Hi Ben,
> 
> Thanks for the feedback.
> 
> > Subject: Re: [PATCH 57/62] thermal: rcar: enable to use thermal-zone on DT
> > 
> > On Thu, 2018-05-10 at 16:08 +0100, Biju Das wrote:
> > > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > > 
> > > This patch enables to use thermal-zone on DT if it was calles as
> > > "renesas,rcar-thermal-gen2".
> > > Previous style (= non thermal-zone) is still supported by
> > > "renesas,rcar-thermal" to keep compatibility for "git bisect".
> > > 
> > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > > Signed-off-by: Eduardo Valentin <edubezval@gmail.com> (cherry picked
> > > from commit 8b477ea56383dc8b838f1f8b506e4571c14ceb30)
> > > Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> > > Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > 
> > [...]
> > > --- a/drivers/thermal/rcar_thermal.c
> > > +++ b/drivers/thermal/rcar_thermal.c
> > 
> > [...]
> > > @@ -463,7 +492,13 @@ static int rcar_thermal_probe(struct
> > 
> > platform_device *pdev)
> > > ?if (ret < 0)
> > > ?goto error_unregister;
> > > 
> > > -priv->zone = thermal_zone_device_register("rcar_thermal",
> > > +if (of_data == USE_OF_THERMAL)
> > > +priv->zone = thermal_zone_of_sensor_register(
> > > +dev, i, priv,
> > > +
> > 
> > &rcar_thermal_zone_of_ops);
> > 
> > Doesn't this require a corresponding change to use
> > thermal_zone_of_sensor_unregister()?
> 
> As per??the commit(d4b23c5c434a) message "devm_thermal_zone_of_sensor_register() case doesn't need to call???thermal_zone_device_unregister()"
> 
> We are not using devm version of thermal_zone_of_sensor_register, so??I guess the below commit is not required.
> d4b23c5c434a ("thermal: rcar_thermal: don't call thermal_zone_device_unregister when USE_OF_THERMAL")

Even so, it is wrong to use thermal_zone_of_sensor_register() and then
thermal_zone_device_unregister().

> > It looks like this was fixed upstream by commits 5e325868aa59
> > ("thermal: convert rcar_thermal to use
> > devm_thermal_zone_of_sensor_register") and d4b23c5c434a ("thermal:
> > rcar_thermal: don't call thermal_zone_device_unregister when
> > USE_OF_THERMAL").
> 
> The commit 5e325868aa59 ("thermal: convert rcar_thermal to use devm_thermal_zone_of_sensor_register")
> depend upon the commit e498b4984 ("thermal: of-thermal: Add devm version of??thermal_zone_of_sensor_register")
> which is outside the scope of renesas thermal driver.
> 
> ?Are you ok for backporting the above patch? If yes, then it make sense to backport the commits 5e325868aa59 and d4b23c5c434a.

Yes, I think this is OK.  Commit?e498b4984 doesn't change any existing
functions so it should be safe to add.

Ben.

-- 
Ben Hutchings, Software Developer                ?        Codethink Ltd
https://www.codethink.co.uk/                 Dale House, 35 Dale Street
                                     Manchester, M1 2HF, United Kingdom
We respect your privacy.?? See https://www.codethink.co.uk/privacy.html

  reply	other threads:[~2018-05-30 15:29 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 15:07 [cip-dev] [PATCH 00/62] Add CAN, PCIe, VIN, Audio, PWM, TPU and thermal support Biju Das
2018-05-10 15:07 ` [cip-dev] [PATCH 01/62] pinctrl: sh-pfc: r8a7791: Add can_clk function Biju Das
2018-05-10 15:07 ` [cip-dev] [PATCH 02/62] can: rcar: add gen[12] fallback compatibility strings Biju Das
2018-05-10 15:07 ` [cip-dev] [PATCH 03/62] dt-bindings: can: rcar_can: document r8a774[35] can support Biju Das
2018-05-10 15:07 ` [cip-dev] [PATCH 04/62] ARM: dts: r8a7743: Add CAN[01] SoC support Biju Das
2018-05-10 15:07 ` [cip-dev] [PATCH 05/62] ARM: dts: iwg20d-q7-common: Add can0 support to carrier board Biju Das
2018-05-10 15:07 ` [cip-dev] [PATCH 06/62] ARM: dts: iwg20d-q7-dbcm-ca: Add can1 support to camera DB Biju Das
2018-05-10 15:07 ` [cip-dev] [PATCH 07/62] ARM: shmobile: defconfig: Enable missing support based on DTSes Biju Das
2018-05-10 15:07 ` [cip-dev] [PATCH 08/62] PCI: rcar: Convert to DT resource parsing API Biju Das
2018-05-10 15:07 ` [cip-dev] [PATCH 09/62] PCI: rcar: Add gen2 fallback compatibility string for pcie-rcar Biju Das
2018-05-10 15:07 ` [cip-dev] [PATCH 10/62] PCI: rcar: Remove unused pci_sys_data struct from pcie-rcar Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 11/62] PCI: rcar: Add runtime PM support to pcie-rcar Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 12/62] PCI: rcar: Add Gen2 PHY setup " Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 13/62] PCI: rcar: Use proper name for the R-Car SoC Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 14/62] dt-bindings: PCI: rcar: Add device tree support for r8a7743 Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 15/62] ARM: dts: r8a7743: Add default PCIe bus clock Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 16/62] ARM: dts: r8a7743: Add PCIe Controller device node Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 17/62] ARM: dts: iwg20d-q7: Enable PCIe Controller Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 18/62] soc_camera: rcar_vin: add R-Car Gen 2 and 3 fallback compatibility strings Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 19/62] ARM: dts: r8a7743: add VIN dt support Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 20/62] ASoC: rsnd: audio_clkout0/1/2/3 are optional properties Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 21/62] ASoC: rsnd: add missing DT example for Simple Card Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 22/62] ASoC: rsnd: add missing DT example for Simple Card with TDM Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 23/62] ASoC: rsnd: Add device tree support for r8a774[35] Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 24/62] ARM: shmobile: defconfig: Enable SGTL5000 audio codec Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 25/62] dmaengine: rcar-dmac: Document SoC specific bindings Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 26/62] DT: dmaengine: rcar-dmac: document R8A7743/5 support Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 27/62] ASoC: sgtl5000: Remove misleading comment Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 28/62] ASoC: sgtl5000: Fix regulator support Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 29/62] ASoC: sgtl5000: Write all default registers Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 30/62] ASoC: sgtl5000: Initialize CHIP_ANA_POWER to power-on defaults Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 31/62] ASoC: sgtl5000: Disable internal PLL early Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 32/62] ASoC: sgtl5000: Do not disable regulators in SND_SOC_BIAS_OFF Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 33/62] sgtl5000: add Lineout volume control Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 34/62] ARM: dts: r8a7743: Add audio clocks Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 35/62] ARM: dts: r8a7743: Add audio DMAC support Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 36/62] ARM: dts: r8a7743: Add sound support Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 37/62] ARM: dts: iwg20d-q7-common: Enable SGTL5000 audio codec Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 38/62] ARM: dts: iwg20d-q7-common: Sound PIO support Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 39/62] ARM: dts: iwg20d-q7-common: Sound DMA support on DTS Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 40/62] ARM: dts: iwg20d-q7-common: Sound DMA support via BUSIF " Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 41/62] ARM: dts: iwg20d-q7-common: Sound DMA support via SRC " Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 42/62] ARM: dts: iwg20d-q7-common: Sound DMA support via DVC " Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 43/62] pinctrl: sh-pfc: r8a7791: Add tpu groups and function Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 44/62] dt-bindings: pwm: renesas-tpu: Document r8a774[35] support Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 45/62] ARM: dts: r8a7743: Add TPU support Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 46/62] ARM: multi_v7_defconfig: Select PWM_RCAR as module Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 47/62] ARM: shmobile: defconfig: Enable PWM Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 48/62] pwm: rcar: Improve accuracy of frequency division setting Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 49/62] pwm: rcar: Make use of pwm_is_enabled() Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 50/62] pwm: rcar: Use PM Runtime to control module clock Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 51/62] dt-bindings: pwm: rcar: Document r8a774[35] PWM bindings Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 52/62] ARM: dts: r8a7743: Add PWM SoC support Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 53/62] thermal: rcar: move rcar_thermal_dt_ids to upside Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 54/62] thermal: rcar: check every rcar_thermal_update_temp() return value Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 55/62] thermal: rcar: check irq possibility in rcar_thermal_irq_xxx() Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 56/62] thermal: rcar: rcar_thermal_get_temp() return error if strange temp Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 57/62] thermal: rcar: enable to use thermal-zone on DT Biju Das
2018-05-11 19:11   ` Ben Hutchings
2018-05-15 10:03     ` Fabrizio Castro
2018-05-21 13:46     ` Biju Das
2018-05-30 15:29       ` Ben Hutchings [this message]
2018-05-30 16:34         ` Biju Das
2018-05-30 16:41           ` Ben Hutchings
2018-05-10 15:08 ` [cip-dev] [PATCH 58/62] thermal: rcar_thermal: don't open code of_device_get_match_data() Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 59/62] thermal: rcar_thermal: Fix priv->zone error handling Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 60/62] thermal: rcar-thermal: enable hwmon when thermal_zone_of_sensor_register is used Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 61/62] dt-bindings: thermal: rcar: Add device tree support for r8a7743 Biju Das
2018-05-10 15:08 ` [cip-dev] [PATCH 62/62] ARM: dts: r8a7743: Add thermal device to DT Biju Das

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=1527694144.2289.10.camel@codethink.co.uk \
    --to=ben.hutchings@codethink.co.uk \
    --cc=cip-dev@lists.cip-project.org \
    /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