From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Eduardo Valentin <eduardo.valentin@ti.com>
Cc: linux-pm@vger.kernel.org, rui.zhang@intel.com,
linux-kernel@vger.kernel.org, Anton Vorontsov <anton@enomsg.org>,
David Woodhouse <dwmw2@infradead.org>,
devicetree@vger.kernel.org,
Grant Likely <grant.likely@linaro.org>,
Kukjin Kim <kgene.kim@samsung.com>, Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
Matthew Garrett <matthew.garrett@nebula.com>,
Peter Feuerer <peter@piie.net>,
platform-driver-x86@vger.kernel.org,
Rob Herring <rob.herring@calxeda.com>
Subject: Re: [PATCH 3/5] drivers: thermal: make usage of CONFIG_THERMAL_HWMON optional
Date: Tue, 27 Aug 2013 23:17:38 +0200 [thread overview]
Message-ID: <8131326.8QGX41MW6c@vostro.rjw.lan> (raw)
In-Reply-To: <521CEF61.6040504@ti.com>
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.
Thanks,
Rafael
next prev parent reply other threads:[~2013-08-27 21:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 22:03 [PATCH 0/5] drivers: thermal: several fixes Eduardo Valentin
2013-08-23 22:03 ` [PATCH 1/5] thermal: hwmon: move hwmon support to single file Eduardo Valentin
2013-08-23 22:03 ` [PATCH 2/5] drivers: thermal: parent virtual hwmon with thermal zone Eduardo Valentin
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 [this message]
2013-08-28 0:13 ` Zhang Rui
2013-08-28 13:15 ` Eduardo Valentin
2013-08-29 20:12 ` [PATCHv2 " Eduardo Valentin
2013-09-02 14:09 ` Eduardo Valentin
2013-08-23 22:03 ` [PATCH 4/5] thermal: thermal_core: allow binding with limits on bind_params Eduardo Valentin
2013-08-23 22:03 ` [PATCH 5/5] drivers: thermal: add check when unregistering cpu cooling 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=8131326.8QGX41MW6c@vostro.rjw.lan \
--to=rjw@sisk.pl \
--cc=anton@enomsg.org \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=eduardo.valentin@ti.com \
--cc=grant.likely@linaro.org \
--cc=kgene.kim@samsung.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=matthew.garrett@nebula.com \
--cc=peter@piie.net \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=rui.zhang@intel.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
all inboxes | Powered by JetHome®