Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753312AbbBYM0v (ORCPT ); Wed, 25 Feb 2015 07:26:51 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:51255 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752245AbbBYM0t (ORCPT ); Wed, 25 Feb 2015 07:26:49 -0500 X-AuditID: cbfee61b-f79d76d0000024d6-1e-54edbf8760e1 Date: Wed, 25 Feb 2015 13:26:23 +0100 From: Lukasz Majewski To: Eduardo Valentin Cc: Kamil Debski , Jean Delvare , Guenter Roeck , Kukjin Kim , lm-sensors@lm-sensors.org, Linux PM list , "linux-samsung-soc@vger.kernel.org" , devicetree@vger.kernel.org, Lukasz Majewski , Kukjin Kim , linux-kernel@vger.kernel.org, Sjoerd Simons , Abhilash Kesavan , Abhilash Kesavan Subject: Re: [PATCH v4 1/8] thermal: Provide stub for thermal_of_cooling_device_register() function Message-id: <20150225132623.753adaca@amdc2363> In-reply-to: <20150224192153.GH3448@developer.amazonguestwifi.org> References: <1418897591-18332-1-git-send-email-l.majewski@samsung.com> <1424254056-5904-1-git-send-email-l.majewski@samsung.com> <1424254056-5904-2-git-send-email-l.majewski@samsung.com> <20150224192153.GH3448@developer.amazonguestwifi.org> Organization: SPRC Poland X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIIsWRmVeSWpSXmKPExsVy+t9jQd32/W9DDDaukrN4vGYxk8X8I+dY LeZfucZqsfTuJzaLH68vsFms+atk0bvgKptF/+PXzBZvHnFbXN41h83ic+8RRosZ5/cxWTxZ eIbJ4s60vWwW04+/ZXXg9/j7/DqLx85Zd9k9Nq3qZPN4MHE3m8e6aW+ZPXZ+b2D36NuyitFj 8+lqj8+b5AI4o7hsUlJzMstSi/TtErgyNnfVFMwUq7i77RNjA+NPwS5GTg4JAROJFwtXMkHY YhIX7q1n62Lk4hASmM4ose7xHkYI5xejxJcPZ1hAqlgEVCUenlzFCmKzCehJfL77FKxbREBL 4sSl7UwgDcwC21kktk/+xA6SEBZIlZjZeA+siBeo4eDUWUBxDg5OASeJ04fqIBZ8Y5Q4/PQ4 2AJ+AUmJ9n8/mCFOspM492kDO0SvoMSPyffAapiBlm3e1sQKYctLbF7zlnkCo+AsJGWzkJTN QlK2gJF5FaNoakFyQXFSeq6RXnFibnFpXrpecn7uJkZwxD2T3sG4qsHiEKMAB6MSD2+i8JsQ IdbEsuLK3EOMEhzMSiK8v7a+DRHiTUmsrEotyo8vKs1JLT7EKM3BoiTOq2TfFiIkkJ5Ykpqd mlqQWgSTZeLglGpgjFofKDAl/m31hfy8M8lrL6Y5X399MCDM3Y1H8ufn+XXOneZvXNYWZNb9 8evhf+twf+mpjdq7H8rKTJ5Yu35Xz/Hw0/Wd76esDTiX7Hoo4EEU47PN7SWeE42PuVVNcGUV Non4ZX72zovCpql75KJYmm2uMy5ZOe3LjK17711c/V+ueYXJ8rOpTkosxRmJhlrMRcWJAK9D 9VC0AgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3002 Lines: 89 Hi Eduardo, > On Wed, Feb 18, 2015 at 11:07:29AM +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. > > > I've just applied a patch on this same matter from Nishanth Menon [1]. > Can you please check if his patch is enough for you? > > [1] - > https://git.kernel.org/cgit/linux/kernel/git/evalenti/linux-soc-thermal.git/commit/?h=fixes&id=12ca7188468ee29c4e717f73db4bf43c90954fc7 > I will prepare new PWM-FAN patch set with above changes in mind. > > > > > Signed-off-by: Lukasz Majewski > > --- > > Changes for v2: > > - None > > Changes for v3: > > - Provide stub declaration when CONFIG_THERMAL is not set > > Changes for v4: > > - None > > --- > > include/linux/thermal.h | 17 ++++++++++++++--- > > 1 file changed, 14 insertions(+), 3 deletions(-) > > > > diff --git a/include/linux/thermal.h b/include/linux/thermal.h > > index fc52e30..eacf2de 100644 > > --- a/include/linux/thermal.h > > +++ b/include/linux/thermal.h > > @@ -293,6 +293,20 @@ struct thermal_trip { > > }; > > > > /* Function declarations */ > > +#ifdef CONFIG_THERMAL > > +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_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 > > #ifdef CONFIG_THERMAL_OF > > struct thermal_zone_device * > > thermal_zone_of_sensor_register(struct device *dev, int id, void > > *data, @@ -328,9 +342,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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/