All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org
To: Eduardo Valentin <edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Lee Jones <lee-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-rpi-kernel
	<linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Zhang Rui <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH V9] thermal: bcm2835: add thermal driver for bcm2835 soc
Date: Wed, 8 Feb 2017 09:19:48 +0100	[thread overview]
Message-ID: <909C8619-2800-4BCA-A7C1-BCE7797D52C3@martin.sperl.org> (raw)
In-Reply-To: <20170208043107.GA7097-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>


> On 08.02.2017, at 05:31, Eduardo Valentin <edubezval@gmail.com> wrote:
> 
> On Sat, Feb 04, 2017 at 09:35:47AM +0100, kernel@martin.sperl.org wrote:
>> 
> 
>> So how does this change/impact the driver code itself?
>> 
>> Defining a thermal zone in the dts is just an additional feature
>> that only impacts the device tree.
>> The DT as is works fine and at least allows to read the current temperature.
> 
> Well, your driver is still half finished. It is a DT only driver, which
> does not follow the DT spec on thermal. The impact on your code is that
> it wont need to carry your hardware data in the source code.
> 
> Also, having the data described in DT allows you porting your driver
> without patching it, in  case you need, or any other system engineer,
> to have different thermal data, trips values, number or trips, offset
> and slope per sensor, on different boards, or even on different chip
> version.
> 
> Not to say that having the data described in DT also allows system
> engineers to deploy different thermal zones, based on your
> driver/sensor, to extrapolate different hotspots.
> 

That is all true and as far as I understand you can do all of that
using the current driver - see the patch-sets by Stefan Wahren that
incorporates this into the dts.

My point is still: there are dtb’s that come with 4.10-rcX
that do not have all of those defined 

But as the mantra for DT is: "it is an API”, we have to be backwards
compatible from the driver perspective.
So we need those values in the driver to ensure the older version
of dtb’s are working correctly. That is why it is still included.

Also the settings of the trip are for the HW trip point for the case
that a future version of the firmware does not set up the thermal
HW block.

Do you really want to break this Mantra of backwards compatibility
by having those compatiblity “defines” stripped out with all the
possible negative side-effects if things are not set up correctly?

Thanks,
	Martin

P.s: I find it strange that V3 of the driver was sent out in May 2016
(way before the DTS changes got merged) and you only started to 
give feedback in November only in V8 (that primarily incorporated
minor changes and a rebase to 4.9) by which time the changes to the
dts have already been merged.




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

WARNING: multiple messages have this Message-ID (diff)
From: kernel@martin.sperl.org (kernel at martin.sperl.org)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V9] thermal: bcm2835: add thermal driver for bcm2835 soc
Date: Wed, 8 Feb 2017 09:19:48 +0100	[thread overview]
Message-ID: <909C8619-2800-4BCA-A7C1-BCE7797D52C3@martin.sperl.org> (raw)
In-Reply-To: <20170208043107.GA7097@localhost.localdomain>


> On 08.02.2017, at 05:31, Eduardo Valentin <edubezval@gmail.com> wrote:
> 
> On Sat, Feb 04, 2017 at 09:35:47AM +0100, kernel at martin.sperl.org wrote:
>> 
> 
>> So how does this change/impact the driver code itself?
>> 
>> Defining a thermal zone in the dts is just an additional feature
>> that only impacts the device tree.
>> The DT as is works fine and at least allows to read the current temperature.
> 
> Well, your driver is still half finished. It is a DT only driver, which
> does not follow the DT spec on thermal. The impact on your code is that
> it wont need to carry your hardware data in the source code.
> 
> Also, having the data described in DT allows you porting your driver
> without patching it, in  case you need, or any other system engineer,
> to have different thermal data, trips values, number or trips, offset
> and slope per sensor, on different boards, or even on different chip
> version.
> 
> Not to say that having the data described in DT also allows system
> engineers to deploy different thermal zones, based on your
> driver/sensor, to extrapolate different hotspots.
> 

That is all true and as far as I understand you can do all of that
using the current driver - see the patch-sets by Stefan Wahren that
incorporates this into the dts.

My point is still: there are dtb?s that come with 4.10-rcX
that do not have all of those defined 

