Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1055358rdh; Fri, 27 Oct 2023 03:34:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEc+qb4ZNzn0h1mi91P7F7dmfaF3oqQF9wR1XNudjBi/dDOnKUhanfMEG/+svmlrTvDBYwp X-Received: by 2002:a0d:db4f:0:b0:5a8:960d:9aef with SMTP id d76-20020a0ddb4f000000b005a8960d9aefmr2267566ywe.49.1698402876580; Fri, 27 Oct 2023 03:34:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698402876; cv=none; d=google.com; s=arc-20160816; b=nUrZV1EmUa7Nqh5AL18eyFeigPtsD6Et7B/LVN9lCtGIeuxnPZxYCjyILaAsDe5sWc ne8ILX72cbpfqhQVnhOthj3EXqKgKmMlZqx0opmMJ3lD6Ojbp7FUO6whDynfw161sZh8 NigFz0Gml8i0w+ErW00mtAJhHjT8H6CZAECizhAkIw8twbTNc6i/bPsDPa0Ts6OduArR u34aqJvcO5DSvQKbWe0rAfK7udKZ/cJ8fFW6nqYx2zvGy0XM4xLnACTlFoCg3oag6uKj jWbm4KYwpVsKrM/scGlg53lL+/0kUs8/U61O/NMkWtZCHntWk+jdMuiv+i4UAlh3ULF6 dDdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=XUKyf7v2Vpql9dyi+ajoLVLsPQFQmhMH2gCSqdsIfVw=; fh=lcMVfYMGXxJQSINBjKWUzyqXJ3TVzqRvGmW5ATA1bgc=; b=V+4WbYtx+5gf3zKvZeAdgA2TElGYevOD8jqXb8qWA7bg1uUZzOCnxS6wCgSWWt24y/ vyOOo1ZKxgODyI3Q9ptmxk7WXJ2D/C75CqsTxMc0DvtMVcudbBFnII0Qq90DkmLxLMC2 uFf4RphvDZe/H+p6YQC0M28x+ezbj739r88nX33WpYU0FbpVZTXFzCfOEzuYtj4WqSlx U3BoaKrVvGWSLlM0jSFfIjdcTuiMqqqrw6MXwKXGCzB6hdv8G5adVdHOYNzaXS+6qd9U CTCW0uegOe+SIru/DlM66sL0t1kCUDTUwuVb7j/WY+LsDKMsFbUqUzyflNDjwNF/yqcQ 9EGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b=VkdpVUEd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id q66-20020a0de745000000b00579e8e0eba0si1951436ywe.556.2023.10.27.03.34.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 03:34:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b=VkdpVUEd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 448B98348D89; Fri, 27 Oct 2023 03:34:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345671AbjJ0KeJ (ORCPT + 99 others); Fri, 27 Oct 2023 06:34:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230502AbjJ0KeE (ORCPT ); Fri, 27 Oct 2023 06:34:04 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C145C18A for ; Fri, 27 Oct 2023 03:34:00 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40839652b97so13910285e9.3 for ; Fri, 27 Oct 2023 03:34:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; t=1698402839; x=1699007639; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=XUKyf7v2Vpql9dyi+ajoLVLsPQFQmhMH2gCSqdsIfVw=; b=VkdpVUEd7dVwVaAYoXanWqLvbAuPqvpwA9yaCnXE7FK7Jdo8hyn+kz/Jb6wildxt95 1VzDoqNi4vT/31FgYfhx848HTRnnEtY/9llw9A0wK7swfrq8Yu0BnyGozuaP8/VPoiM+ oefdvNuQ13HFPcQbcR1AgGR6TfKg5vcCeWJdAe7azcT5U5HtSp5WqaCVLFv1zVmUcW7j htfB7pgBjA28Vokerxlo8HcTXH/cvSfqSDw4XfQ6BG9nB9zma9nvlRCyEwZhI3XlFHR1 XU8fBsKRDsewBRKyDhqPFsTcFJttGRxKf3wzciQ/fW8Hb+Hr+xw0p9/OaA89vmVFUizH Emfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698402839; x=1699007639; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XUKyf7v2Vpql9dyi+ajoLVLsPQFQmhMH2gCSqdsIfVw=; b=CPKGVs7vpcvrD6/R8aAVUSLYX6Wdb8Km2xFLRd9aFGpU+G+pAGuIFzXN9DybgI7bkF DllBJHTzha+D5F4KlwrDYNgKg2Lwc9VMUsZ6mK35WL7At7bjM5AR40BnsDVGz3xTlVb1 FiVrDllZDt7U33ztjNMy93p7DTVgK+OVNkp8uEOpDEAvVzaxTf/ChwiHn/qQGwWeJbc6 SYIs8zoik2IHqsvRLOzMTQnhuLYwlw2X4Hgz1t14sFNvYff9lQJv1Vkeix+M6cxWV8dO +6ZL7LC+VunlGx4BTuITmShHYUA0LTaExxg08G0B/i4haVwUNLXkaaxOCcIf3VG2WZkj fYfg== X-Gm-Message-State: AOJu0Yz7/EJ2rW8ABLZdUeddU97pXj1b+KwVt7kM858QHb1BKsyc9wp5 1+lG4OHCcyLDZKvJ2sY3PZna1w== X-Received: by 2002:a05:600c:1546:b0:3fe:4cbc:c345 with SMTP id f6-20020a05600c154600b003fe4cbcc345mr1990433wmg.41.1698402839177; Fri, 27 Oct 2023 03:33:59 -0700 (PDT) Received: from stroh80.sec.9e.network (ip-078-094-000-051.um19.pools.vodafone-ip.de. [78.94.0.51]) by smtp.gmail.com with ESMTPSA id j15-20020a05600c130f00b003fbe4cecc3bsm4701804wmf.16.2023.10.27.03.33.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 03:33:58 -0700 (PDT) From: Naresh Solanki To: Guenter Roeck , Jean Delvare Cc: Naresh Solanki , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] hwmon: (pmbus/mp2975) Move PGOOD fix Date: Fri, 27 Oct 2023 10:33:52 +0000 Message-ID: <20231027103352.918895-1-naresh.solanki@9elements.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 27 Oct 2023 03:34:33 -0700 (PDT) The PGOOD fix was intended for MP2973 & MP2971 & not for MP2975. Signed-off-by: Naresh Solanki --- drivers/hwmon/pmbus/mp2975.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/hwmon/pmbus/mp2975.c b/drivers/hwmon/pmbus/mp2975.c index 26ba50633100..b9bb469e2d8f 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 return 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)); @@ -380,11 +385,6 @@ static int mp2975_read_word_data(struct i2c_client *client, int page, int ret; switch (reg) { - case PMBUS_STATUS_WORD: - /* MP2973 & MP2971 return 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)); base-commit: 5421af83a43bdcb646564fec238253d11009ad3f -- 2.41.0