Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3232590imm; Thu, 17 May 2018 05:40:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqbbmU/1x83GvmmuaV2LoCTsUVaFbckXi/LhAxlgLoxL2U88b1n1IGbpcp9e/2UhPJDLXZn X-Received: by 2002:a63:4202:: with SMTP id p2-v6mr3997748pga.137.1526560820479; Thu, 17 May 2018 05:40:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526560820; cv=none; d=google.com; s=arc-20160816; b=jKGEDnrxQR3tLwgl48hJjluq86XKPRmVxzeFFTA/nXpjSvQ/qZ4QgkFvBb1BCP/VyY r4CqpJewXzpE/KpdpLHxweFNddPO16lri5iw7nZ8OUm8zgKZusViS/Ls9Sb6JeoElEC7 +Jjchn0CwxQU2TlWaiAtNVaN5laYcCYjDjczr0EYaw5ZTKAfSotE16ljM8X5NH4TfUXd LtmWBGGLhQt0F+gttKVKgyF+MnVqrOLqDS6Jtr9cwyWfLcBZsTHHBPoBYlfTcvt+66k/ MLnWQv90MawEEHBpjqTVcPHmOKeJ44d5OJYheXDFc/t8NRPGAapO1SZy1lMp2A6a3LFM Pg2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=gs7+At3Q3gv3TIlpNWfIPLr2RTxTOJSxS0bJqzkzdIU=; b=LdcFfzFP8zFQ6qn0bOXWzMTM3jVZ3ySVItMFa5/Oa1rEx4hDi7sMckFJcqArjDCOXK LJjxgykKivxYzDczRIBxYN5GZavLo8zyLY+l84eLPuQZWSMUAcq/BxaJ5lfKQvCSEFJF 87i0DQptBR2ozQYJnAD3Lu5wVDSoOyf4GHuc4NSVrUirBOHHuo7Uh07AAY4gcjw3a5nB uUGQXcz+oBeprjHauJAJFKdgJYbCYirRmEnqJ4aXGt5KCNGtKMvZyklrO+ErmuJiWljj WoOBKEmhhWaoekRgz28HlajIlbAixLz9vPAyso03biomCkLtHUEwAWbVS+gaSRuwdzPn xGjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=HFft93Wt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g92-v6si5075474plg.342.2018.05.17.05.40.06; Thu, 17 May 2018 05:40:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=HFft93Wt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752024AbeEQMia (ORCPT + 99 others); Thu, 17 May 2018 08:38:30 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:40930 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751061AbeEQMi2 (ORCPT ); Thu, 17 May 2018 08:38:28 -0400 Received: by mail-pl0-f67.google.com with SMTP id t12-v6so2475013plo.7; Thu, 17 May 2018 05:38:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=gs7+At3Q3gv3TIlpNWfIPLr2RTxTOJSxS0bJqzkzdIU=; b=HFft93Wtg9il7h5rzpUgPkTz352prj4DV35e0mraerSVgk/znXAZAHB8alCXDPJmoF 0k0JZmxMiPPZV8c6hod9dD5VH6wgQvK1/XKflNUT6687u0ll6tUo295wBnqEyxA2JeTm r3c7Ps8EvwuS4VXriKVmCBWEDVybcTb8ScH4PqP2J37jx2b4K1fE+2/p9z74/ngSqVg8 0qepM/R07R8L/LFvVi6JkZ74TDSBAs7JHN2DYdVUuEP+u5i9kzVW8g7U2rQTdcQrXcR1 LEnepUIUBzTi7g2WMc8vPf6SpXwpGzyWSlA2ltZR2KM+Hz5mjMsyCBAwS3hO30R9bcaC W53w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gs7+At3Q3gv3TIlpNWfIPLr2RTxTOJSxS0bJqzkzdIU=; b=ByZYMXiFzkROaH0IF3V88HCL8ELJ63sr6B30pkCPakqzeFdl2kxtvz6ymdFhuyQfAg NJtwK2zcMx4iMNPSZ36f2F3B7dv+gdnsj/6y1020QBiTJCC9AegllUuzOZo461cfhWjI BlrExHiF0C2zKaoQKGfoAAgAu6133BLGxDBF73f3KXz1W3E0nD5vUypHch4xBmQ/Eg5C vYj5zCrD7QPjVSQPBsC/bVjuPbxZm1kBackzoANea/pmZ6CUBULD/LW6ab5CJFT0RNvY Dl0YbTrWr6lVwtrJVERkNYaktVhZNdoBV9fOVDOONcWJ9cqNxtollMtCDPphZNGLHULE h2Gg== X-Gm-Message-State: ALKqPwf8LmqB0aJRxG+6IZ4nXAQdVbi+yJU4s7BCQwTnjXgGrDpO4Vc0 JfyjF131PHnh+eSoE+myC6wiwQ== X-Received: by 2002:a17:902:a60d:: with SMTP id u13-v6mr5136013plq.40.1526560708165; Thu, 17 May 2018 05:38:28 -0700 (PDT) Received: from server.roeck-us.net (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by smtp.gmail.com with ESMTPSA id z127-v6sm6700343pgb.31.2018.05.17.05.38.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 May 2018 05:38:27 -0700 (PDT) Subject: Re: [PATCH 0/3] Add support to disable sensor groups in P9 To: Shilpasri G Bhat Cc: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, stewart@linux.vnet.ibm.com References: <1521716075-807-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> <20180515150205.GA29321@roeck-us.net> <2ceb6b30-60b7-d985-ee0d-6c5784eda273@linux.vnet.ibm.com> From: Guenter Roeck Message-ID: <56bba97b-c6ee-e7a1-136c-a2236437484a@roeck-us.net> Date: Thu, 17 May 2018 05:38:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <2ceb6b30-60b7-d985-ee0d-6c5784eda273@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/16/2018 11:10 PM, Shilpasri G Bhat wrote: > > > On 05/15/2018 08:32 PM, Guenter Roeck wrote: >> On Thu, Mar 22, 2018 at 04:24:32PM +0530, Shilpasri G Bhat wrote: >>> This patch series adds support to enable/disable OCC based >>> inband-sensor groups at runtime. The environmental sensor groups are >>> managed in HWMON and the remaining platform specific sensor groups are >>> managed in /sys/firmware/opal. >>> >>> The firmware changes required for this patch is posted below: >>> https://lists.ozlabs.org/pipermail/skiboot/2018-March/010812.html >>> >> >> Sorry for not getting back earlier. This is a tough one. >> > > Thanks for the reply. I have tried to answer your questions according to my > understanding below: > >> Key problem is that you are changing the ABI with those new attributes. >> On top of that, the attributes _do_ make some sense (many chips support >> enabling/disabling of individual sensors), suggesting that those or >> similar attributes may or even should at some point be added to the ABI. >> >> At the same time, returning "0" as measurement values when sensors are >> disabled does not seem like a good idea, since "0" is a perfectly valid >> measurement, at least for most sensors. > > I agree. > >> >> Given that, we need to have a discussion about adding _enable attributes to >> the ABI > >> what is the scope, > IIUC the scope should be RW and the attribute is defined for each supported > sensor group > That is _your_ need. I am not aware of any other chip where a per-sensor group attribute would make sense. The discussion we need has to extend beyond the need of a single chip. Guenter >> when should the attributes exist and when not, > We control this currently via device-tree > >> do we want/need power_enable or powerX_enable or both, and so on), and > We need power_enable right now > >> what to return if a sensor is disabled (such as -ENODATA). > -ENODATA sounds good. > > Thanks and Regards, > Shilpa > > Once we have an >> agreement, we can continue with an implementation. >> >> Guenter >> >>> Shilpasri G Bhat (3): >>> powernv:opal-sensor-groups: Add support to enable sensor groups >>> hwmon: ibmpowernv: Add attributes to enable/disable sensor groups >>> powernv: opal-sensor-groups: Add attributes to disable/enable sensors >>> >>> .../ABI/testing/sysfs-firmware-opal-sensor-groups | 34 ++++++ >>> Documentation/hwmon/ibmpowernv | 31 ++++- >>> arch/powerpc/include/asm/opal-api.h | 4 +- >>> arch/powerpc/include/asm/opal.h | 2 + >>> .../powerpc/platforms/powernv/opal-sensor-groups.c | 104 ++++++++++++----- >>> arch/powerpc/platforms/powernv/opal-wrappers.S | 1 + >>> drivers/hwmon/ibmpowernv.c | 127 +++++++++++++++++++-- >>> 7 files changed, 265 insertions(+), 38 deletions(-) >>> create mode 100644 Documentation/ABI/testing/sysfs-firmware-opal-sensor-groups >>> >>> -- >>> 1.8.3.1 >>> >>> -- >>> To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in >>> the body of a message to majordomo@vger.kernel.org >>> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > >