From: eduardo.valentin@ti•com (Eduardo Valentin)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 3/5] drivers: thermal: make usage of CONFIG_THERMAL_HWMON optional
Date: Wed, 28 Aug 2013 09:15:50 -0400 [thread overview]
Message-ID: <521DF806.4030900@ti.com> (raw)
In-Reply-To: <1377648836.2335.252.camel@rzhang-lenovo>
On 27-08-2013 20:13, Zhang Rui wrote:
> On ?, 2013-08-27 at 23:17 +0200, Rafael J. Wysocki wrote:
>> On Tuesday, August 27, 2013 02:26:41 PM Eduardo Valentin wrote:
>>> On 23-08-2013 19:08, Rafael J. Wysocki wrote:
>>>> On Friday, August 23, 2013 06:03:14 PM Eduardo Valentin wrote:
>>>>> When registering a new thermal_device, the thermal framework
>>>>> will always add a hwmon sysfs interface.
>>>>>
>>>>> This patch adds a flag to make this behavior optional. Now
>>>>> when registering a new thermal device, the caller needs
>>>>> to say if the hwmon interface is required.
>>>>>
>>>>> In order to keep same behavior as of today, all current
>>>>> calls will by default create the hwmon interface.
>>>>
>>>> Well, instead of modifying all of the callers this way, why don't
>>>> you add new versions taking the additional argument as, for example,
>>>>
>>>> thermal_zone_device_register_full()
>>>>
>>>> and redefine the old ones as static inline wrappers, for example
>>>>
>>>> static inline struct thermal_zone_device *thermal_zone_device_register(args)
>>>> {
>>>> return thermal_zone_device_register_full(args, true);
>>>> }
>>>>
>>>> ?
>>>
>>> Yeah, that is another way to go and I thought of doing it like that. I
>>> just could not come out with a good API naming:
>>>
>>> thermal_zone_device_register_full(all args)
>>>
>>> thermal_zone_device_register(args) /* on hwmon == true */
>>> thermal_zone_device_register_no_hwmon(args) /* on hwmon == false */
>>>
>>> Would this sound reasonable naming?
>>
>> Yeah, sounds good to me.
>>
> Well, actually, Tianyu is working on a patch set to move all the
> thermal_zone_device_register() parameters to struct thermal_zone_params.
>
> But with that patch set done, what you need to do next is just to
> introduce a new field in struct thermal_zone_params and make sure 0
> means registering hwmon sysfs I/F.
Rui,
Do you have a pointer to his patch?
>
> thanks,
> rui
>
>> Thanks,
>> Rafael
>>
>
>
>
>
--
You have got to be excited about what you are doing. (L. Lamport)
Eduardo Valentin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130828/6397da74/attachment.sig>
next prev parent reply other threads:[~2013-08-28 13:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1377295396-17289-1-git-send-email-eduardo.valentin@ti.com>
2013-08-23 22:03 ` [PATCH 3/5] drivers: thermal: make usage of CONFIG_THERMAL_HWMON optional Eduardo Valentin
2013-08-23 23:08 ` Rafael J. Wysocki
2013-08-27 18:26 ` Eduardo Valentin
2013-08-27 21:17 ` Rafael J. Wysocki
2013-08-28 0:13 ` Zhang Rui
2013-08-28 13:15 ` Eduardo Valentin [this message]
2013-08-29 20:12 ` [PATCHv2 " Eduardo Valentin
2013-09-02 14:09 ` Eduardo Valentin
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=521DF806.4030900@ti.com \
--to=eduardo.valentin@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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