Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp632680ybg; Wed, 10 Jun 2020 09:35:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrrAPD8cmVPgJdwEzjeBF69+Ntx3ERtg7+8Agt99FeE0Q2iLIguf745cV9PKQsGRfCMmUO X-Received: by 2002:a17:907:11c8:: with SMTP id va8mr4592583ejb.90.1591806936923; Wed, 10 Jun 2020 09:35:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591806936; cv=none; d=google.com; s=arc-20160816; b=F+jaRI2RS4YXtL/UpmgvlvqGVoHlDYW2f4rqa6zjGIwUJdRgbT2Hc/hxtyHl7Z2dtf LCq2y2MAvjO66O+v9XZGp3fa9AJ4/eBfwzIJEG3YoBGq9+l91vfFHN859zt3ZSC8NJq9 0cugLz+zjySaKOPGWLfwF7qpOvyt5FTPJcHJ/+Tjk0z84WA2U1IhOU/JjKGaR0888+xY dgpZpITEwEnvCs9xKLeltOIM7Ts55oPyLgd6Fx6YZZoSvESB8Q7rFwXD360rHo87ipVB XEgNBR+SZakCFGsGauSJJR4FqeV2nlXPmYCLNTlAud5zfE8UsJtPkTb2TvdCnfzOHyG8 pUfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5nPSs393bGASphPtnT357hjeVtfaWOHC4CaGSirIQ0k=; b=gVRiKrYJ5b64cESMowPTKwoFCylkXunsffs7fwWJRm56HuSz/O+BBCYRI+06c3ToIc WbXNQ6Ek12eSch6sO6uiD+dUBa3p0jE82hjaRrhiiTgzmHK3eVywHenu4mkGGxzLydky +HlqyWExBww8Sx8nUexz5JBHZYXJhfd8+bFh9TnyF6hJCrpqW1KkGURxm1gb30fUo0/7 sAQ1KkOpwlp0H7X2GQj0vxHSk7yv4TD5MYditS5hcwvk6DLE95XzTMupvWddqbxlZdGX 8JrDrWc/Otdx5CBIuhxbY5P9geYi2J9QaN+/gpaS+savgd8MoP+A3PRRvacVH1R2jwNG He6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=fEclRi9m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn14si370141ejc.414.2020.06.10.09.35.14; Wed, 10 Jun 2020 09:35:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=fEclRi9m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726366AbgFJN2g (ORCPT + 99 others); Wed, 10 Jun 2020 09:28:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbgFJN2f (ORCPT ); Wed, 10 Jun 2020 09:28:35 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB122C03E96B; Wed, 10 Jun 2020 06:28:35 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id a127so1095732pfa.12; Wed, 10 Jun 2020 06:28:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5nPSs393bGASphPtnT357hjeVtfaWOHC4CaGSirIQ0k=; b=fEclRi9mXpZuNWCDGq3LGoLC69Zoh084aXEwqnhiUGzCy4Lveyjg5c3uHKbynX46QB /gPuG7HGhPtt3mFPHVuDj3DA005B7sHn0a+P2bygYpxaTgovINLQirbxyA7KMk+kmtEx 0283ouBpmFZceDWliw8qkg/SQu7I91p+NVGbjK/l8fc2KG681YRY58RySnhFxPWqUvht 6HfBwK0em+Guf8WDnxSsCEBXCIUigPxa8gKJuN/LeGC3h31Wr9/loSkugEo4w50eQe97 6GpxoFjooLBWhdFIFHRRZid79h+TcbC2bOU8cpYtG2ctGb9ufBPZiVBhYvX09F2LFK7U qI0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=5nPSs393bGASphPtnT357hjeVtfaWOHC4CaGSirIQ0k=; b=I3cmnYN6CMJJNK60t9S6p6zL2EZxEjDvDBX892Y1bDJ/vX/fhASQS/1Z0rPLzQ3Dcy az8EjwnuYL0/OOfV9jjo0dusZR1L4CM+cpF9CdeN0TogmwxNZIAYkQWBBtclbs2fn85W 96QyJs6FdW8skeN7WJ4O0d5lGl925iQr1dXLniEZrpMUNb0Sk67n7wvz07dok4Dt4n95 X54kQt1mPnGJxRWF0q8Vuyi7pgAgP4vXj3D6fckqet8zX4qOCbwEI/wW2Kw8aEjQ0JHm AsuI7kPGJxzpxigW1UBqiOSQ8VVSPSBxVG0WJWNYAUpqCgntFdRNnUoHuvQwUiHyucke AHDA== X-Gm-Message-State: AOAM5314RIXJmuENIbx5MP7ggF4/s+wyfdWa+t5Rk0Ms+AIOAOhmsV0e Vpwg3IIDQrLSXBahSGI4eD8= X-Received: by 2002:aa7:8387:: with SMTP id u7mr2816888pfm.90.1591795715320; Wed, 10 Jun 2020 06:28:35 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id c12sm1505576pgm.73.2020.06.10.06.28.34 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jun 2020 06:28:34 -0700 (PDT) Date: Wed, 10 Jun 2020 06:28:33 -0700 From: Guenter Roeck To: Manikandan Elumalai Cc: Jean Delvare , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, saipsdasari@fb.com, patrickw3@fb.com, vijaykhemka@fb.com, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, manikandan.e@hcl.com Subject: Re: [PATCH v4] hwmon:(adm1275) Enable adm1278 ADM1278_TEMP1_EN Message-ID: <20200610132833.GA237017@roeck-us.net> References: <20200610082611.GA14266@cnn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200610082611.GA14266@cnn> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 10, 2020 at 01:56:11PM +0530, Manikandan Elumalai wrote: > The adm1278 temp attribute need it for openbmc platform . > This feature not enabled by default, so PMON_CONFIG needs to enable it. > > v4: > Reported-by: kernel test robot > --- > changes in conditional check to enable vout & temp1 by default. > v3: > ---- > fix invalid signed-off. > removed checkpath warnings. > write ADM1278_TEMP1_EN and ADM1278_VOUT_EN conf in single line operation. > v2: > ---- > add Signed-off-by. > removed ADM1278_TEMP1_EN check. > > Signed-off-by: Manikandan Elumalai Applied (and I fixed the problem reported by 0-day, so no need to resend). Thanks, Guenter > --- > drivers/hwmon/pmbus/adm1275.c | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > > diff --git a/drivers/hwmon/pmbus/adm1275.c b/drivers/hwmon/pmbus/adm1275.c > index 5caa37fb..d4e1925 100644 > --- a/drivers/hwmon/pmbus/adm1275.c > +++ b/drivers/hwmon/pmbus/adm1275.c > @@ -666,11 +666,12 @@ static int adm1275_probe(struct i2c_client *client, > tindex = 3; > > info->func[0] |= PMBUS_HAVE_PIN | PMBUS_HAVE_STATUS_INPUT | > - PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT; > + PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT | > + PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP; > > - /* Enable VOUT if not enabled (it is disabled by default) */ > - if (!(config & ADM1278_VOUT_EN)) { > - config |= ADM1278_VOUT_EN; > + /* Enable VOUT & TEMP1 if not enabled (disabled by default) */ > + if (config & (ADM1278_VOUT_EN | ADM1278_TEMP1_EN) != ADM1278_VOUT_EN | ADM1278_TEMP1_EN) { > + config |= ADM1278_VOUT_EN | ADM1278_TEMP1_EN; > ret = i2c_smbus_write_byte_data(client, > ADM1275_PMON_CONFIG, > config); > @@ -681,9 +682,6 @@ static int adm1275_probe(struct i2c_client *client, > } > } > > - if (config & ADM1278_TEMP1_EN) > - info->func[0] |= > - PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP; > if (config & ADM1278_VIN_EN) > info->func[0] |= PMBUS_HAVE_VIN; > break;