Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4273863ybg; Mon, 8 Jun 2020 03:46:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcOZk9bxt3zr+V/tdrhHcDm66Qq+chtxXUu4FYE1Jdpi88PrGpY9Rs37XtTSy6luWzjC2k X-Received: by 2002:a17:906:5f93:: with SMTP id a19mr19846225eju.10.1591613182568; Mon, 08 Jun 2020 03:46:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591613182; cv=none; d=google.com; s=arc-20160816; b=a2541Upo556VJZCz2eQRo5sBeaU9AATuv3v39YdAUvSX5g3c6QFLkaqugU/xRQZugF /+2ui6K8hbiMmSjJqKt9Xo3iNrWwDr1eioiXDXVmZp084k7O4FgjpS9REREAv/pdTwUw i30FiHxpuvSmdZf6aph84xO+ukt6RzTON48Ju94UaDYAoJyPJ4XrdTSf9KBTxsSWIAqS e07E3m1p+6DFi3sDppRXAqa9IvwzGVtiAYMZlJ85AHUw0907u9cfiCWdxGi6Eq5dvvE6 bJIv9nztK3xJ1wuvWxVUu28LdboCbwaZrCrmDibEG1AhPxgZZvgiAS4MD9xjXF14s/lx 5TyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=qPnSozpEwUzkMm6eKHETr428FnuusYj7UAKssD/B8Gw=; b=HKjW7BOH+5PlcrFGw63djOrERaSxaBdj+UoGngbVzJzLHEscP6dO1JLt/PQxoqRETz rHvhFY8jrWkrVdnDxywhjEC+m+q5bMVB95vkkPh5slOGKernrGPVGNq7XvHU/dtTUQiG Dg+uEa4r/QtGMxR8RR+6K/eLLiDaTaIdjpWm5yMSfEPMA2hRNwa+v7q9pwfQkuglL2Pc OxBfo5DtRcSvJhYojT77wbU0od3750wswieplETH2FS/JZXXYJHClMUTX9ZvaIEdZ3e5 ZkGihfksdQzzclni+pifwCR8SvdRqwwJIOnGvMyyDc+4pN3euh3R9yyOZBO+jCrxSD1r VrYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Nx4Nav7d; 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 dg23si8575082edb.142.2020.06.08.03.45.59; Mon, 08 Jun 2020 03:46:22 -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=Nx4Nav7d; 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 S1729368AbgFHKoG (ORCPT + 99 others); Mon, 8 Jun 2020 06:44:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729337AbgFHKoF (ORCPT ); Mon, 8 Jun 2020 06:44:05 -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 EC045C08C5C3; Mon, 8 Jun 2020 03:44:04 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id b201so8386096pfb.0; Mon, 08 Jun 2020 03:44:04 -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:mime-version:content-disposition :user-agent; bh=qPnSozpEwUzkMm6eKHETr428FnuusYj7UAKssD/B8Gw=; b=Nx4Nav7dq7hqOTiO9EpgScp0uHZaMAEuO5ijNJXIiflFvXwujN6NzjfkgdrdObQXw7 gtsUpoeP9gygnvCak/QpaFDOhAGY+6NMgrD2kko61NQGB+qM++yaROkDh316gvX5WJdD kVRcMIFl/HKLLX6DoSoFm3Obxjms1l649M3TvgERYYWDMSfhmM2lKBUX445KYxvraXay 7/PcCFNkkUbHu37dfYBJcHam4Rh94zVC6XaDru1QTU+0+BKwmIv/KWK80cUDW8LZqAxx nk9gHUWLlS8tT+YCPxW4lCvbiX/SOYfP2F4rEG9L6hwwJGrJU0PmeqUHz3tLpV5CCA8q Gc5Q== 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:mime-version :content-disposition:user-agent; bh=qPnSozpEwUzkMm6eKHETr428FnuusYj7UAKssD/B8Gw=; b=tYrNTti5ZN1phKcAJRzM4JoBpqF6Ov1C/aBMZfhFIGD8U9iiodz3qh2xFEDHO43Ewr uYVTpDjG4qzwLnVuSFKUVrWJOi/+5aYKfnxojDAvUt7udZZvTUKnybcble7304Q49cSF hZCRRIG6oUIvrXinPL0dhJ31QZZoHGgjVxi9o7cXs0E7WyzkGc2NGlGTSIXAELs6oFDc sNsnfujtkRD4jsM4I3ClSAspLYENuiazCJ0xjxJcZGuO32jjsAXeM2thyIsbFPCDnafj dLmr5qRhxMkDXIOXnKs6zmug8T0cqO6+njSthz3q+0Zncct5H4kOc8NqAUyKpFltJtUh ibMw== X-Gm-Message-State: AOAM5316Am8fdVnkZtQDbppvL8yXZkmgWHO5C8Z8Ah+i16hG9vhy3Vgg 3y8u+7Vo3SN3ABtUy2CdVDk= X-Received: by 2002:a63:63c4:: with SMTP id x187mr20800156pgb.112.1591613044363; Mon, 08 Jun 2020 03:44:04 -0700 (PDT) Received: from cnn ([2401:4900:2349:e80d:cd72:839f:5826:c552]) by smtp.gmail.com with ESMTPSA id dw17sm14808774pjb.40.2020.06.08.03.44.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jun 2020 03:44:03 -0700 (PDT) Date: Mon, 8 Jun 2020 16:13:49 +0530 From: Manikandan Elumalai To: Guenter Roeck , Jean Delvare , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Cc: saipsdasari@fb.com, patrickw3@fb.com, vijaykhemka@fb.com, linux-aspeed@lists.ozlabs.org, manikandan.e@hcl.com Subject: [PATCH v3] hwmon:(adm1275) Enable adm1278 ADM1278_TEMP1_EN Message-ID: <20200608104349.GA10918@cnn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 The adm1278 temp attribute need it for openbmc platform . This feature not enabled by default, so PMON_CONFIG needs to enable it. 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 --- drivers/hwmon/pmbus/adm1275.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/hwmon/pmbus/adm1275.c b/drivers/hwmon/pmbus/adm1275.c index 5caa37fb..4782e31 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) */ + /* Enable VOUT & TEMP1 if not enabled (disabled by default) */ if (!(config & ADM1278_VOUT_EN)) { - config |= ADM1278_VOUT_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; -- 2.7.4