Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932380AbbBZOku (ORCPT ); Thu, 26 Feb 2015 09:40:50 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:26775 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932194AbbBZOkr (ORCPT ); Thu, 26 Feb 2015 09:40:47 -0500 X-AuditID: cbfee61a-f79c06d000004e71-c6-54ef306c18a7 Date: Thu, 26 Feb 2015 15:40:33 +0100 From: Lukasz Majewski To: Guenter Roeck Cc: Eduardo Valentin , Kamil Debski , Jean Delvare , 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 v6 6/6] hwmon: pwm-fan: Code for using PWM FAN as a cooling device Message-id: <20150226154033.301a699d@amdc2363> In-reply-to: <54EF29D4.7040508@roeck-us.net> References: <1418897591-18332-1-git-send-email-l.majewski@samsung.com> <1424959177-28739-1-git-send-email-l.majewski@samsung.com> <1424959177-28739-7-git-send-email-l.majewski@samsung.com> <54EF29D4.7040508@roeck-us.net> 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+NgFlrEIsWRmVeSWpSXmKPExsVy+t9jQd0cg/chBgtumFo8XrOYyWL+kXOs FvOvXGO1WHr3E5vFj9cX2CzW/FWy6F1wlc2i//FrZos3j7gtLu+aw2bxufcIo8WM8/uYLJ4s PMNkcWfaXjaL6cffsjrwe/x9fp3FY+esu+wem1Z1snk8mLibzWPdtLfMHju/N7B79G1Zxeix +XS1x+dNcgGcUVw2Kak5mWWpRfp2CVwZi060sxacEKi4feI3WwPjKt4uRk4OCQETiZnrG9kh bDGJC/fWs3UxcnEICUxnlPiwYBtYQkjgF6PEw5n2IDaLgKrE28dbmEBsNgE9ic93n4LZIgJq Es2nWsCamQX2skh8/3iYDSQhLBAhsercUUYQmxeoYdXpT2BDOQV0JM5tOcsEse0Ro8SPTw+Z QRL8ApIS7f9+MEOcZCdx7tMGdohmQYkfk++xgNjMAloSm7c1sULY8hKb17xlnsAoOAtJ2Swk ZbOQlC1gZF7FKJpakFxQnJSea6hXnJhbXJqXrpecn7uJERxzz6R2MK5ssDjEKMDBqMTDm5D9 LkSINbGsuDL3EKMEB7OSCO9HvfchQrwpiZVVqUX58UWlOanFhxilOViUxHmV7NtChATSE0tS s1NTC1KLYLJMHJxSDYxsnKe26ldtTmcMMT77tHvdvB8d/o/K195kF+055PbyveOip8brvR2t fD9pnmjpW10k/0zt5JNiSfaTfnnqD5YcN9FbydR7/J8Lb1+6lmXWewlH2QstTsVcbWk3aoyd f67OfyF12ODbk7Dtaapzy85u+DuFv7HyqVBH8anqOXM0n90/G3H3o7QSS3FGoqEWc1FxIgDe AUG8tQIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2302 Lines: 68 Hi Guenter, > On 02/26/2015 05:59 AM, Lukasz Majewski wrote: > > The PWM FAN device can now be used as a thermal cooling device. > > Necessary infrastructure has been added in this commit. > > > > Signed-off-by: Lukasz Majewski > > Acked-by: Eduardo Valentin > > --- > > Changes for v2: > > - Replace pwm_fan_cooling_states with pwm_fan_cooling_levels > > - Update ctx->pwm_fan_state when correct data from device tree is > > available > > - Using therma_cdev_update() when thermal is ready for controlling > > the fan Changes for v3: > > - Rename patch heading > > - pwm_fan_of_get_cooling_data() now returns -EINVAL when no > > "cooling-levels" property defined > > - register of cooling device only when proper cooling data is > > present Changes for v4: > > - None > > Changes for v5: > > - Check for IS_ENABLED(CONFIG_THERMAL) has been added to prevent > > from executing thermal_* specific functions > > Changes for v6: > > - Adding missing ctx == NULL check in pwm_fan_get_max_state() > > - Call to thermal_cooling_device_unregister(ctx->cdev); at > > pwm_fan_remove() > > - struct thermal_cooling_device *cdev; added to struct pwm_fan_ctx > > --- > > drivers/hwmon/pwm-fan.c | 89 > > ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, > > 88 insertions(+), 1 deletion(-) > [ ... ] > > > > @@ -200,6 +286,7 @@ static int pwm_fan_remove(struct > > platform_device *pdev) { > > struct pwm_fan_ctx *ctx = platform_get_drvdata(pdev); > > > > + thermal_cooling_device_unregister(ctx->cdev); > > Unfortunately there is still no prototype for this if CONFIG_THERMAL > is not configured. Yes... since Nishanth Menon's changes are now only in linux-soc-thermal/fixes > > Two options: Yet another revision, or wait a week until the prototypes > are (hopefully) available and submit a patch without the conditionals. No problem, I will wait a bit and resend this patch set. > > Guenter > -- 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/