[{"id":1759813,"web_url":"http://patchwork.ozlabs.org/comment/1759813/","msgid":"<20170830020214.GA21901@roeck-us.net>","list_archive_url":null,"date":"2017-08-30T02:02:15","subject":"Re: [1/2] hwmon: (pmbus/lm25066) Offset coefficient depends on CL","submitter":{"id":21889,"url":"http://patchwork.ozlabs.org/api/people/21889/","name":"Guenter Roeck","email":"linux@roeck-us.net"},"content":"On Tue, Aug 29, 2017 at 02:21:16PM -0700, Xo Wang wrote:\n> When converting the DIRECT format CURRENT_IN and POWER commands, make\n> the offset coefficient (\"b\") predicate on the value of the current limit\n> setting.\n> \n> Signed-off-by: Xo Wang <xow@google.com>\n\nApplied to hwmon-next.\n\nThanks,\nGuenter\n\n> ---\n>  drivers/hwmon/pmbus/lm25066.c | 6 ++++--\n>  1 file changed, 4 insertions(+), 2 deletions(-)\n> \n> diff --git a/drivers/hwmon/pmbus/lm25066.c b/drivers/hwmon/pmbus/lm25066.c\n> index a3d912cd3b8d..232b4af13e12 100644\n> --- a/drivers/hwmon/pmbus/lm25066.c\n> +++ b/drivers/hwmon/pmbus/lm25066.c\n> @@ -488,16 +488,18 @@ static int lm25066_probe(struct i2c_client *client,\n>  \tinfo->m[PSC_VOLTAGE_OUT] = coeff[PSC_VOLTAGE_OUT].m;\n>  \tinfo->b[PSC_VOLTAGE_OUT] = coeff[PSC_VOLTAGE_OUT].b;\n>  \tinfo->R[PSC_VOLTAGE_OUT] = coeff[PSC_VOLTAGE_OUT].R;\n> -\tinfo->b[PSC_CURRENT_IN] = coeff[PSC_CURRENT_IN].b;\n>  \tinfo->R[PSC_CURRENT_IN] = coeff[PSC_CURRENT_IN].R;\n> -\tinfo->b[PSC_POWER] = coeff[PSC_POWER].b;\n>  \tinfo->R[PSC_POWER] = coeff[PSC_POWER].R;\n>  \tif (config & LM25066_DEV_SETUP_CL) {\n>  \t\tinfo->m[PSC_CURRENT_IN] = coeff[PSC_CURRENT_IN_L].m;\n> +\t\tinfo->b[PSC_CURRENT_IN] = coeff[PSC_CURRENT_IN_L].b;\n>  \t\tinfo->m[PSC_POWER] = coeff[PSC_POWER_L].m;\n> +\t\tinfo->b[PSC_POWER] = coeff[PSC_POWER_L].b;\n>  \t} else {\n>  \t\tinfo->m[PSC_CURRENT_IN] = coeff[PSC_CURRENT_IN].m;\n> +\t\tinfo->b[PSC_CURRENT_IN] = coeff[PSC_CURRENT_IN].b;\n>  \t\tinfo->m[PSC_POWER] = coeff[PSC_POWER].m;\n> +\t\tinfo->b[PSC_POWER] = coeff[PSC_POWER].b;\n>  \t}\n>  \n>  \treturn pmbus_do_probe(client, id, info);","headers":{"Return-Path":"<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","openbmc@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","openbmc@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xhpfy07XYz9sP5\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 12:02:34 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xhpfx4rDMzDqJ8\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 12:02:33 +1000 (AEST)","from bh-25.webhostbox.net (bh-25.webhostbox.net [208.91.199.152])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xhpfn6qZXzDq5b\n\tfor <openbmc@lists.ozlabs.org>; Wed, 30 Aug 2017 12:02:25 +1000 (AEST)","from 108-223-40-66.lightspeed.sntcca.sbcglobal.net\n\t([108.223.40.66]:49808 helo=localhost)\n\tby bh-25.webhostbox.net with esmtpsa\n\t(TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)\n\t(Exim 4.89) (envelope-from <linux@roeck-us.net>)\n\tid 1dmsKj-003RJy-M2; Wed, 30 Aug 2017 02:02:22 +0000"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=roeck-us.net header.i=@roeck-us.net\n\theader.b=\"0pQvQSNq\"; dkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=roeck-us.net header.i=@roeck-us.net\n\theader.b=\"0pQvQSNq\"; dkim-atps=neutral","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=roeck-us.net header.i=@roeck-us.net\n\theader.b=\"0pQvQSNq\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=roeck-us.net; s=default;\n\th=In-Reply-To:Content-Type:MIME-Version:References\n\t:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding\n\t:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:\n\tResent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:\n\tList-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=xI+fWmdYlTDx65/Fj7bAUSm72QvCmLOuw1ZgfgA5MxI=;\n\tb=0pQvQSNq8njwWh7OOZZ+Pe0D75\n\ttKKN/TfY2QpwQtjvbbaMZBGLKy20vZsPaUi5WSLkfwWBAXxyC28FEIWpRpLteGmZ7SDTLxrN3OgYI\n\t9dda79u0fJsD2AAUfo37ihhX93VcXCishr7pRPfuSAkz3rVR7zXU6iHvEoFKofBcS2HPOuefT0QK6\n\t3jJbcG61rCrJiVcULZBdX97MAOwBKMNy6eXctbyqrMZeMOq5XQ4UTMnpjMufa96WDRbym1TP5Bo5W\n\taYF30CWK9ajWwo2tcZaF9gpJRH6QUOd2Kt12oGUPer8SOGIHmkpLj71dhMHKDqbxPsmMLzNHWtWVU\n\tE1EpcoLA==;","Date":"Tue, 29 Aug 2017 19:02:15 -0700","From":"Guenter Roeck <linux@roeck-us.net>","To":"Xo Wang <xow@google.com>","Subject":"Re: [1/2] hwmon: (pmbus/lm25066) Offset coefficient depends on CL","Message-ID":"<20170830020214.GA21901@roeck-us.net>","References":"<20170829212117.143441-2-xow@google.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170829212117.143441-2-xow@google.com>","User-Agent":"Mutt/1.5.24 (2015-08-30)","X-Authenticated_sender":"guenter@roeck-us.net","X-OutGoing-Spam-Status":"No, score=-1.0","X-AntiAbuse":["This header was added to track abuse,\n\tplease include it with any abuse report","Primary Hostname - bh-25.webhostbox.net","Original Domain - lists.ozlabs.org","Originator/Caller UID/GID - [47 12] / [47 12]","Sender Address Domain - roeck-us.net"],"X-Get-Message-Sender-Via":"bh-25.webhostbox.net: authenticated_id:\n\tguenter@roeck-us.net","X-Authenticated-Sender":"bh-25.webhostbox.net: guenter@roeck-us.net","X-Source":"","X-Source-Args":"","X-Source-Dir":"","X-BeenThere":"openbmc@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Development list for OpenBMC <openbmc.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/openbmc/>","List-Post":"<mailto:openbmc@lists.ozlabs.org>","List-Help":"<mailto:openbmc-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>","Cc":"linux-hwmon@vger.kernel.org, jdelvare@suse.com, linux-doc@vger.kernel.org,\n\topenbmc@lists.ozlabs.org, corbet@lwn.net, linux-kernel@vger.kernel.org","Errors-To":"openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}}]