Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2855800ybt; Mon, 22 Jun 2020 08:40:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvweuFdKutwqjSg5Mq9gHd7nMAxGh3d2+70NBpqgbsBFp+hGWUEWmCOicZNjDc0ABEL3Ug X-Received: by 2002:aa7:cd4b:: with SMTP id v11mr18218961edw.356.1592840415948; Mon, 22 Jun 2020 08:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592840415; cv=none; d=google.com; s=arc-20160816; b=0juOxf6OaX3t3fL/RnKV6Wx/vVJyzL2rQ8e02saOxhQpfu6+WYGggv2hTLfri4TaM5 Y1yguIUqgdfeX5F538HJCUksdwEKEDp32nS8VCrT6+6xiPOF0oSgRdtR43Q6jGlH7MKh KWAIIzamY916r7uT7BYVDT0jmaJSexvcaFb7hV2rVdU0gP9e2nPr6152y58yeY3xVbNQ Xt946QjTQPYJipcnytrSdCtD9LGccCqDjLOc0+xCxTEpXLYgNaPmJS5rMSdbZLVyIbvK PNav6c0TDhigAOSM4inclGQfL8JbXRIATwjKw/IfDaf0FEk3sDHN3ZBcXNFFNH/mW0Ij X0UQ== 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=Es07PooiZSXxjxOYZMyYhw0eShmysXjcokuuPID8SBQ=; b=fEK4/mWheMgC588IY8uPPWZ861ZwdTQfnMTiVFEEWL6/6liGQZD9blp+YFbTsVdGYv 9++HULPIP4jpqe5ZggnTMj0Pd7Ok1trO6BzFFi3QKm9bD0D2/oC8bu9pKXQCA1r401I4 f10/SVTX2AEuOCxxYzxp9dt8xLLh9otosKeh9oHGgZjxSnBFn3ov1puJ1++92hSFkaSY lCsam3aq2+GF+ntHDCY1aGVnrci2O/Ng8wOWsGo0F09iOjwkijy0F/GDjTJde/MVMTMY KbhtmziJ0R7pnm/oLZ+mjjLlAif++Z6VES6ubetUv9yxg/J+qj5S4SwyZsHneMM4Raxq GPLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VJEN13ez; 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 n18si9664337edq.195.2020.06.22.08.39.53; Mon, 22 Jun 2020 08:40:15 -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=VJEN13ez; 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 S1729579AbgFVPhi (ORCPT + 99 others); Mon, 22 Jun 2020 11:37:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729494AbgFVPhh (ORCPT ); Mon, 22 Jun 2020 11:37:37 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05C87C061795; Mon, 22 Jun 2020 08:37:36 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id q22so5451182pgk.2; Mon, 22 Jun 2020 08:37:36 -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=Es07PooiZSXxjxOYZMyYhw0eShmysXjcokuuPID8SBQ=; b=VJEN13ezcBfitU/knBaJoVjUSPO7tRSy83x0iwvXUroVjfpM1abAak06Wby0HSJhjW 3TAfZpgTv5+0lDjXEjJJlg4Ai0WaUmrBG8tLcFguItP0s4OInG1dE5CppJ4yEPr6CFvu Le+uPayyeugMSGDo7/YB+3yVZh7NPR07n2yylWV2gnwIR5e77Mk/7B64mp/FAWkbSdI1 b5g0nUUh1on9k6+eN7HTXF48a/YBefUH8//I9p7iq0oK2Q1njJgntodYvewj7VCSpsT8 r6UfaGjUzB2Z496qnfeHts1VvCxbPOuCD3RSdxHoMHxZw430Oo/i4if0cUpTTuAqpQon LoOw== 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=Es07PooiZSXxjxOYZMyYhw0eShmysXjcokuuPID8SBQ=; b=lnkvdayAj2lo7IR/q5iW0Ci+5keU1XI/ho0qJ36xLVEUJaG3WYmzw3rcEGfYclxCSa Wgnwm4n2py/vPTztQyuSI0QWj6MLM7kSkdPHB6wTf/hhlFQzA15FhaqtLr9RoNUEHIG0 ZPdgFs5DZDIYqVnkAWf8tPEkMtGePGJAjGrNUColIQfZSSHZcGYRFqxBXLnU/H4zP2Ww wE9Kp6w636gA6azyxHc1H2D/SzqFwaCwKwRaxk1jmqOIkL8xFRkboI5cOElCP4befHW5 ey+yz6a0KEjfOAZeVGRfXeAOZuxlNGtzQIQHfy4IoUO4hErWtWmRI5aahB/N23/gqc9S B7Zg== X-Gm-Message-State: AOAM531ueIoO9IDZgKzCtSujNu4GC3HrXeI6Sxz7fy/+T1LiW0ghcXpU RKEFKGwYBdB3aUrYm/MxO+4= X-Received: by 2002:a62:7841:: with SMTP id t62mr19835568pfc.273.1592840256516; Mon, 22 Jun 2020 08:37:36 -0700 (PDT) Received: from cnn ([2402:3a80:462:12d4:244f:2b0c:295:2c0b]) by smtp.gmail.com with ESMTPSA id i12sm14333391pfk.180.2020.06.22.08.37.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2020 08:37:36 -0700 (PDT) Date: Mon, 22 Jun 2020 21:07:27 +0530 From: Manikandan Elumalai To: Guenter Roeck , miltonm@us.ibm.com, 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, openbmc@lists.ozlabs.org, manikandan.e@hcl.com Subject: [PATCH v6] hwmon:(adm1275) Enable adm1278 ADM1278_TEMP1_EN Message-ID: <20200622153727.GA9347@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. Reported-by: kernel test robot Signed-off-by: Manikandan Elumalai --- v5 -> v6: add Reported-by in commit log align commit and change log as per guidelines. v4 -> v5: align commit and change log. v3 -> v4: kernel test robot CI warning v2 -> v3: fix invalid signed-off. removed checkpath warnings. write ADM1278_TEMP1_EN and ADM1278_VOUT_EN conf in single line operation. v1 -> v2: add Signed-off-by. removed ADM1278_TEMP1_EN check. 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; -- 2.7.4