But as the mantra for DT is: "it is an API?, we have to be backwards
compatible from the driver perspective.
So we need those values in the driver to ensure the older version
of dtb?s are working correctly. That is why it is still included.

Also the settings of the trip are for the HW trip point for the case
that a future version of the firmware does not set up the thermal
HW block.

Do you really want to break this Mantra of backwards compatibility
by having those compatiblity ?defines? stripped out with all the
possible negative side-effects if things are not set up correctly?

Thanks,
	Martin

P.s: I find it strange that V3 of the driver was sent out in May 2016
(way before the DTS changes got merged) and you only started to 
give feedback in November only in V8 (that primarily incorporated
minor changes and a rebase to 4.9) by which time the changes to the
dts have already been merged.

  parent reply	other threads:[~2017-02-08  8:19 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-07 16:55 [PATCH V9] thermal: bcm2835: add thermal driver for bcm2835 soc kernel
2017-01-07 16:55 ` kernel at martin.sperl.org
2017-01-20  4:14 ` Eduardo Valentin
2017-01-20  4:14   ` Eduardo Valentin
2017-01-20  4:23   ` Eduardo Valentin
2017-01-20  4:23     ` Eduardo Valentin
     [not found]     ` <20170120042323.GA6651-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2017-01-20  8:43       ` kernel-TqfNSX0MhmxHKSADF0wUEw
2017-01-20  8:43         ` kernel at martin.sperl.org
2017-01-24  9:26         ` Eduardo Valentin
2017-01-24  9:26           ` Eduardo Valentin
2017-01-24  9:37           ` kernel
2017-01-24  9:37             ` kernel at martin.sperl.org
     [not found]   ` <20170120041400.GA24617-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2017-01-20  7:54     ` kernel-TqfNSX0MhmxHKSADF0wUEw
2017-01-20  7:54       ` kernel at martin.sperl.org
     [not found]       ` <060918B6-A773-46A5-8D10-C9F6BBA6D3F1-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2017-01-24  9:31         ` Eduardo Valentin
2017-01-24  9:31           ` Eduardo Valentin
2017-01-24  9:52           ` kernel
2017-01-24  9:52             ` kernel at martin.sperl.org
2017-02-02  4:29             ` Eduardo Valentin
2017-02-02  4:29               ` Eduardo Valentin
2017-02-04  8:35               ` kernel
2017-02-04  8:35                 ` kernel at martin.sperl.org
2017-02-04 14:16                 ` [PATCH 1/2] dt-bindings: Add thermal zone to bcm2835-thermal example Stefan Wahren
2017-02-04 14:16                   ` [PATCH 2/2] ARM: dts: bcm283x: Add critical thermal zone for GPU Stefan Wahren
     [not found]                     ` <1486217787-15703-2-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2017-02-08  4:19                       ` Eduardo Valentin
     [not found]                         ` <20170208041929.GA6809-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2017-02-08  4:23                           ` Eduardo Valentin
     [not found]                             ` <20170208042351.GB6809-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2017-02-08  9:56                               ` Stefan Wahren
2017-02-08 19:50                                 ` Eric Anholt
2017-02-09 17:48                                   ` Stefan Wahren
     [not found]                                     ` <124007607.358509.1486662532562-7tX72C7vayboQLBSYMtkGA@public.gmane.org>
2017-02-09 23:34                                       ` Eric Anholt
2017-02-08 22:02                   ` [PATCH 1/2] dt-bindings: Add thermal zone to bcm2835-thermal example Rob Herring
     [not found]                 ` <E0A4388D-788A-40B4-9193-36FD75284654-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2017-02-08  4:31                   ` [PATCH V9] thermal: bcm2835: add thermal driver for bcm2835 soc Eduardo Valentin
2017-02-08  4:31                     ` Eduardo Valentin
     [not found]                     ` <20170208043107.GA7097-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2017-02-08  8:19                       ` kernel-TqfNSX0MhmxHKSADF0wUEw [this message]
2017-02-08  8:19                         ` kernel at martin.sperl.org
2017-02-04  9:36               ` Stefan Wahren
2017-02-04  9:36                 ` Stefan Wahren

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=909C8619-2800-4BCA-A7C1-BCE7797D52C3@martin.sperl.org \
    --to=kernel-tqfnsx0mhmxhksadf0wuew@public.gmane.org \
    --cc=edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=lee-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.