From: Lukasz Majewski <l.majewski@samsung.com>
To: Eduardo Valentin <edubezval@gmail.com>
Cc: Kamil Debski <k.debski@samsung.com>,
Jean Delvare <jdelvare@suse.de>,
Guenter Roeck <linux@roeck-us.net>,
lm-sensors@lm-sensors.org,
Linux PM list <linux-pm@vger.kernel.org>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
devicetree@vger.kernel.org,
Lukasz Majewski <l.majewski@majess.pl>,
Kukjin Kim <kgene.kim@samsung.com>,
linux-kernel@vger.kernel.org,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Abhilash Kesavan <kesavan.abhilash@gmail.com>,
Abhilash Kesavan <a.kesavan@samsung.com>
Subject: Re: [PATCH v2 1/8] thermal: Provide stub for thermal_of_cooling_device_register() function
Date: Thu, 15 Jan 2015 09:43:00 +0100 [thread overview]
Message-ID: <20150115094300.7019081d@amdc2363> (raw)
In-Reply-To: <20150114183211.GB3672@developer>
Hi Eduardo,
> On Wed, Jan 14, 2015 at 04:01:06PM +0100, Lukasz Majewski wrote:
> > Hi Eduardo,
> >
> > > On Fri, Jan 02, 2015 at 02:54:28PM -0400, Eduardo Valentin wrote:
> > > > On Mon, Dec 22, 2014 at 05:27:41PM +0100, Lukasz Majewski wrote:
> > > > > Odroid U3 fan can work without being registered as OF cooling
> > > > > device (with CONFIG_THERMAL_OF disabled).
> > > > > In this situation it can be controlled via PWM entry at
> > > > > /sys/class/hwmon/hwmon0/pwm1.
> > > > >
> > > > > Therefore, the thermal_of_cooling_device_register() function
> > > > > needs a stub to allow clean compilation.
> > > > >
> > > > > Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> > > >
> > > > Acked-by: Eduardo Valentin <edubezval@gmail.com>
> > >
> > > Sorry, too fast,
> > >
> > > This is actually
> > > Nacked-by: Eduardo Valentin <edubezval@gmail.com>
> > >
> > > :-)
> > >
> > > I get this error:
> > > drivers/thermal/thermal_core.c:1210:1: error: redefinition of
> > > ‘thermal_of_cooling_device_register’
> > > thermal_of_cooling_device_register(struct device_node *np,
> > > ^
> > > In file included from drivers/thermal/thermal_core.c:34:0:
> > > include/linux/thermal.h:321:1: note: previous definition of
> > > ‘thermal_of_cooling_device_register’ was here
> > > thermal_of_cooling_device_register(struct device_node *np,
> > > ^
> > >
> > >
> > > We provide the function in thermal core even if CONFIG_THERMAL_OF
> > > is not set.
> >
> > Unfortunately the PWM fan subsystem can work perfectly fine without
> > CONFIG_THERMAL.
> >
>
> Now I understand what you are trying to do.
>
> > I think that it would be enough to make something like this in
> > the ./include/linux/thermal.h:
> >
> > #ifdef CONFIG_THERMAL
> Well, I think it should be the opposite here:
>
> #ifndef CONFIG_THERMAL
>
> that is, if no config thermal, then you provide the stub not the other
> way around.
This seems like a better solution :-).
Thanks.
>
> > static inline struct thermal_cooling_device *
> > thermal_of_cooling_device_register(struct
> > device_node *np, char *type, void *devdata,
> > const struct
> > thermal_cooling_device_ops *ops) {
> > return NULL;
> > }
> > #else
> > [ already present declaration of
> > thermal_of_cooling_device_register() ]
> > #endif /* CONFIG_THERMAL */
>
>
> >
> >
> >
> > > >
> > > > > ---
> > > > > Changes for v2:
> > > > > - None
> > > > > ---
> > > > > include/linux/thermal.h | 14 +++++++++++---
> > > > > 1 file changed, 11 insertions(+), 3 deletions(-)
> > > > >
> > > > > diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> > > > > index 2de3d9e..871123c 100644
> > > > > --- a/include/linux/thermal.h
> > > > > +++ b/include/linux/thermal.h
> > > > > @@ -328,6 +328,10 @@ thermal_zone_of_sensor_register(struct
> > > > > device *dev, int id, void *data, const struct
> > > > > thermal_zone_of_device_ops *ops); void
> > > > > thermal_zone_of_sensor_unregister(struct device *dev, struct
> > > > > thermal_zone_device *tz); +struct thermal_cooling_device *
> > > > > +thermal_of_cooling_device_register(struct device_node *np,
> > > > > + char *type, void *devdata,
> > > > > + const struct
> > > > > thermal_cooling_device_ops *); #else
> > > > > static inline struct thermal_zone_device *
> > > > > thermal_zone_of_sensor_register(struct device *dev, int id,
> > > > > void *data, @@ -342,6 +346,13 @@ void
> > > > > thermal_zone_of_sensor_unregister(struct device *dev, {
> > > > > }
> > > > >
> > > > > +static inline struct thermal_cooling_device *
> > > > > +thermal_of_cooling_device_register(struct device_node *np,
> > > > > + char *type, void *devdata,
> > > > > + const struct
> > > > > thermal_cooling_device_ops *ops) +{
> > > > > + return NULL;
> > > > > +}
> > > > > #endif
> > > > > struct thermal_zone_device
> > > > > *thermal_zone_device_register(const char *, int, int, void *,
> > > > > struct thermal_zone_device_ops *, @@ -357,9 +368,6 @@ void
> > > > > thermal_zone_device_update(struct thermal_zone_device *);
> > > > > struct thermal_cooling_device
> > > > > *thermal_cooling_device_register(char *, void *, const struct
> > > > > thermal_cooling_device_ops *); -struct thermal_cooling_device
> > > > > * -thermal_of_cooling_device_register(struct device_node *np,
> > > > > char *, void *,
> > > > > - const struct
> > > > > thermal_cooling_device_ops *); void
> > > > > thermal_cooling_device_unregister(struct
> > > > > thermal_cooling_device *); struct thermal_zone_device
> > > > > *thermal_zone_get_zone_by_name(const char *name); int
> > > > > thermal_zone_get_temp(struct thermal_zone_device *tz, unsigned
> > > > > long *temp); -- 2.0.0.rc2
> > > > >
> > >
> > >
> >
> >
> >
> > --
> > Best regards,
> >
> > Lukasz Majewski
> >
> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
next prev parent reply other threads:[~2015-01-15 8:43 UTC|newest]
Thread overview: 117+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-18 10:13 [PATCH 0/9] hwmon: thermal: Odroid U3: Provide support for Odroid U3 fan Lukasz Majewski
2014-12-18 10:13 ` [PATCH 1/9] thermal: Provide stub for thermal_of_cooling_device_register() function Lukasz Majewski
2014-12-18 10:13 ` [PATCH 2/9] hwmon: dts: Doc: Add DTS doc to explain how to use PWM FAN as a cooling device Lukasz Majewski
2014-12-18 10:42 ` Sjoerd Simons
2014-12-19 15:32 ` Lukasz Majewski
2014-12-19 16:02 ` Guenter Roeck
2014-12-19 16:13 ` Lukasz Majewski
2015-01-05 10:50 ` Sjoerd Simons
[not found] ` <1420455034.15910.53.camel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2015-01-14 13:56 ` Lukasz Majewski
2015-01-15 8:57 ` Sjoerd Simons
2014-12-18 14:27 ` Guenter Roeck
[not found] ` <5492E46C.3080100-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2014-12-19 16:25 ` Lukasz Majewski
2014-12-18 10:13 ` [PATCH 3/9] ARM: dts: Add pwm-fan node to the Odroid-U3 board Lukasz Majewski
2014-12-18 10:13 ` [PATCH 4/9] hwmon: thermal: dts: Add properties to use pwm-fan device as a cooling device in Odroid U3 Lukasz Majewski
2014-12-18 10:13 ` [PATCH 5/9] hwmon: thermal: Extract __set_pwm() function to only modify PWM duty cycle Lukasz Majewski
2014-12-18 10:13 ` [PATCH 6/9] hwmon: thermal: Read PWM FAN configuration from device tree Lukasz Majewski
2014-12-18 10:13 ` [PATCH 7/9] hwmon: thermal: Code for using PWM FAN as a cooling device Lukasz Majewski
2014-12-18 10:13 ` [PATCH 8/9] hwmon: thermal: Provide 'default-pulse-width' property to setup FAN on boot Lukasz Majewski
2014-12-18 10:13 ` [PATCH 9/9] hwmon: thermal: dts: Disable FAN on boot on the Odroid U3 Lukasz Majewski
2014-12-22 16:27 ` [PATCH v2 0/8] hwmon: thermal: Odroid U3: Provide support for Odroid U3 fan Lukasz Majewski
2014-12-22 16:27 ` [PATCH v2 1/8] thermal: Provide stub for thermal_of_cooling_device_register() function Lukasz Majewski
2015-01-02 18:54 ` Eduardo Valentin
2015-01-02 19:03 ` Eduardo Valentin
2015-01-14 15:01 ` Lukasz Majewski
2015-01-14 18:32 ` Eduardo Valentin
2015-01-15 8:43 ` Lukasz Majewski [this message]
2014-12-22 16:27 ` [PATCH v2 2/8] thermal: Provide stub for thermal_cdev_update() function Lukasz Majewski
[not found] ` <1419265668-32283-3-git-send-email-l.majewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-02 18:40 ` Eduardo Valentin
2015-01-14 15:07 ` Lukasz Majewski
2015-01-14 18:28 ` Eduardo Valentin
2014-12-22 16:27 ` [PATCH v2 3/8] hwmon: dts: Doc: Add DTS doc to explain how to use PWM FAN as a cooling device Lukasz Majewski
2015-01-02 18:51 ` Eduardo Valentin
2014-12-22 16:27 ` [PATCH v2 4/8] ARM: dts: Add pwm-fan node to the Odroid-U3 board Lukasz Majewski
2014-12-22 16:27 ` [PATCH v2 5/8] hwmon: thermal: dts: Add properties to use pwm-fan device as a cooling device in Odroid U3 Lukasz Majewski
2015-01-02 18:52 ` Eduardo Valentin
2014-12-22 16:27 ` [PATCH v2 6/8] hwmon: thermal: Extract __set_pwm() function to only modify PWM duty cycle Lukasz Majewski
2014-12-29 12:52 ` Guenter Roeck
2014-12-22 16:27 ` [PATCH v2 7/8] hwmon: thermal: Read PWM FAN configuration from device tree Lukasz Majewski
2014-12-29 12:50 ` Guenter Roeck
2014-12-22 16:27 ` [PATCH v2 8/8] hwmon: thermal: Code for using PWM FAN as a cooling device Lukasz Majewski
[not found] ` <1418897591-18332-1-git-send-email-l.majewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-02-06 16:59 ` [PATCH v3 0/8] hwmon: thermal: Odroid U3: Provide support for Odroid U3 fan Lukasz Majewski
2015-02-06 16:59 ` [PATCH v3 1/8] thermal: Provide stub for thermal_of_cooling_device_register() function Lukasz Majewski
2015-02-06 16:59 ` [PATCH v3 2/8] thermal: Provide stub for thermal_cdev_update() function Lukasz Majewski
2015-02-06 16:59 ` [PATCH v3 3/8] Documentation: dts: Documentation entry to explain how to use PWM FAN as a cooling device Lukasz Majewski
2015-02-06 16:59 ` [PATCH v3 4/8] ARM: dts: Add pwm-fan node to the Odroid-U3 board Lukasz Majewski
2015-02-06 16:59 ` [PATCH v3 5/8] ARM: dts: Add properties to use pwm-fan device as a cooling device in Odroid U3 Lukasz Majewski
2015-02-06 16:59 ` [PATCH v3 6/8] hwmon: pwm-fan: Extract __set_pwm() function to only modify PWM duty cycle Lukasz Majewski
2015-02-06 18:27 ` Guenter Roeck
2015-02-08 20:52 ` Lukasz Majewski
[not found] ` <1423241948-31981-1-git-send-email-l.majewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-02-06 16:59 ` [PATCH v3 7/8] hwmon: pwm-fan: Read PWM FAN configuration from device tree Lukasz Majewski
2015-02-06 18:36 ` Guenter Roeck
2015-02-08 21:36 ` Lukasz Majewski
2015-02-09 4:40 ` Guenter Roeck
2015-02-06 16:59 ` [PATCH v3 8/8] hwmon: pwm-fan: Code for using PWM FAN as a cooling device Lukasz Majewski
2015-02-18 10:07 ` [PATCH v4 0/8] hwmon: thermal: Odroid U3: Provide support for Odroid U3 fan Lukasz Majewski
2015-02-18 10:07 ` [PATCH v4 1/8] thermal: Provide stub for thermal_of_cooling_device_register() function Lukasz Majewski
2015-02-24 19:21 ` Eduardo Valentin
2015-02-25 12:26 ` Lukasz Majewski
2015-02-18 10:07 ` [PATCH v4 2/8] thermal: Provide stub for thermal_cdev_update() function Lukasz Majewski
2015-02-24 19:21 ` Eduardo Valentin
2015-02-18 10:07 ` [PATCH v4 3/8] Documentation: dts: Documentation entry to explain how to use PWM FAN as a cooling device Lukasz Majewski
2015-02-24 19:25 ` Eduardo Valentin
2015-02-18 10:07 ` [PATCH v4 4/8] ARM: dts: Add pwm-fan node to the Odroid-U3 board Lukasz Majewski
2015-02-18 13:16 ` Andreas Färber
2015-02-18 10:07 ` [PATCH v4 5/8] ARM: dts: Add properties to use pwm-fan device as a cooling device in Odroid U3 Lukasz Majewski
2015-02-24 19:37 ` Eduardo Valentin
2015-02-25 13:28 ` Lukasz Majewski
2015-02-25 18:30 ` Eduardo Valentin
2015-02-18 10:07 ` [PATCH v4 6/8] hwmon: pwm-fan: Extract __set_pwm() function to only modify PWM duty cycle Lukasz Majewski
2015-02-18 10:07 ` [PATCH v4 7/8] hwmon: pwm-fan: Read PWM FAN configuration from device tree Lukasz Majewski
2015-02-21 0:26 ` Guenter Roeck
2015-02-23 16:13 ` Lukasz Majewski
2015-02-23 16:23 ` Guenter Roeck
2015-02-23 16:51 ` Lukasz Majewski
2015-02-23 16:59 ` Guenter Roeck
2015-02-18 10:07 ` [PATCH v4 8/8] hwmon: pwm-fan: Code for using PWM FAN as a cooling device Lukasz Majewski
2015-02-25 15:34 ` [PATCH v5 0/6] hwmon: thermal: Odroid U3: Provide support for Odroid U3 fan Lukasz Majewski
2015-02-25 15:34 ` [PATCH v5 1/6] Documentation: dts: Documentation entry to explain how to use PWM FAN as a cooling device Lukasz Majewski
2015-02-25 19:11 ` Eduardo Valentin
2015-02-25 19:13 ` Eduardo Valentin
2015-02-25 15:34 ` [PATCH v5 2/6] ARM: dts: Add pwm-fan node to the Odroid-U3 board Lukasz Majewski
2015-02-25 15:34 ` [PATCH v5 3/6] ARM: dts: Add properties to use pwm-fan device as a cooling device in Odroid U3 Lukasz Majewski
2015-02-25 18:49 ` Eduardo Valentin
2015-02-25 15:34 ` [PATCH v5 4/6] hwmon: pwm-fan: Extract __set_pwm() function to only modify PWM duty cycle Lukasz Majewski
2015-02-25 15:34 ` [PATCH v5 5/6] hwmon: pwm-fan: Read PWM FAN configuration from device tree Lukasz Majewski
2015-02-25 15:34 ` [PATCH v5 6/6] hwmon: pwm-fan: Code for using PWM FAN as a cooling device Lukasz Majewski
2015-02-25 18:24 ` Eduardo Valentin
2015-02-25 17:18 ` [PATCH v5 0/6] hwmon: thermal: Odroid U3: Provide support for Odroid U3 fan Guenter Roeck
2015-02-25 18:29 ` Eduardo Valentin
2015-02-25 18:42 ` Guenter Roeck
2015-02-26 13:59 ` [PATCH v6 " Lukasz Majewski
2015-02-26 13:59 ` [PATCH v6 1/6] Documentation: dts: Documentation entry to explain how to use PWM FAN as a cooling device Lukasz Majewski
2015-02-26 13:59 ` [PATCH v6 2/6] ARM: dts: Add pwm-fan node to the Odroid-U3 board Lukasz Majewski
2015-02-26 13:59 ` [PATCH v6 3/6] ARM: dts: Add properties to use pwm-fan device as a cooling device in Odroid U3 Lukasz Majewski
2015-02-26 13:59 ` [PATCH v6 4/6] hwmon: pwm-fan: Extract __set_pwm() function to only modify PWM duty cycle Lukasz Majewski
2015-02-26 13:59 ` [PATCH v6 5/6] hwmon: pwm-fan: Read PWM FAN configuration from device tree Lukasz Majewski
2015-02-26 13:59 ` [PATCH v6 6/6] hwmon: pwm-fan: Code for using PWM FAN as a cooling device Lukasz Majewski
2015-02-26 14:12 ` Guenter Roeck
2015-02-26 14:40 ` Lukasz Majewski
2015-03-04 12:03 ` [PATCH RESEND RESEND v6 0/6] hwmon: thermal: Odroid U3: Provide support for Odroid U3 fan Lukasz Majewski
2015-03-04 12:03 ` [PATCH RESEND v6 1/6] Documentation: dts: Documentation entry to explain how to use PWM FAN as a cooling device Lukasz Majewski
2015-03-04 12:03 ` [PATCH RESEND v6 2/6] ARM: dts: Add pwm-fan node to the Odroid-U3 board Lukasz Majewski
2015-03-04 12:03 ` [PATCH RESEND v6 3/6] ARM: dts: Add properties to use pwm-fan device as a cooling device in Odroid U3 Lukasz Majewski
2015-03-04 12:03 ` [PATCH RESEND v6 4/6] hwmon: pwm-fan: Extract __set_pwm() function to only modify PWM duty cycle Lukasz Majewski
2015-03-04 12:03 ` [PATCH RESEND v6 5/6] hwmon: pwm-fan: Read PWM FAN configuration from device tree Lukasz Majewski
2015-03-04 12:03 ` [PATCH RESEND v6 6/6] hwmon: pwm-fan: Code for using PWM FAN as a cooling device Lukasz Majewski
2015-08-11 13:07 ` [PATCH RESEND v6 0/3] dts: thermal: Odroid U3: Provide support for Odroid U3 fan Lukasz Majewski
2015-08-11 13:07 ` [PATCH RESEND v6 1/3] Documentation: dts: Documentation entry to explain how to use PWM FAN as a cooling device Lukasz Majewski
2015-08-13 0:17 ` Krzysztof Kozlowski
2015-08-14 9:36 ` Kukjin Kim
2015-08-16 9:35 ` Krzysztof Kozlowski
2015-09-16 11:00 ` [PATCH RESEND v6 0/3] dts: thermal: Odroid U3: Provide support for Odroid U3 fan Thomas Pietrowski
2015-09-16 11:57 ` Krzysztof Kozlowski
2015-08-11 13:14 ` [PATCH RESEND v6 2/3] ARM: dts: Add pwm-fan node to the Odroid-U3 board Lukasz Majewski
2015-08-13 0:35 ` Krzysztof Kozlowski
2015-08-11 13:15 ` [PATCH RESEND v6 3/3] ARM: dts: Add properties to use pwm-fan device as a cooling device in Odroid U3 Lukasz Majewski
2015-08-13 0:35 ` Krzysztof Kozlowski
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=20150115094300.7019081d@amdc2363 \
--to=l.majewski@samsung.com \
--cc=a.kesavan@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=edubezval@gmail.com \
--cc=jdelvare@suse.de \
--cc=k.debski@samsung.com \
--cc=kesavan.abhilash@gmail.com \
--cc=kgene.kim@samsung.com \
--cc=l.majewski@majess.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lm-sensors@lm-sensors.org \
--cc=s.nawrocki@samsung.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).