Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1950572AbdDYPui (ORCPT ); Tue, 25 Apr 2017 11:50:38 -0400 Received: from 20.mo6.mail-out.ovh.net ([178.32.124.17]:52035 "EHLO 20.mo6.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1431531AbdDYPu3 (ORCPT ); Tue, 25 Apr 2017 11:50:29 -0400 Subject: Re: [PATCH] hwmon: (ibmpowernv) Add min/max attributes and current sensors To: Michael Ellerman , Shilpasri G Bhat , Jean Delvare , Guenter Roeck , Paul Mackerras References: <1492749112-32465-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> <66e927c1-ceec-679d-8eaf-c6686b24b3a7@linux.vnet.ibm.com> <87a879ynrn.fsf@concordia.ellerman.id.au> <79e166e2-ed4b-7386-c07f-b02d68f133b5@kaod.org> Cc: linux-hwmon@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, svaidy@linux.vnet.ibm.com, ego@linux.vnet.ibm.com, akshay.adiga@linux.vnet.ibm.com, andrew@aj.id.au From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <6d12f317-73bd-7152-d43d-23a49f3dcde5@kaod.org> Date: Tue, 25 Apr 2017 16:32:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <79e166e2-ed4b-7386-c07f-b02d68f133b5@kaod.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 6772006464715590571 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeliedrgedvgdejlecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1510 Lines: 39 On 04/25/2017 04:28 PM, Cédric Le Goater wrote: > On 04/22/2017 08:11 AM, Michael Ellerman wrote: >> Shilpasri G Bhat writes: >>> On 04/21/2017 05:17 PM, Cédric Le Goater wrote: >>>> On 04/21/2017 06:31 AM, Shilpasri G Bhat wrote: >>>>> diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c >>>>> index 6d2e660..1f329fa8 100644 >>>>> --- a/drivers/hwmon/ibmpowernv.c >>>>> +++ b/drivers/hwmon/ibmpowernv.c >>>>> @@ -65,7 +66,8 @@ enum sensors { >>>>> {"fan", "ibm,opal-sensor-cooling-fan"}, >>>>> {"temp", "ibm,opal-sensor-amb-temp"}, >>>>> {"in", "ibm,opal-sensor-power-supply"}, >>>>> - {"power", "ibm,opal-sensor-power"} >>>>> + {"power", "ibm,opal-sensor-power"}, >>>>> + {"curr"}, /* Follows newer device tree compatible ibm,opal-sensor */ >>>> >>>> why isn't there a compatible string ? >>> >>> Skiboot exports "ibm,opal-sensor" as compatible string for all the inband >>> sensors. Now if I define that as the compatible string here, then all the >>> sensors would get identified as "curr" type of sensor by the driver. >> >> So fix it in skiboot? > > > After a memory refresh, this table is to maintain compatibility with > the support of the FSP sensors in old firmware. These have peculiar > device node names and properties. > > So What the code is doing looks correct. But, you should also modify > the 'enum sensors' to include a CURRENT value. But the patch does that already. I was missing context. This is fine then. Thanks, C.