Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4698111rwb; Mon, 31 Jul 2023 10:42:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlGWna0MrWA8PptUAcL1fxYmfpkA8zowi6MAg8wNsZ4BC3ipFsoAOawS0WkXx9gwnlKfTZu0 X-Received: by 2002:a05:6402:125a:b0:51d:e30b:f33a with SMTP id l26-20020a056402125a00b0051de30bf33amr475317edw.34.1690825361111; Mon, 31 Jul 2023 10:42:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690825361; cv=none; d=google.com; s=arc-20160816; b=i12YEMZS2WUvg7zfM2+Q24f41a4pI+uRloPPtzYPhciQZ9BWk1ZDE3poX/o0oNSayP wC4LRFJLUZW3t/jHYK1Zh4MsovkS5xQgmO9qfGJH4YnWZjYlz+FVA5OVGnVk51TV39WA g3ScTdH061OYwAzWpwSDHbBEsX8UM6623pcQzc5Cnc5rRKjhpiiIt57PbQHbDWSbMXVk B519vYhW1cfmICsX4qqeLDoABW0kqq+WwTQJUBsGKPDhgsmpYjCSbb2+nbeR3lMBKub0 0d8Pyv/PSwbB4Regf3nZnun3j/LvuCzrBEplvr+J4uW6+qB/Z4rqSkEM+tYoELNLqbTG JI8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=l9iuJhq/36gCoOCCdsYtCIZ6rv3DZuQfNvhN+0POUpQ=; fh=pIhEQrF+cFdaPw5ebkdiLbSB9odS+nrkFHAiFIyrvMc=; b=zJ/Q2vPxIUMRchuXDzMCV/Omlq6bmcFmt9k16rw0JpCNGh+RwTLNr9h1jfmHZF/G5E 5xZosVce5ZQg9ypnqnPi/WmIPMQnGK++7jrM3h+NoKdmsVMweO9qW0/YSHJizJ+FEC/y KnhaxzuYUhtLYavNuDJumtW0xrLXrOROJhf1ZMU/B/6E5VU8NX4gibfacJTr9bFp70ut I1RxWypNc5nDkxY9TmZtHmlPvXpRjFQ7gfvQHRepL2ibhfzzWXgssfwyMbOILgnSUBU5 SyR1BtOQH0kSeoOWIl/bUjoXZMoUuRgttMVQLrksEhQSpwRZZCnYhiW9wq7hJPkx4ari JCMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="CyFa9Y/8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d11-20020aa7ce0b000000b00522d81b7ccbsi574480edv.156.2023.07.31.10.42.16; Mon, 31 Jul 2023 10:42:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="CyFa9Y/8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233326AbjGaQLk (ORCPT + 99 others); Mon, 31 Jul 2023 12:11:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233314AbjGaQLf (ORCPT ); Mon, 31 Jul 2023 12:11:35 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 806501713; Mon, 31 Jul 2023 09:11:30 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id ca18e2360f4ac-790aeee9928so29127039f.2; Mon, 31 Jul 2023 09:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690819889; x=1691424689; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=l9iuJhq/36gCoOCCdsYtCIZ6rv3DZuQfNvhN+0POUpQ=; b=CyFa9Y/8RTYcGZujl2crRafJPcB+RNWsS2OR+GiLYm0ncsMdmfcSULm4OBKgXSuMKY pWVzd43SJ8yxme5ox7VYOjFuAlNNcOfdxIiIYKfTbczkiU1kaTU4tSUT3ZLY8Yp7hfAb 5qn9UXb6tJyXOyTaZN8VKwSuPIsMxSWA2Z9QgULUDi549DS8f5e4vz/NFNqKh5UqDUtM cnwaA4HmMMhxwz/21wekDVcUUE1TcEDUI73kX6ZkNMTDRN9jJRLRLo3XNt5aQTZimrhO FYsh8CgYcZgedTYBPWRUv1y8QisO/b/3TJ+fj5wG480p5gpUY2p9YVVHUGdSV6B+TF0K 0HLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690819889; x=1691424689; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l9iuJhq/36gCoOCCdsYtCIZ6rv3DZuQfNvhN+0POUpQ=; b=lFzsaZjFyp85EdpmhOYuMgypX+KJJQfVvYBGytkVLaaYZz36Fg+tKeom9id31rdICY K7sJXV6yOppoUR8G92RWTBCv2CV6rRR1MYMhdkY3a3d4kd1xnGRU68iYv5ac0Tfre5Cg nBduUQ9e33fIlyiu/ynraosETjSixywnIxsiDi2PoeAR2cT+3Kgy6Y5RdErdf9f58bTT jspYqWoYipnPV6+MBSKYv9DkzYpGLYrS3ukqtT3nmFsdDcPE86hV0x2xQsvlLzyhS4kM mNSYKQ/dLwzhxIcQFCP6Z6XtJDm8I3Dx7DFATLla50DMYIecUZ4AQscXsSr3mYtIxeHn s0Ug== X-Gm-Message-State: ABy/qLYYdWbd+XLn0okyU0Yq7BKa+gRuDhwgWMryGtNAhezux8tD8LWW 84i5b14eQ5xPSgv82X3c8J4= X-Received: by 2002:a6b:f80c:0:b0:77e:3598:e516 with SMTP id o12-20020a6bf80c000000b0077e3598e516mr8593859ioh.2.1690819889456; Mon, 31 Jul 2023 09:11:29 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id y3-20020a02c003000000b0042b320c13aasm3167751jai.89.2023.07.31.09.11.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 09:11:29 -0700 (PDT) Sender: Guenter Roeck Date: Mon, 31 Jul 2023 09:11:27 -0700 From: Guenter Roeck To: Naresh Solanki Cc: Jean Delvare , vadimp@nvidia.com, Patrick Rudolph , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] hwmon: (pmbus/mp2975) Fix PGOOD in READ_STATUS_WORD Message-ID: <0a332f45-35e0-4db3-9545-0a8f7e9bd435@roeck-us.net> References: <20230731092204.2933045-1-Naresh.Solanki@9elements.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230731092204.2933045-1-Naresh.Solanki@9elements.com> X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 31, 2023 at 11:22:04AM +0200, Naresh Solanki wrote: > From: Patrick Rudolph > > MP2973 & MP2971 returns PGOOD instead of PB_STATUS_POWER_GOOD_N. > Fix that in the read_word_data hook. > MP2975 might be affected but needs verification. > > Signed-off-by: Patrick Rudolph > Signed-off-by: Naresh Solanki Applied, after rephrasing description to indicate that MP2975 is likely not affected. Also added Fixes: tags. Guenter > --- > drivers/hwmon/pmbus/mp2975.c | 5 +++++ > 1 file changed, 5 insertions(+) > > > base-commit: cb7022b8976e3c4d12cea2e7bb820a2944e2fd7b > > diff --git a/drivers/hwmon/pmbus/mp2975.c b/drivers/hwmon/pmbus/mp2975.c > index 28f33f4618fa..27bb39370662 100644 > --- a/drivers/hwmon/pmbus/mp2975.c > +++ b/drivers/hwmon/pmbus/mp2975.c > @@ -297,6 +297,11 @@ static int mp2973_read_word_data(struct i2c_client *client, int page, > int ret; > > switch (reg) { > + case PMBUS_STATUS_WORD: > + /* MP2973 & MP2971 returns PGOOD instead of PB_STATUS_POWER_GOOD_N. */ > + ret = pmbus_read_word_data(client, page, phase, reg); > + ret ^= PB_STATUS_POWER_GOOD_N; > + break; > case PMBUS_OT_FAULT_LIMIT: > ret = mp2975_read_word_helper(client, page, phase, reg, > GENMASK(7, 0));