Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp464561ybm; Thu, 28 May 2020 07:20:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx73LEJaqpyoRdqY6cyG+SVCDK7+2Gi9BHOQYWgkHXJKCphdJc8KaFMmh02MeB6OdrP1r56 X-Received: by 2002:a17:906:f0c6:: with SMTP id dk6mr3309875ejb.157.1590675626644; Thu, 28 May 2020 07:20:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590675626; cv=none; d=google.com; s=arc-20160816; b=LgQcyQPpcKZ/76vFHlLH8dNBmulI9lmsLCX89JELPHpfn2xNj7/fizHvr9/y9TlRsx HLLXk6LR62QnqSJJsS1QWou97Ja7EI+gxPwaOU32hsqkk10LU4oLXkO2sUn9v+/MBanm h1wN7IG82qeauxNAqHkCWIs5xbxiTZtT8TEAZ7lg2Yb0N4nkJSrSX5KEoOjwlvyVmuj3 95gmYgM4ML4vloxWpf2BZqkCHLQDY73C2N89X9mfU+XXfxir+5DDtV+c2vA/T++n6ffH EZDu9N9RL3W9pI1zBuVK/Jy/NCiRyvFBg/pHnbUEBusqWAiOrToLRtis8pZJHFNiY9QP 19gg== 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=XGHYTbTFj/idv0dnWf7QG+Cg8moRXHsLIYq+mHlWJb8=; b=DW3QWdLVYj57Ar0VAExPdekQCHasLLlA3UaPaLmT5SBqgebMoFMumZhBhf1kU0SFOJ ZhKJMTl3dPmoTAab9iq93exRYCRJxldxjPLHHQ2U8galbgUdJ7Kv0zGS/hc/PHX7/jTj KBc190kjWpL34LrCiWPB/TNFabAhKJNYWlhD8yvfd+x4zH2lJfsXDFX/+4RvpepHrMrX qe+lCOvCGjcNmvwRWGRuKh/Mrn98WDtbv93eWhrQzEduFUVTfv9yjUj+9R2WeYTOIosR Ck9F/XyZ4BG2Vhhh4TuDXsnKfVAOMOiOqUwl4vN9xci0RohQe7SrScnAyny7+Dix1jIR OPKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qCWVEKUV; 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 q13si3251165edn.496.2020.05.28.07.20.03; Thu, 28 May 2020 07:20: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=qCWVEKUV; 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 S2390966AbgE1OPi (ORCPT + 99 others); Thu, 28 May 2020 10:15:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390900AbgE1OPf (ORCPT ); Thu, 28 May 2020 10:15:35 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 875B8C05BD1E for ; Thu, 28 May 2020 07:15:35 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id 131so5213756pfv.13 for ; Thu, 28 May 2020 07:15:35 -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=XGHYTbTFj/idv0dnWf7QG+Cg8moRXHsLIYq+mHlWJb8=; b=qCWVEKUVVPY6pQHiNV4vRZJ6TSUEiBOow8qeJL4gok+AOw5vxOBAkyIT3LOwhMYykb Fm4qewkHOpojjxq2i7QNqJ3WgmbZb2U5MAMngxeXRFFqpOfg0IrDne+kuiAYM82x3wVb 2RHSff9MyvXGBhsSyTO9/S190iakall9JQiGcw4qy8fknGUPJ9DvwHhW8f11UrGds2Vu i5X88+TSK0fE+1SBMNEwJUpu6E15v3GFhu/m8zsOxuUsb/duRV7DB1JNNAzDaba2bgdO 78oXeJi8wPJF0+qB4qY+Yyn6BxZu8vIKyLhYOyQZuINlpZIJcmwtM8pMldYNUS/oCfpg l3bQ== 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=XGHYTbTFj/idv0dnWf7QG+Cg8moRXHsLIYq+mHlWJb8=; b=pX+WzloymsTx5+wGMMiboblndlzfabdBFBuo2ahb9A9ETxYWntTvEl0ORwCJfdkE5r gJGawGtKAOcn9mJtNrdGq36LyQUDiHa6FMtGRTi0IXpFztsAzKY8ReQKW71XSf608cB2 NfnwtHjSvCAr/cyU/FRlQKLder1bCCrysCFSVN3sDK8TAKmtkdyaeekC2j9rb5gANRKn +/5PxFZlofbeMEPB0gQRNtusI1FXLh2fWWUgPxKzD1te6hKtaomzyqNg6gjWfY3zbAqQ R0S20Fbv7PNfFPprD08Ayd4MsnHAazUPy9XkuJ6FT9RBaLK9tD6lz5PSJLFSfDohXzbJ 5Adg== X-Gm-Message-State: AOAM5306gel57pJHxguVbpqFfZ3ZlIi5mt2CzIcPotJzlvWlCKRJjTtg 0T2pP0x7OB7gwZ9dS8KQXjA= X-Received: by 2002:a62:76cc:: with SMTP id r195mr3211576pfc.116.1590675335154; Thu, 28 May 2020 07:15:35 -0700 (PDT) Received: from cnn ([2401:4900:2340:a919:a888:ed6a:9872:b822]) by smtp.gmail.com with ESMTPSA id j26sm4958399pfr.215.2020.05.28.07.15.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 May 2020 07:15:34 -0700 (PDT) Date: Thu, 28 May 2020 19:45:23 +0530 From: Manikandan Elumalai To: linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org Cc: sdasari@fb.com, patrickw3@fb.com, vijaykhemka@fb.com, manikandan.e@hcl.com Subject: [PATCH] hwmon:(adm1275) Enable adm1278 ADM1278_TEMP1_EN Message-ID: <20200528141523.GA8810@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 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. --- 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) info->func[0] |= PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP; -- 2.7.4