Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp393445ybm; Fri, 29 May 2020 02:51:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBL4hJwD9VMD8rw3jV9reiHiqD5zvLQ9zTkGaU7Rwf8tReaRY7pwAJV7UFTpw7E5qCHtJL X-Received: by 2002:a17:906:5410:: with SMTP id q16mr1091800ejo.103.1590745886328; Fri, 29 May 2020 02:51:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590745886; cv=none; d=google.com; s=arc-20160816; b=A37zIPBd4hA3UQsRVUevqkpJYAVmMIf9fXwgynJuwNzVbHQA0osILQ93aueN/k6A21 MzpT6wrUm7leLH1tQKy3h6v97Aj/Vk3/becMkCVhm9wx4h17vWMrApkAy5FasdzXUkk3 j5+dy2FvTBrgkwvjaaAko1Nzdh/bKdOQH8S2VBnWTWDb779qPgJQnqWAmVg8ojnLFdXI VZni6xjq08jrHmjVPRajZrAWStbVIi4DKwusKcnD/1ZPSdir//spPefLSlcOY8DGWLo2 CH/Dl0hS8rrAKBmcH5eafmiowTPt4JU0bi2m51jHSMKdECWxBEtywBW8PfCCH9UOoDhQ Hanw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mPpjYDtVNFbOV3twkT62l0LyftrjpV9lJs5FQ+hBUJY=; b=TJDPhVLgN0OfnYXIXdWQkRnuujwKtP3RtuCk93p2UoYXeY4/u1fP2QxYa9pEo/qNee gBEwy+IO57bPgF18khGMr8hgh/FgmVs2vnRj8JRU1qOQT+UaMS1Ax2Pj+A5KQL80XCP2 cHvuMsJVzanho8FAQPzO6Zn+JhmKtSoTaXmBzRz0yoehPHw0qW2UWN0uX/HlOdd7G7XY E9rHx+6p7/kr2E/weYZ019EkZM9QPgPM0lZG/rOqcWFi61LgCZJHz5uhq7Ze57pETPft ohnuuVcehCvoXIAHVlfvg3WdUNCSF2ryObKbvrdwkSRXmTa26RvTLFZc3L7UD3I/fqWg HZ8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RqGJS3FK; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h25si5232891ejt.604.2020.05.29.02.51.03; Fri, 29 May 2020 02:51:26 -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=pass header.i=@gmail.com header.s=20161025 header.b=RqGJS3FK; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726865AbgE2Js1 (ORCPT + 99 others); Fri, 29 May 2020 05:48:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726799AbgE2JsZ (ORCPT ); Fri, 29 May 2020 05:48:25 -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 68ECCC03E969 for ; Fri, 29 May 2020 02:48:24 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id y18so1046375pfl.9 for ; Fri, 29 May 2020 02:48:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=mPpjYDtVNFbOV3twkT62l0LyftrjpV9lJs5FQ+hBUJY=; b=RqGJS3FKuMyWpu1m3Hzc6I4POBM8lESMPYNIYKWdGRlvA8Kh4IUyw7F0hympeVZpd1 yXWiFtzPY6j5UXa/C+hrN8clyWYIa55Iia4MqyCMWOIAKyuA8D7fPpKzOnHCb9wTJo+K wuYYrIN+1Uebl+YzdTKfCzPq2JRfKJAztns+u5u6kveazJvE361p23B2baTzk8oLw4rV O4eJ2mXLljPox04H1Jle4G9dzklK687lj4qCHFllOTt06dkwa7EWVHPslOjSUmJwpZFv JcegsnotpcOIrh168sH42B+nib3cjDhdNcgap8Abs7up2U86YnRPYnWc4twOvdKA2ZgT bJPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=mPpjYDtVNFbOV3twkT62l0LyftrjpV9lJs5FQ+hBUJY=; b=setobAYHhLKqyFOciBTq4JSJ+/eY1GmSKkiuL1RkuXrCQhRQlLgvhHZvtX+pLZ9NqA eBZAK5e5Sll6YlBmwG3jAiKZXXkBSrNgsgy+YdIqPbYjDgfoBuX7oL42BDIYVkdjqjTo p6dHCsiaPhgWch1WEdDyQ7s/KhY6vr5LpoXGiHNJSlpM7q+fxgNteGQnreEfcyg3S6J7 17NtZ8nHO2XsusPGzjiO3tbdJ4zEnNTlAd2qO17wrofi/sy6OqZ562VaPvIcx8W8+8W6 Fzk9vzXNrNe/7AqYj4ivxBA9HmCZDRN8OKtCZhV2OUBZSgettSV5gv3DAI5jvlpujXWC ncHA== X-Gm-Message-State: AOAM531aDY6sPL/yw7iHqXdLvSE2FiLXDy+MAtCK8pWjB2hOEtxOHXed idJJQOdP0TZfQ4mvFSFKH515XREyato= X-Received: by 2002:a62:7610:: with SMTP id r16mr1467560pfc.70.1590745703981; Fri, 29 May 2020 02:48:23 -0700 (PDT) Received: from cnn ([2401:4900:2654:9f89:a888:ed6a:9872:b822]) by smtp.gmail.com with ESMTPSA id i22sm3987421pfo.92.2020.05.29.02.48.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 May 2020 02:48:23 -0700 (PDT) Date: Fri, 29 May 2020 15:18:13 +0530 From: Manikandan To: Vijay Khemka Cc: linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, sdasari@fb.com, patrickw3@fb.com, vijaykhemka@fb.com, manikandan.e@hcl.com Subject: Re: [PATCH] hwmon:(adm1275) Enable adm1278 ADM1278_TEMP1_EN Message-ID: <20200529094813.GA29323@cnn> References: <20200528141523.GA8810@cnn> <76D2694A-C80C-49F8-B51D-8A74341CA4ED@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <76D2694A-C80C-49F8-B51D-8A74341CA4ED@fb.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 28, 2020 at 05:34:22PM +0000, Vijay Khemka wrote: > > > On 5/28/20, 7:15 AM, "Manikandan Elumalai" wrote: > > > The adm1278 temperature sysfs attribute need it for one of the our openbmc platform . > This functionality is not enabled by default, so PMON_CONFIG needs to be modified in order to enable it. > > There is no Signed-off-by. > > --- > drivers/hwmon/pmbus/adm1275.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/drivers/hwmon/pmbus/adm1275.c b/drivers/hwmon/pmbus/adm1275.c > index 5caa37fb..47b293d 100644 > --- a/drivers/hwmon/pmbus/adm1275.c > +++ b/drivers/hwmon/pmbus/adm1275.c > @@ -681,6 +681,21 @@ static int adm1275_probe(struct i2c_client *client, > } > } > > + config = i2c_smbus_read_byte_data(client, ADM1275_PMON_CONFIG); > + if (config < 0) > + return config; > + > + /* Enable TEMP1 by defult */ > + config |= ADM1278_TEMP1_EN; > + ret = i2c_smbus_write_byte_data(client, > + ADM1275_PMON_CONFIG, > + config); > + if (ret < 0) { > + dev_err(&client->dev, > + "Failed to enable temperature config\n"); > + return -ENODEV; > + } > + > if (config & ADM1278_TEMP1_EN) > > This check becomes irrelevant as you are enabling it above then rather than > enabling it just remove this check. Thanks for review Vijay. I will submit changes in v2. > > info->func[0] |= > PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP; > -- > 2.7.4 > > >