Received: by 2002:ac8:6714:0:b0:405:464a:c27a with SMTP id e20csp405745qtp; Fri, 28 Jul 2023 05:41:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlHOdkHK18K+St7GVW2khl3B7QpqsX9+tHwbBzoDTxaIi/sLVUGEQPrlZuRMDiwCtx4KXQ9V X-Received: by 2002:a17:906:32d7:b0:99b:f3f5:9752 with SMTP id k23-20020a17090632d700b0099bf3f59752mr847417ejk.14.1690548112013; Fri, 28 Jul 2023 05:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690548111; cv=none; d=google.com; s=arc-20160816; b=jOOm87Dn1ro7kf3YpVEaWJo2Rkr+WTkvtr3R+rDuuKDiw8g6rV7K88y8JvIQqBdU8l 3rLF15Rj+lcZmLyTLakH5p6I42plV+z2HrgJWeJYdZBN/REUU6k9YzwqD5ZJL1qVngcH pVueTNIjvbg4ha3TuV0rrzBlhYU4MauWAJqhLYOtv8mF+mzZ4AIjOniiaTRXGBPCq+GA ESwoBbDHJ7saVJCvquzyV1i0LMlzEIC9k0hfJ29pLz38qVKGgtPBey7F0nPHWWCfQ99L ClPlJ7iytcDF/DIvtVKp+AY9jHkKl6tcya/onGGKOdbRQF62ud13j6cUAXHYcYvzp+KX eM9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Guw6xSEMNt/ZWDljMJQqkvfZd7fV3moBITl0CBYefCg=; fh=mLnScaqdySOg+EhxWXGSsYSvhjtnCtcY78oMnKgrMRo=; b=BkAmtwDq6fPHuDKKmQL2qpkqJZ0KO1WC6GhDmzW/qEg10P0P14a6FukYfzIH1eR1Js OBXcSGzOHRadc7F8+JzkXnPMpg660lWvdFDgtzyyO41BqyLoZpamtpOr3ZJ1mRImRq4v iBweJ7TRRrxL1ynIJx6eQ99Wupf+UAC7+lDL+7Kyua12xwAU6Qjkdve+y2UiOk3cu59J CEt+TQ8441vuUDbAgGiavApkG7h5sqH59cmbugKgU/yiSDuG/Qur+0rnVBL8xTc9TTUI 8lFiKtrn7HhZCJjsZYkjcxlmRPyiOtoV+ttpySa6YYhRQOwniiZVg9qrGU2PksfTtomj C2Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b=V1TTMZ8T; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x15-20020a1709065acf00b00988c64dd7acsi2632863ejs.620.2023.07.28.05.41.25; Fri, 28 Jul 2023 05:41:51 -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=@9elements.com header.s=google header.b=V1TTMZ8T; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236254AbjG1L2y (ORCPT + 99 others); Fri, 28 Jul 2023 07:28:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236244AbjG1L2u (ORCPT ); Fri, 28 Jul 2023 07:28:50 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BF123AB3 for ; Fri, 28 Jul 2023 04:28:47 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-52cb8e5e9f5so1283211a12.0 for ; Fri, 28 Jul 2023 04:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; t=1690543726; x=1691148526; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Guw6xSEMNt/ZWDljMJQqkvfZd7fV3moBITl0CBYefCg=; b=V1TTMZ8TUf36g1/dKB95gkiZvF8vkGanvGS82g+hyQyEJLepTy1FDzCk1Glj99RbcC iHhtYaT5NSWXoTmatfAYYCE8NrSfFL+CskmBIG/vJeI+E8i/hQ/EQlVAdlAVLPFeGn+G aJ6YaQo+BeQu8Oxic6s4KQm97qn19Ta7RlYxK0HGy3o32/DBPd7V5yaW1md4sN+cMHJw a4lg15PHhJ+19mpP6Gi9luk7bvUUkjFW+H08H9IDDPfGaxcw6Yx6b01f5jpeHk/4TOd+ hEkk62UgfMv83HjYtEbPBzhv6Tuov6c9Gx6TtnciWRF6dkxZYT6gks6zZOFNWsvJMmqH wfbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690543726; x=1691148526; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Guw6xSEMNt/ZWDljMJQqkvfZd7fV3moBITl0CBYefCg=; b=YtU4TTVs+W+B4S6hVc8AcOyH8angPRrf+FP0xzHhWdMTpCYFgT3E2Au9BMQTazG6RX pe/60vG0ZXNhjgdRcmiMIUmp4bjQe8spta4xikbggIqC+7641eRmfLQWOB13Iie5ier1 +YUwT1RLpiHUCgYpLCPnh82evcMcoyn7Q2a9YbU0uVrT1Jfmj4uiM5kaQdFFP3naHwTb kGgHVEB3LDPAoRR5/NFUV1RdfziYSlzGhjsO6OfrLeYgiG2uxlcV4nwqrC8gvr9zVDuh sjzPnGNCJtIFuPOFCrTngONY8svH0NX7tKeCLjMjwXw9S2WV37VK9d2cucdkgf6ZyhTY p3SA== X-Gm-Message-State: ABy/qLa+ho30TF0HRqwSrIBd3joVXzY7+k2ytkmdjCx/4Tz9fsBF3fuZ S5qypSbEdg8pMVFfoMpO1oaTXFgnVebpA3353x5+lJ6o9e9edyC6Zp0= X-Received: by 2002:a17:90a:4094:b0:263:161c:9e9c with SMTP id l20-20020a17090a409400b00263161c9e9cmr2177072pjg.12.1690543726407; Fri, 28 Jul 2023 04:28:46 -0700 (PDT) MIME-Version: 1.0 References: <20230728082527.3531940-1-Naresh.Solanki@9elements.com> <1cc12337-759e-c932-0303-b1b78e254c27@roeck-us.net> In-Reply-To: <1cc12337-759e-c932-0303-b1b78e254c27@roeck-us.net> From: Naresh Solanki Date: Fri, 28 Jul 2023 16:58:35 +0530 Message-ID: Subject: Re: [PATCH] hwmon: (pmbus/mp2975) Fix PGOOD in READ_STATUS_WORD To: Guenter Roeck Cc: Jean Delvare , krzysztof.kozlowski+dt@linaro.org, linux-hwmon@vger.kernel.org, Patrick Rudolph , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 Hi Guenter, On Fri, 28 Jul 2023 at 15:30, Guenter Roeck wrote: > > On 7/28/23 01:25, Naresh Solanki wrote: > > From: Patrick Rudolph > > > > MPS returns PGOOD instead of PB_STATUS_POWER_GOOD_N. > > Fix that in the read_word_data hook. > > > Datasheets are not public, so I can not verify, but the code below > only handles MP2973 and MP2971. What about MP2975 ? I dont have MP2975 to even verify. I'm not sure if its applicable. > > Either case, this appears to affect most Monolithic chips, but > not all of them. Please limit the statement to known to be affected > chips. Yes. With what we observed, this affects mp2973 & mp2971. Will update accordingly. > > > Signed-off-by: Patrick Rudolph > > Signed-off-by: Naresh Solanki > > --- > > drivers/hwmon/pmbus/mp2975.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/hwmon/pmbus/mp2975.c b/drivers/hwmon/pmbus/mp2975.c > > index 28f33f4618fa..410b6eae6d02 100644 > > --- a/drivers/hwmon/pmbus/mp2975.c > > +++ b/drivers/hwmon/pmbus/mp2975.c > > @@ -297,6 +297,10 @@ static int mp2973_read_word_data(struct i2c_client *client, int page, > > int ret; > > > > switch (reg) { > > + case PMBUS_STATUS_WORD: > > + ret = pmbus_read_word_data(client, page, phase, reg); > > if (ret < 0) > return ret; > > Please add a comment explaining what is going on. Sure. > > > + ret ^= PB_STATUS_POWER_GOOD_N; > > + break; > > case PMBUS_OT_FAULT_LIMIT: > > ret = mp2975_read_word_helper(client, page, phase, reg, > > GENMASK(7, 0)); > > > > base-commit: a4bb1ce5b9e3ca403c04e20ebeae77fd6447cb11 >