From patchwork Thu Apr 20 17:19:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VG9tw6HFoSBQZWNrYQ==?= X-Patchwork-Id: 13219045 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FED3C77B73 for ; Thu, 20 Apr 2023 17:42:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231648AbjDTRmf (ORCPT ); Thu, 20 Apr 2023 13:42:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229792AbjDTRme (ORCPT ); Thu, 20 Apr 2023 13:42:34 -0400 X-Greylist: delayed 599 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 20 Apr 2023 10:42:32 PDT Received: from office2.cesnet.cz (office2.cesnet.cz [195.113.144.244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87F721B5; Thu, 20 Apr 2023 10:42:32 -0700 (PDT) Received: from enterprise-D.prg (unknown [94.142.238.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id 33E9640007C; Thu, 20 Apr 2023 19:22:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2-2020; t=1682011356; bh=SUXILnLNP9xhXmVLWIYgxWv+q4S958kHVGoCjkMxmDY=; h=From:To:Cc:Subject:Date; b=KgGw4/57FBReT+WhPxv3gYxQw8vlYFEIjuBMBMJwgriskhiFKHs6LevlIzmT1k1I0 mm2Zlsza9K1Tlpf99HQm6WSqf7Ox8PLX9aJVHvVkcB/NwunBAuoj5hSh9JHLq4FFfV 12/A0w9LU6c3Ga7vZ3XBpDvrFOrJP3iiTfmFRP5SpLRHLyBgoO4w3fOMFdAO5I5wfh MkLG+IlOjHrKiCYGYSoEclAfXGxT++RwfEIQoTgZGwbZ2eTGkW41LrxvpfD6a6I921 H/mZNBo7uwXz9d0VYzS3gZ89GM7siGbqPo+DqizrE9rvnrAjaa/ygwZEhtKBmgFlY9 sznIdDio1fW1g== From: =?utf-8?b?VG9tw6HFoSBQZWNrYQ==?= To: linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?b?VG9tw6HFoSBQZWNrYQ==?= , =?utf-8?q?Jan_Kun?= =?utf-8?q?dr=C3=A1t?= Subject: [PATCH 1/1] hwmon: (pmbus/fsp-3y) Fix functionality bitmask in FSP-3Y YM-2151E Date: Thu, 20 Apr 2023 19:19:39 +0200 Message-Id: <20230420171939.212040-1-tomas.pecka@cesnet.cz> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org The bit flags in pmbus_driver_info functionality for YM-2151E chip were joined with a comma operator instead of a bitwise OR. This means that the last constant PMBUS_HAVE_IIN was not OR-ed with the other PM_BUS_HAVE_* constants for this page but it initialized the next element of the func array (which was not accessed from anywhere because of the number of pages). However, there is no need for setting PMBUS_HAVE_IIN in the 5Vsb page because this command does not seem to be paged. Obviously, the device only has one IIN sensor, so it doesn't make sense to query it again from the second page. Fixes: 1734b4135a62 ("hwmon: Add driver for fsp-3y PSUs and PDUs") Co-developed-by: Jan Kundrát Signed-off-by: Jan Kundrát Signed-off-by: Tomáš Pecka --- drivers/hwmon/pmbus/fsp-3y.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hwmon/pmbus/fsp-3y.c b/drivers/hwmon/pmbus/fsp-3y.c index aec294cc72d1..c7469d2cdedc 100644 --- a/drivers/hwmon/pmbus/fsp-3y.c +++ b/drivers/hwmon/pmbus/fsp-3y.c @@ -180,7 +180,6 @@ static struct pmbus_driver_info fsp3y_info[] = { PMBUS_HAVE_FAN12, .func[YM2151_PAGE_5VSB_LOG] = PMBUS_HAVE_VOUT | PMBUS_HAVE_IOUT, - PMBUS_HAVE_IIN, .read_word_data = fsp3y_read_word_data, .read_byte_data = fsp3y_read_byte_data, },