From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752561AbcFNNYZ (ORCPT ); Tue, 14 Jun 2016 09:24:25 -0400 Received: from mga14.intel.com ([192.55.52.115]:45814 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752326AbcFNNYX (ORCPT ); Tue, 14 Jun 2016 09:24:23 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,470,1459839600"; d="scan'208";a="975367610" Message-ID: <1465910658.9422.9.camel@intel.com> Subject: Re: lm-senser can't detect thermal on thermal_zone From: Zhang Rui To: Kuninori Morimoto Cc: "edubezval@gmail.com" , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , "linux-pm@vger.kernel.org" , "yoshihiro.shimoda.uh@renesas.com" , "cm-hiep@jinso.co.jp" Date: Tue, 14 Jun 2016 21:24:18 +0800 In-Reply-To: <877fdscl6o.wl%kuninori.morimoto.gx@renesas.com> References: <87posrn1oj.wl%kuninori.morimoto.gx@renesas.com> <1463100287.15071.8.camel@rzhang1-mobl4> <874ma2lnvw.wl%kuninori.morimoto.gx@renesas.com> <87zir89iai.wl%kuninori.morimoto.gx@renesas.com> <87oa7bkqvl.wl%kuninori.morimoto.gx@renesas.com> <1465885934.4001.4.camel@intel.com> <877fdscl6o.wl%kuninori.morimoto.gx@renesas.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 二, 2016-06-14 at 07:03 +0000, Kuninori Morimoto wrote: > Hi Zhang > > > > > > > > > > > > > > > > > > > > struct thermal_zone_device > > > > > *thermal_zone_device_register(xxxx) > > > > > { > > > > > ... > > > > > if (!tz->tzp || !tz->tzp->no_hwmon) { > > > > > result = thermal_add_hwmon_sysfs(tz); > > > > > ... > > > > > } > > > > > ... > > > > > } > > > > > > > > > > Does this mean "thermal_zone doesn't use lm-senser" ? > > I'd prefer to say of_thermal registered thermal_zone doesn't use > > lm- > > sensor. > > If you're really want to see hwmon interface, I think you should > > use > > thermal API (thermal_zone_device_register) directly. > Thank you for your feedback. > My driver is supporting both of_thermal and thermal API. > So, switching is not a big deal. > > But can you teach me why of_thermal doesn't use lm-senser ?? I don't know if there is a solid reason that we can not expose the hwmon interface. But just like the comment says, "/* No hwmon because there might be hwmon drivers registering */", given that of_thermal just parses THERMAL data of device tree, it is reasonable to me for exposing thermal interfaces only. thanks, rui