From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0F94C43603 for ; Fri, 13 Dec 2019 04:38:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C70FD2077B for ; Fri, 13 Dec 2019 04:38:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jTCPuIAg"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=verdurent-com.20150623.gappssmtp.com header.i=@verdurent-com.20150623.gappssmtp.com header.b="NgCbOcIf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C70FD2077B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=verdurent.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yhgS2YsRQDP9c6xOav0lJPgyjR9FWNj3mrMEpwgcNuE=; b=jTCPuIAgqdqWgH c16UztzCMJpIANoXqdyoZlV8cxsPTSjgUayE7/Hmz8KjbWJY8obNl7T5GTQ3mJFdkwICpiDWFz3hI EtE/3EvG/60Pi0mFbdIMDE3R7EYVcIaN7Ggm7ckyQ8CMdCo2YzqqKJEVPTft/zC+PipR9iEmtbKdN nUKdooBNtPo3d+7Vr05wc14i5hM+YUEe1g/KfzzQhF24SFw1HrFI4L/OH+5OA0f85Kuir4FG8oBea fuGw0l9nSN+KUwVMy1j9Ic/vK7dvY956tcHaOnFIHDj/4mpORmmvyCYqw8oRK0xCoNjiDtRdfUi+I ET3cOzb0LTHS1R5hxQLw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifcj1-0004kJ-Pv; Fri, 13 Dec 2019 04:38:47 +0000 Received: from mail-ua1-x941.google.com ([2607:f8b0:4864:20::941]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifciy-0004e3-HU for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 04:38:45 +0000 Received: by mail-ua1-x941.google.com with SMTP id 59so323418uap.12 for ; Thu, 12 Dec 2019 20:38:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=verdurent-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=End3OvBpc+ygNGyVRW83GCf3Bo6cZwj7YlQ/woj7ERg=; b=NgCbOcIfEosgK7rGmNe2T5lGSJOb8IDeMriMbHtrhCum7NjFGyqAhn7K8CbTiJyEdO 6+W75tOyldD9w2Tm//wqoeF2XB8XiWag8787WGwLJTpcluK6VO0s0jj1Fga83B/uPImD P/e4bBZVi6LadafPV00uBmigNWzl28j1FnWsB4PVjPnvdw9viP7bRInczKdFcH4HOTJZ 6TJWuiwcl+Q10A/NsbU+dV4K8W3Pl6KTGw8WMl+2YmUqvjz73KwgajaaSn1Ump9Lisgo aFtFhdFGUPvQWGfFhgNpGrRAOkZeOzf//86XUGfxshiyjyTXh5VIdTmSZG3dSNQ+KmBu 2Nog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=End3OvBpc+ygNGyVRW83GCf3Bo6cZwj7YlQ/woj7ERg=; b=FD9YN/6DvDshS6MGgJgAlNxavzOhJH6NMLzYTLmC+Y+hytYaK6hsIXmafKEW1huQvU KLYIwT1YmguWsR3YuCwGPOE6tQoagrdX2fbR1aGhiFIgemb7kd3k5Cw/SG9Lop+V+w7/ pWkaZsjRmPgaTfHf1BeS0svP9uTew1Pskb0ZBtvDbiJU3ClWGL1LP97lHYy/nIwkUIuP j8/xLZ09doH8KjvI7GpzCSaPNX3wE1rmPf9Z/rYCKOfSORsFGtLcG1IgEiWtXj1fZYG2 ZJ298R+9LKcgebX2h47mR8eB+yvKjKZgF/jd9ZlzimHwuqVeembPlW8PqnF7TCf8/nKx kJug== X-Gm-Message-State: APjAAAXISdZdBQ/Ni0HriYiW2JggYk0XFHZSqbbFywbU+VpDxI/yLOZT FtqpNA6mETuxnVBRpvBnJHiDxgA/KpUXWLwrcoYXqg== X-Google-Smtp-Source: APXvYqwv9mzxgV/3oPODaUBDzbQgXuYQWXhKnbm7cl4vi1ycEuXmhUCYBcB7WE3KiGJh/ydRTwYlGm3vUIO6AcUK7UE= X-Received: by 2002:ab0:30eb:: with SMTP id d11mr11521987uam.67.1576211922735; Thu, 12 Dec 2019 20:38:42 -0800 (PST) MIME-Version: 1.0 References: <20191212061702.BFE2D6E85603@corona.crabdance.com> <20191212232859.E09FC6E85603@corona.crabdance.com> In-Reply-To: <20191212232859.E09FC6E85603@corona.crabdance.com> From: Amit Kucheria Date: Fri, 13 Dec 2019 10:08:31 +0530 Message-ID: Subject: Re: [RESEND PATCH] thermal: rockchip: enable hwmon To: schaecsn@gmx.net, jdelvare@suse.com, linux@roeck-us.ne X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191212_203844_598713_3484A702 X-CRM114-Status: GOOD ( 15.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Linux PM list , Daniel Lezcano , LKML , Eduardo Valentin , linux-rockchip@lists.infradead.org, Zhang Rui , lakml Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Stefan, On Fri, Dec 13, 2019 at 4:59 AM Stefan Schaeckeler wrote: > > Hello Amit, > > > On Thu, Dec 12, 2019 at 11:47 AM Stefan Schaeckeler wrote: > > > > > > By default, of-based thermal drivers do not enable hwmon. > > > Explicitly enable hwmon for both, the soc and gpu temperature > > > sensor. > > > > Is there any reason you need to expose this in hwmon? > > Why hwmon: > > The soc embedds temperature sensors and hwmon is the standard way to expose > sensors. Let me rephrase - is there something in the hwmon subsystem that is needed that isn't provided by the thermal subsystem inside /sys/class/thermal? > Sensors exposed by hwmon are automagically found by userland clients. Users > want to run sensors(1) and expect them to show up. > That is a good point. In which case, I wonder if we should just fix this in of-thermal.c instead of requiring individual drivers to do write boilerplate code. I'm thinking of a flag that the driver could set to enable the thermal_hwmon interface for of-thermal drivers. > Why in rockchip_thermal.c: > > drivers/thermal/ provides a high-level hwmon api in thermal_hwmon.[hc] which is > used by at least these thermal drivers: rcar_gen3_thermal.c, rcar_thermal.c, > st/stm_thermal.c, and broadcom/bcm2835_thermal.c. I want to hook up > rockchip_thermal.c exactly the same way. > > Apparently, other architectures hook up the cpu temperature sensors to hwmon > elsewhere. Most seem to do this in hwmon/, e.g. hwmon/coretemp.c. These drivers > are written from scratch. Utilizing thermal_hwmon.[ch] for chips which have > already drivers in drivers/thermal/ seems to be more elegant. > > Stefan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel