From nobody Thu Apr 9 20:24:34 2026 Received: from CH1PR05CU001.outbound.protection.outlook.com (mail-northcentralusazhn15010016.outbound.protection.outlook.com [52.102.146.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C9563EB816; Thu, 5 Mar 2026 19:56:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.102.146.16 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740615; cv=fail; b=iXXEw+OE4AcNWCu8sw+vEuMu0DLGOA25ChDicjkfLHgVdO8NWCAYVPE2ifswiVhshZrGe83sXjRMXfiip/+YeIuyPehH8aMJgyxfJl/6PD6R2GQZEYNB9xuVAI2+Vqc9O3c4LbPhwhQs8rs5jgctfvuw9dT8LZoC0IFDNq6R7Q0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740615; c=relaxed/simple; bh=fm05xMFtNUT3MV/4PMGavQ51hDf/l7zBGqLG1gaRoao=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=P85TzsgFnZkZmCFjm/gsvdCyI5mnRsb+ses9+fj/smpad+aB0cU3psPDcFUOZ//gjCdaHakEFFR246/68dYEBihUaWBJKsc1vgQxC0GIN/XnKHl+i3YEQkrXMiSq7fkt21QTRZVBYokTQp6PcF4ewR/OTJQvB9lnb5ma5337RyU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=uAj1w77y; arc=fail smtp.client-ip=52.102.146.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="uAj1w77y" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gLnBr6fvZITmyUz2E4n7COMH0pubXc9Jx+c3r5S0Onzl1T5mx1XRQ5kCIPo4IzQoniRObUNHqK4C5bdIh4Pp9lvRDY5oISOUSUmGk01gSq7YMEEcYycy03jUbqOeMZuy+UYJoCkyoJKQIW1DxoGUd6MDaOIZj4VHz5gvvVwTWPYqRFxb2Mb9QgZ6lu+DclP+HYEz3UJ/dO8xuw+X2PGb6yviSZq2SesFxq74jPPp5kyZLy7D5QSYrPHCqPV5ik7c7nh879bcauCTRlnoYO81PGVCI90h6/GJeItJMYubv/6EwRAS1Ap0qyNhRs/V8XCFdQBXH17PRii+iKO9rpBCKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nymF7bs7sbttBJ4KpHtJf1zWmee57yaCucB9V+coZq8=; b=rU4CL2azv2i84lRvxZBe+RRF+j529JvpoDBYBiyNriqOn4i9FZhuSFPrNgaGIJR+OmvKhpQnVbYjhJvyIOHoUuZ/aVbJtBiI/6FkeWfg0fVViNHTP8nHYbrwc1y7artdTnxFVmDl6+6VHwkRsBkWKrMGq21oBPEf7FltH0KL2MT1O4F6hNZk9sLXYfaG8cWvVaTUGJgXvoOwk2RPzGFJfBkCSHEFagNkeASG8rSeR1ZNYxat3VQPQ+ys9nV9zmucn+7sQH1mu+GfU5vQLPpaTCpeNPeLSpjR4tWdNTWqMCnj++q5yZVnWzEdgt9yMpUhATP8pMlcUBrHJOHgZFXo1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.195) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nymF7bs7sbttBJ4KpHtJf1zWmee57yaCucB9V+coZq8=; b=uAj1w77yQzutfDlZVpQBGJMJl22QyRtIfR5CsI5xd6sCvgg8thhalEgcP2Nr1reeVIcdtLfhtSZLV8zuj5icD1f0GjtqeCM0fiGQ5iPx4WjdmrHpokV+xdIKj0g2yh1q9wbLMkIx3bu35rZLs2sPreFb4pLEqmwEKsylc/ulfS0= Received: from PH7PR02CA0007.namprd02.prod.outlook.com (2603:10b6:510:33d::13) by DS0PR10MB6973.namprd10.prod.outlook.com (2603:10b6:8:14d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.22; Thu, 5 Mar 2026 19:56:50 +0000 Received: from CY4PEPF0000E9D6.namprd05.prod.outlook.com (2603:10b6:510:33d:cafe::9c) by PH7PR02CA0007.outlook.office365.com (2603:10b6:510:33d::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.22 via Frontend Transport; Thu, 5 Mar 2026 19:56:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.195) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.195 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.195; helo=lewvzet201.ext.ti.com; pr=C Received: from lewvzet201.ext.ti.com (198.47.23.195) by CY4PEPF0000E9D6.mail.protection.outlook.com (10.167.241.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:56:50 +0000 Received: from DLEE208.ent.ti.com (157.170.170.97) by lewvzet201.ext.ti.com (10.4.14.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:45 -0600 Received: from DLEE211.ent.ti.com (157.170.170.113) by DLEE208.ent.ti.com (157.170.170.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:45 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE211.ent.ti.com (157.170.170.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:56:45 -0600 Received: from lelvem-mr06.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625Juigh2456638; Thu, 5 Mar 2026 13:56:44 -0600 From: Andrew Davis To: Guenter Roeck , Chiang Brian , Erick Karanja , "Grant Peltier" , Jeff Lin , Cherrence Sarip , Kim Seer Paller , Alexis Czezar Torreno CC: , , "Andrew Davis" Subject: [PATCH 01/11] hwmon: (pmbus/bel-pfe) Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:56:32 -0600 Message-ID: <20260305195642.830695-2-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305195642.830695-1-afd@ti.com> References: <20260305195642.830695-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D6:EE_|DS0PR10MB6973:EE_ X-MS-Office365-Filtering-Correlation-Id: bc819316-928a-43a7-ee87-08de7af15724 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|34020700016|1800799024|36860700016|376014|7416014|82310400026|12100799066; X-Microsoft-Antispam-Message-Info: rsEZq/N0i2bkmX2Jw09ePvq1ShNo/g7Q5e6FoxBz/6dtYv/SvP+wrRMVLsMS3Z/cXtCrbuCrYF6KCHfwM6Zp2qEL6zXcjqPvoVSFZPFso65Ab3uF4GvqSmqCfilwsgdYq7+w0+1z5LnzB4rqCN3VGO3GWDX7xiX+W4iCDWIYJF6JGxPosbB8Ca2abDjI62jmxQA+VzrvuWUHfyqYqQwd6KTAuPvMYSqo6HeYhf4uv0itUWjoYV6x8NxUnFeBNNW2+dNfhWatO5YmWbJTswOv3H8vyp+sbDwEBWMJPUwydm64DrHTrmJ4j7fDx6VP7Bli08WiBU0dlz+fO0whWWFtbMxQawvkl3WOBtSBc6ltYfpsp1a9SR9Ue31m4oqBVRFdD0LUTCS98/nY1z42at7mZp9sL6oYbMZ66yJFDUZRW9nBX4xpaPjDuT4Vp+bYuMIsEwLW9ww+UjNKPVJ4FX05QdoF8TAWX+fvBgskibPUhupcKMGx1Ittw2C1rQzF906kdnTXITFwtxKT7A0wvNnEkO+YzTGfb9GAIrN3CASv0fwEqYP41fQb0CbHotlShd+gDNt9+bn/DpXZw6xNCRSrN5WaDMIP6JazcVLAHmW3+kHFZUAWf80Dz3OpjsDr/FdJoiyW7Gmr58WSa9u0xT7UBert8dVcIsotdRwTW4L4oQ603imQvuHbbX8fdCAglDJVwlmXevReoUvDRzgaV+L9v4n1FQXA3WnhSzf/UhIkqdueBagYJh/JhAsJMghyeBFI0lcYTHw54xTQlVIddFRipw== X-Forefront-Antispam-Report: CIP:198.47.23.195;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:lewvzet201.ext.ti.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(34020700016)(1800799024)(36860700016)(376014)(7416014)(82310400026)(12100799066);DIR:OUT;SFP:1501; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UdQtb/t7FfGs0bD+lfCSoijKHKwuSgp6UFM/EmRntHd+CsKIqpHKLVqeDIxSjho1FFpDgA/klaAZB2dnhbs5zhp2LS95enUxYqIf9wFMqa6pqBSGE5YKJOu8zuymSix97E+LPrlYRNjSUXKWt0MntSXxURZfU9Ls9dJs6+Ol6Af00S3sDMGTGt/LdLyZm5wk0SLB62vk6YZHfXoreHXbiYW01J/cYYGluH5D5RJ1in22zEr33nGiM1PbB4O/7qEfAk6/unBFlHii3oEE6Lf4lLXR7FOtLRQAo89ft3DbhxuXss01nKgI+itXUGb/NKSiqqsdE+ezJTkZmYfs3NRaNib38ExyalZ4TL1jgRXM4RjdQj/pd/3Tk+GIAgiMVi56vP68Pq4h++U483hW0byV3Y4JDjvwF7rNFdiYp/ujTwgZr4TW4mp1WjacMD/0P95v X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:56:50.0076 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc819316-928a-43a7-ee87-08de7af15724 X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.195];Helo=[lewvzet201.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D6.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB6973 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/hwmon/pmbus/bel-pfe.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/hwmon/pmbus/bel-pfe.c b/drivers/hwmon/pmbus/bel-pfe.c index ddf9d9a2958c4..6499556f735b4 100644 --- a/drivers/hwmon/pmbus/bel-pfe.c +++ b/drivers/hwmon/pmbus/bel-pfe.c @@ -88,13 +88,10 @@ static struct pmbus_driver_info pfe_driver_info[] =3D { }, }; =20 -static const struct i2c_device_id pfe_device_id[]; - static int pfe_pmbus_probe(struct i2c_client *client) { - int model; + int model =3D (uintptr_t)i2c_get_match_data(client); =20 - model =3D (int)i2c_match_id(pfe_device_id, client)->driver_data; client->dev.platform_data =3D &pfe_plat_data; =20 /* --=20 2.39.2 From nobody Thu Apr 9 20:24:34 2026 Received: from SN4PR2101CU001.outbound.protection.outlook.com (mail-southcentralusazhn15012045.outbound.protection.outlook.com [52.102.140.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1A383EB7E1; Thu, 5 Mar 2026 19:56:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.102.140.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740617; cv=fail; b=P5DamyOgDqVbyjeYKxUWhruAiczXcWCxYnQGlppPIVEYJY7tbWN7XOhdKBa3Llij/e6e3CRKYDb93SRoAaETDg5kT04wKeGkhQnSg7Fi2z6lrTlHlWo1EJyW9QkIG+dVhf7g0hTobnE4TYQ29ZaxSJSytwkv9DYT01aMs2IkCCw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740617; c=relaxed/simple; bh=PUmsl1DZ6Mk9MxneHyqUJGeoIPAMi/xjJuo8NreJblQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=W/zbFqWskWMPmMg9Ke49ge1wdXtYEwcMhxeiJjmYuX803yzUAiPP9PQE2BsT484ByWLcV/bNyqoSEX4YFDyqlLqEkIWbvnWcMeCRz4+Fb7u+MPz3wdfIMHy1rNVs+CXQEbEfTs66ZNQMG9nvttySK08kBKd+NKfLZZZjk9gfzlc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=Bv171CrJ; arc=fail smtp.client-ip=52.102.140.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Bv171CrJ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=g1YH5WwWoFTZsjuVXdfR6+9OrubIBk5vBZ03xcvhK7qJgTjWwzFCP2PQNHB5ZUe4f4u6q+L5OyF7AtO9ciG+/Em0cDzynGQ49+mGohr5foXYcKqrFV72tIYJsQUDEccRJrIkIWEVWJtXCmYmE7h3dKWSlPXDGwrw4KaBKOcgLWQ6fk0kGbZKfjvQKfOePEKNs1HbKoztws2DrB3HeA7fz0P5pV7cYBoOR3zGnpacoIwgyAhzLmo3Ra+UTQeiiCQ1hw6glQACLfzVveT90BQlsuGQkXi3SEAGyz6szClSQtds6nDtglAp+plqSvazxQ5vyKdG/6rnxfYavUQOyytgfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/v6fizqNoHxS16kNPBlfNBjrsk+dGqmGYpghE6GBK5c=; b=dmJjsrzGAwZGxfag6mL5BBbG5/fnKW1/ycE2Y1b4LVg4VR423usg4rING3o9NjaseD1EWA4LnMGyXW+BoN9o7zwQ3CYQnTKc7ufzQ7Cg/InmlMX0gRSb6vCKOO4BW5ihS02VlZ10LmmdA/JEnk8ZJ9T2MvRNEFk4LocJBIkOI0MttCJnk0UN+m5w5twIEZ7RlLzbMwS4ud6S3emQ/tpz8jV/uH723aoCKo6i2Bsd9udXhYFUhojP54x9mU3WQh3yIi5vEDT2NYpTlADgXP0E9kZKdGjSd4wqSUaVp5PkkuLwzZJjmz8LXt3qh0SlbkAlQwLKIhCbUKysMyc9cAKUZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.21.194) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/v6fizqNoHxS16kNPBlfNBjrsk+dGqmGYpghE6GBK5c=; b=Bv171CrJQsKzRxdJUemRkNwUVRVg7fuRhdHzLQ6UUfqgoGemiM/9YlVoHiXPvFJhq5wm6i8lrKT0udgyj0NmjzzrC28MAPXko4AL/MYb9ClrvnGPW+gn0NL2gzsJ/zj9m/iZeVo69vP7rFVWb9faF2CgmOUl6de+A1QxQfiq2L8= Received: from BY5PR04CA0013.namprd04.prod.outlook.com (2603:10b6:a03:1d0::23) by BY5PR10MB4226.namprd10.prod.outlook.com (2603:10b6:a03:210::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.17; Thu, 5 Mar 2026 19:56:51 +0000 Received: from SJ5PEPF000001D4.namprd05.prod.outlook.com (2603:10b6:a03:1d0:cafe::e3) by BY5PR04CA0013.outlook.office365.com (2603:10b6:a03:1d0::23) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.22 via Frontend Transport; Thu, 5 Mar 2026 19:56:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.21.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.21.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.21.194; helo=flwvzet200.ext.ti.com; pr=C Received: from flwvzet200.ext.ti.com (198.47.21.194) by SJ5PEPF000001D4.mail.protection.outlook.com (10.167.242.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:56:49 +0000 Received: from DFLE210.ent.ti.com (10.64.6.68) by flwvzet200.ext.ti.com (10.248.192.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:45 -0600 Received: from DFLE203.ent.ti.com (10.64.6.61) by DFLE210.ent.ti.com (10.64.6.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:45 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE203.ent.ti.com (10.64.6.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:56:45 -0600 Received: from lelvem-mr06.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625Juigi2456638; Thu, 5 Mar 2026 13:56:45 -0600 From: Andrew Davis To: Guenter Roeck , Chiang Brian , Erick Karanja , "Grant Peltier" , Jeff Lin , Cherrence Sarip , Kim Seer Paller , Alexis Czezar Torreno CC: , , "Andrew Davis" Subject: [PATCH 02/11] hwmon: (pmbus/ibm-cffps) Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:56:33 -0600 Message-ID: <20260305195642.830695-3-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305195642.830695-1-afd@ti.com> References: <20260305195642.830695-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001D4:EE_|BY5PR10MB4226:EE_ X-MS-Office365-Filtering-Correlation-Id: b87e8aef-b04f-4bd7-d13e-08de7af15724 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|34020700016|82310400026|36860700016|376014|7416014|12100799066; X-Microsoft-Antispam-Message-Info: gjcNjVQkn4bI3k3oeVDuoAMTtJGRpJZPvZW8qgQyB+2N5oTNC6VmwPsu4DjXjKtbqTSOHFUigIoWohT8N2WRRW7tn1QGXCByCzG1384Zk4iaG3G++duGVDEV0Sh/p8WeFTpx3ZdBJH+KFhaX/2wzpFy0GeloeT1Pxr9qHYuI6R8Esy5e2E2WPP6yNMuYuissOihDPyUmJ2GQhz/YXjafG9dh1ufpXjfIZG76vj39BbBexSS3LBHqEHHehsnMaPZQPQ4goz40/TaomzLROEWa10Vbdw9PaTA0xB+rSPzQurq11iUdao3GCkt/1YUWIfWlQsoPaNF87JHz5Mh6lcizhqpTBA1Mg/rQskizLf1DwT2CWboBA0DHwiSvs6in3RvDjhG5WKIZuXyJwqRtNXS4BxJRwaaL0rlJ/yat2rLhxhCskID82t6nj8SSxZipLtHnmis9Ck5Pr9gnxTsWCV7i0AJKr8F3OBkxCYCTE3ENPTs6/g90OlIGMt1PV/4gSsPZ/0uS48bAyQwYCxVWn9gbkLZQVU0/Bu+2NWYwP4WWYOKnvb8O1V8coorILJK61QjAlw2NXhEEDvRlwKKIlvUkpkR/hZtIQo3dcxoSi+a3L5jDhYEIJDcIX+af51S6B9PDw2xNTCPKrpiIfb12lg63WX7QFUaQkKDhU/rOGD/3lYA0ERzAUjHc1Kd7UPALJHN1TG4D8d+XW/JI4iuHfJsnD0G5wSwVKWU6bJsJqyGZMHlvAiTUMfS4bCdDcraLUibCz4pz4fLoA09DQ8Ia4e7pVg== X-Forefront-Antispam-Report: CIP:198.47.21.194;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:flwvzet200.ext.ti.com;PTR:ErrorRetry;CAT:NONE;SFS:(13230040)(1800799024)(34020700016)(82310400026)(36860700016)(376014)(7416014)(12100799066);DIR:OUT;SFP:1501; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JtDGGV7rA6tRBqeqotlBfRCWBSvEjdKqcYfzoBRLiN/uCEEAD7Zl1MEC90PSzS0uq8pk+m+Aj4F6kne7UzwxjErMXh3FvbxmnS9ymG/MSdTdefh/ZwhrlgWdG+Tx+14FUyecCNXoPCHJifeUVAIrMIefkfbYpenwtpsHCT45oKsCYAXqsZlhyDR4rNXcJn9+vUQ7TtdLlUrtbbEKQWUmmoQLxmc3KT5PrWU69kad0AUBNtUhOVLjQh7lRhqdG176ula3b7sTpwMTfFJnys7Kl080SS5uFmy9R1hUXJzAd2ja16LsJ3rN/Z0u5Z4vFbff9JiX610DWTUNTE0Xl8ztKgUxYFw4i7jYU1naN0zRP/sWUvO7pasAwWtoVExRxLsiUpODsZSJj9VYtNTA2cS9oF3LoLsRRCQ2uIwH0rEW0TAGe24nFuKjM6w+J5+PVp/F X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:56:49.9545 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b87e8aef-b04f-4bd7-d13e-08de7af15724 X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.21.194];Helo=[flwvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: SJ5PEPF000001D4.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4226 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/hwmon/pmbus/ibm-cffps.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/hwmon/pmbus/ibm-cffps.c b/drivers/hwmon/pmbus/ibm-cffp= s.c index d05ef7a968a96..884b17de3b623 100644 --- a/drivers/hwmon/pmbus/ibm-cffps.c +++ b/drivers/hwmon/pmbus/ibm-cffps.c @@ -482,19 +482,9 @@ MODULE_DEVICE_TABLE(i2c, ibm_cffps_id); static int ibm_cffps_probe(struct i2c_client *client) { int i, rc; - enum versions vs =3D cffps_unknown; + enum versions vs =3D (uintptr_t)i2c_get_match_data(client); struct dentry *debugfs; struct ibm_cffps *psu; - const void *md =3D of_device_get_match_data(&client->dev); - const struct i2c_device_id *id; - - if (md) { - vs =3D (uintptr_t)md; - } else { - id =3D i2c_match_id(ibm_cffps_id, client); - if (id) - vs =3D (enum versions)id->driver_data; - } =20 if (vs =3D=3D cffps_unknown) { u16 ccin_revision =3D 0; --=20 2.39.2 From nobody Thu Apr 9 20:24:34 2026 Received: from CH4PR04CU002.outbound.protection.outlook.com (mail-northcentralusazhn15013046.outbound.protection.outlook.com [52.102.146.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3C083EDACA; Thu, 5 Mar 2026 19:56:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.102.146.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740620; cv=fail; b=j//h3+eJpAAiYSL0N/fHfdCZKgwmxJzDjpnxaFs7kuRzS0T7h9CqFLqzPJD0u5FURbinB+HgQEIyfj5Bo//L95N1qwcmPE2JQ0+U/SqKNEUm9bMJKZ9PzVgs9sAQ8tl/gEmznR1RhGP9AIlc/myATqZYv8fcOTr5KPXZB1/me20= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740620; c=relaxed/simple; bh=oqPmkAXo+M5UVHttrCubd/9tiMbN04ET4Xxv47IjZ+A=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RFmGDrgLWZhtPAuOvhxc7qA3fBO4Id25PDuQKyoj19wvqs9xC/4bH3xkycb2LrtoCgu1bT3bhuBlvbrAZtB5o0Ntb+31jgpSamcnjYhx+35yw72edMI7J5W7l6JWpEkfC1jZRM9ksO0y0vrth9Hy+sGQ4weTeCZo4XjAqzvtk74= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=Gu0GZEXZ; arc=fail smtp.client-ip=52.102.146.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Gu0GZEXZ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dUp8nKXteJpDM8NuJNb2z5299Nxh08vXwEUuGp33ma22ii8NSoRSoO6jzD37uyvC8FPUMf+e74GCqm6+CZYB25StEtM0FCjvjSl+JKTrrmf1j6bd5/N/Xr5+jsBCiWo8vbyS81ZbYTY+MewvZirRRx8yUZfPsBD517lxpMKYUds3gBy15cfOS1z/p0O+04SXwaA6/x4l5j+pN36ZmYQQbX1V/N29GpHIDqaOVFQfwG2JuFggKxPVvz9EaKYXZ4bj4aepKhAY8BwaMGqWhFFcqhyPF/Ideg8+9o1Rm6je0f/jnm/74qqDefxcW9kpF0bONFX5r7KYcOKrxvRkN3N6eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GEQclGimqpjd0t2JuEPa+4Wm/5diwHq/DAzZ6OK26WM=; b=k5Tnrgj3pXSmfs8vGB1kk2m3/Zm06l4ySpXNPj4Ho4o4jTq5d4e78r6L8g3Ave/Oqhh3Hbe/HbxZcUDXF3qmOr4JBw6obR+G3gA1VjQC2qJjRxDSe9uqsyhnBGt8wKE9u6ZFPV8k1k4lmRqKwGozouo7fyZq7zx4IQYWU9fzfrxnnrVS12m9nCQbBgF4NNy8alhi7gAu4XDOx+CXDwD8HJiCSTGWXceNh7nrd06frsBC2t2pfu3knUh5ZNDYPXtmnj9ERL4s1TGmAiCdo9TGGdxdOFL1pnTQYq/iVIne4t3I1qOKXBtmw93dM/oAiZQwWikYrZ8sX+F50N/B9/L9WA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.21.194) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GEQclGimqpjd0t2JuEPa+4Wm/5diwHq/DAzZ6OK26WM=; b=Gu0GZEXZZ7Qa6FQaVsj0p0+1rBSt6qyv4GEtidPVVh5gUOMgppxbEcoqJC+HeKsds2f8uJMjTUqZYCLhuhEquZ6Kk4DkIVX6uCYqER4Ealpb63ySZ+zSrYKXh2bra7chKKa5bFUgZ3dbL5y/OGUbXGMG77BUtum1bkqEk/2xqGg= Received: from BY5PR04CA0023.namprd04.prod.outlook.com (2603:10b6:a03:1d0::33) by IA3PR10MB8684.namprd10.prod.outlook.com (2603:10b6:208:576::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.17; Thu, 5 Mar 2026 19:56:56 +0000 Received: from SJ5PEPF000001D4.namprd05.prod.outlook.com (2603:10b6:a03:1d0:cafe::cb) by BY5PR04CA0023.outlook.office365.com (2603:10b6:a03:1d0::33) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9632.26 via Frontend Transport; Thu, 5 Mar 2026 19:56:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.21.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.21.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.21.194; helo=flwvzet200.ext.ti.com; pr=C Received: from flwvzet200.ext.ti.com (198.47.21.194) by SJ5PEPF000001D4.mail.protection.outlook.com (10.167.242.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:56:54 +0000 Received: from DFLE209.ent.ti.com (10.64.6.67) by flwvzet200.ext.ti.com (10.248.192.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:46 -0600 Received: from DFLE205.ent.ti.com (10.64.6.63) by DFLE209.ent.ti.com (10.64.6.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:45 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE205.ent.ti.com (10.64.6.63) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:56:45 -0600 Received: from lelvem-mr06.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625Juigj2456638; Thu, 5 Mar 2026 13:56:45 -0600 From: Andrew Davis To: Guenter Roeck , Chiang Brian , Erick Karanja , "Grant Peltier" , Jeff Lin , Cherrence Sarip , Kim Seer Paller , Alexis Czezar Torreno CC: , , "Andrew Davis" Subject: [PATCH 03/11] hwmon: (pmbus/isl68137) Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:56:34 -0600 Message-ID: <20260305195642.830695-4-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305195642.830695-1-afd@ti.com> References: <20260305195642.830695-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001D4:EE_|IA3PR10MB8684:EE_ X-MS-Office365-Filtering-Correlation-Id: 104e43df-13b5-4ddd-51d2-08de7af1598e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|34020700016|82310400026|7416014|376014|1800799024|12100799066; X-Microsoft-Antispam-Message-Info: 1lfiDs7E/4ZKal9W/dCSBCKp4AnPCt3i6uUzbtCSZOXTUFdEZ4PrHACSmBOi63iueqVcsLCfwAwUqDyl6FiSutGOxS01gtyxxfsOLehulOKRxgelu5eNd2XuFRccaqyZx+BjY8Cgd3OUSyEx4l/f3O8Tmt5p/EXBxXZANxT2R/0aluUJjfzrPZVudaXr6oKvGPjt0sd+cVZabyIXHyoVfVzAX+rXg16Jw+iJB7WPkhE18RUoAaCJFpKYenWLxGYjkW8Q9oBDKiL40STD4Iudhf6OKRUbYpM1gbXZQd/ufSgCsoGhFlfivQJv+euoNN97O0e43ElqqoBwPg1Bkq2vHFnPJ03qMyCpRWemQ3+dkMMf0yjTJGYBpvlEW/c7SPH6OVcfG2gBhDJNJHJzgIxFuvBL/6HD/8Z35xuEtfuQ1jCiycG2tsYPUE4GyvVWPyWhEk/VhI1WOe46164EIRN4hCh5S+L/DMITTdD39xmqnUV8YrRBfOqXAfIrlzncjRtuI7pnfudnOCGh56cFmqq1SxXOOWgW5ILeGLNHye/RSNmYCRX4qNeN+54UB6Xrj3u9BqsztlLKqtBc6LeILd52NAlpQsxte+ptC4srm0WlSUejGfQhOxbH6eNbuqn8Pit7o5yyv7kyCCqC28F50xkF1GZpy3KEJ/SnXoSSbE0bGbDHXaLLB/BtSDy1HDGbNEAxlPovLczU5wxBnWkgV/dMxAq9JzSnjADwatyvqFnS/rpos226YP5oQ/IltZNqvZarC742xLjvfGMhF4DTAcjDOg== X-Forefront-Antispam-Report: CIP:198.47.21.194;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:flwvzet200.ext.ti.com;PTR:ErrorRetry;CAT:NONE;SFS:(13230040)(36860700016)(34020700016)(82310400026)(7416014)(376014)(1800799024)(12100799066);DIR:OUT;SFP:1501; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: feIgILHSsw18CIkWMmBcytsI/el8Ms7ijw47iaj+4swoOBnnMRg+LToHaPYn14M7tx+phefsW0e01dQA/6gJJLQ60Hkr/0DC5/BgIUZTxnViGeEamt1kH5xMVyH/HOFJ4bEPm08oh+/1FK8rkxPTHaro9sTEIMHirF9kpq5klkBU1j1y3A9gtJZ1DX95XvxuW0+Eo3jw+zZRnegEgNu7NuBCuvijq8EoOoTWj9w6fmG3wSTq8KrW3Owxp74afqrAYxQIz0r9mdf69/C91jhETJKjLKuOWMzfyX/o2vq1aUJctPrAydPZkEq5nt3AJAjAYkVuSNG1N51R5BgN99gAvnGqy50OI01+aFdrJx2/e6cyE5ZmxnGflkg4C2JAm0dJ/l5YfCvU1rH77l/tyWyLyHzbCltC9VJdL+U/1/xX3zGzEQCmr7YKdgu8Ls+DK3+3 X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:56:54.0080 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 104e43df-13b5-4ddd-51d2-08de7af1598e X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.21.194];Helo=[flwvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: SJ5PEPF000001D4.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA3PR10MB8684 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/hwmon/pmbus/isl68137.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/hwmon/pmbus/isl68137.c b/drivers/hwmon/pmbus/isl68137.c index 97b61836f53a4..78cff97128541 100644 --- a/drivers/hwmon/pmbus/isl68137.c +++ b/drivers/hwmon/pmbus/isl68137.c @@ -90,8 +90,6 @@ struct isl68137_data { =20 #define to_isl68137_data(x) container_of(x, struct isl68137_data, info) =20 -static const struct i2c_device_id raa_dmpvr_id[]; - static ssize_t isl68137_avs_enable_show_page(struct i2c_client *client, int page, char *buf) @@ -375,7 +373,7 @@ static int isl68137_probe(struct i2c_client *client) memcpy(&data->info, &raa_dmpvr_info, sizeof(data->info)); info =3D &data->info; =20 - switch (i2c_match_id(raa_dmpvr_id, client)->driver_data) { + switch ((uintptr_t)i2c_get_match_data(client)) { case raa_dmpvr1_2rail: info->pages =3D 2; info->R[PSC_VOLTAGE_IN] =3D 3; --=20 2.39.2 From nobody Thu Apr 9 20:24:34 2026 Received: from CY7PR03CU001.outbound.protection.outlook.com (mail-westcentralusazhn15010017.outbound.protection.outlook.com [52.102.133.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CAB72FFFB8; Thu, 5 Mar 2026 19:56:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.102.133.17 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740613; cv=fail; b=XmanTBn7FD8wFk+TCz21XK8v2yBtYsXGnymPNF5kU1QqY8dKM/QOmBZ5mhbG4LYjGeykL6QJR0LX1dqu1tlkZRKrU8s2dhqV1ydocED/UrcAzoOBTXX80zLIPSQIiEgi9+QJEr94h66KcDsNqrhAYs9Af2Mkx9qiD2P5ViB/xgQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740613; c=relaxed/simple; bh=lqVn1WASKZwFKQt5uiMMtLH6bFm2XYPedw3VRERnsTk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=feMjpeJdmSyRRiihiuWYl7BUqbYLfv4QSGmlLJG5hmRdRCqKhfC0b1Iy2zzEyvjf7ZnkvNYRRepbksCj9KVqNGPjsZP8C4vILI7PM8t+JAeb0tDg7VN/wS5E0PGabIA+DAvvhKgmO26r8+epfW9tGkmP5fneWS1j+ljETMyzTkU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=nicrJJWC; arc=fail smtp.client-ip=52.102.133.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="nicrJJWC" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bNWzYWmMFfgqgUfK8x80ByB6GeeQkz7fNnDbH10/YsSkXEgt42+4A2dCTua1G0usayBivGNyd/k1lXMWAyTKKa66C+mesDrypPYikyTiBHa+816yQBYhLsOtERl+SBAty72Xkw25FQemp8w3Rd+S9yQLPIrELBU0YluZJCylO/ZEC3wTIyKOEdlAJHFnh1tPdx7NjZDpxzeSPcwX4mXvqfvqWMbc8bfaZdCyLLvPl8iGR7+fTaKmclN42rVM/w1rRcWmgsa0hWNcCIWCUk0Nco50bw/nrV+XHYHOxmyv4kacYs/wKuIfPahzvTm6XhreETvETilikXr/1rGyqJ2caA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FsI2Q7uxG1SJZ2uXHXrzJMkZfJkPbd3DdNSp2IKg9Lw=; b=XD88X1vSg5mQLa9nluI/HYgdrHmk05OkcXCNZxzWxSTqSyjMrz/8GQ0JPUPCvU028bnfDiJJiCDbgfnrEJ8h22EqCHWQWF3P77sXaXGiNKF74U1/x477lLVNLbDo9DBkmjtukbWE3OVNqtvnPsAeWq7cXpa3k3Z/ueCAJhcVVap4GnNxFrVtvcZ4c2wy+W2rsNlX9oN/e/shSlEvBZyBqxyGbXXuFgi+tCJiHtQXWhrGmgjMy4t7wB7b81pPpuPPdxteBcPjLA99Cyq8XPw2kZFda7LZHFV1nJo86pnqylK3g3twwa2Og1H4MTFS6cDlWmmzj8npr2LjomepSCV5wQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.194) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FsI2Q7uxG1SJZ2uXHXrzJMkZfJkPbd3DdNSp2IKg9Lw=; b=nicrJJWC6ZB/yIOuCqD7EeaYetvX5w3CZYWow4LljaGttAbqiaOzeB5gjcnahnDgaS9ocCj1MwbD9ydk5EP9sWb+6MrrQiAewMVQZgyL/TI9U0/ytMXneQL6aWom96bDE9vnvw4wrFE/TxsUmVrByqOlz2HoGQqczzQQBfEuUGQ= Received: from SA1P222CA0023.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:22c::15) by BLAPR10MB4963.namprd10.prod.outlook.com (2603:10b6:208:326::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.17; Thu, 5 Mar 2026 19:56:49 +0000 Received: from SA2PEPF00001507.namprd04.prod.outlook.com (2603:10b6:806:22c:cafe::b1) by SA1P222CA0023.outlook.office365.com (2603:10b6:806:22c::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:56:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.194; helo=lewvzet200.ext.ti.com; pr=C Received: from lewvzet200.ext.ti.com (198.47.23.194) by SA2PEPF00001507.mail.protection.outlook.com (10.167.242.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:56:49 +0000 Received: from DLEE212.ent.ti.com (157.170.170.114) by lewvzet200.ext.ti.com (10.4.14.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:46 -0600 Received: from DLEE212.ent.ti.com (157.170.170.114) by DLEE212.ent.ti.com (157.170.170.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:46 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE212.ent.ti.com (157.170.170.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:56:46 -0600 Received: from lelvem-mr06.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625Juigk2456638; Thu, 5 Mar 2026 13:56:45 -0600 From: Andrew Davis To: Guenter Roeck , Chiang Brian , Erick Karanja , "Grant Peltier" , Jeff Lin , Cherrence Sarip , Kim Seer Paller , Alexis Czezar Torreno CC: , , "Andrew Davis" Subject: [PATCH 04/11] hwmon: (pmbus/max20730) Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:56:35 -0600 Message-ID: <20260305195642.830695-5-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305195642.830695-1-afd@ti.com> References: <20260305195642.830695-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001507:EE_|BLAPR10MB4963:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b583305-8afa-4dae-909c-08de7af156c7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700016|7416014|376014|34020700016|1800799024|12100799066; X-Microsoft-Antispam-Message-Info: bB7LpK3eFOressDHIEUyY76WMD+TzCwE9/11ovAQw450pi6YGbypQhy72P5TdgyuPp85h59cMaa/32g2v1st9q0cVcT6wmy50RWP2yMYzKYgcvx+9zEtizGDGHBjk4mkzDA2LqOd8lrerQ6+Md9vSQZNSKJKORlar+AB5mJ6Uj37nZCSp6eSvNylFcWYniNjOuktAY1bdY55HhnMkK40ReF8epLe7lr5ThO0UwWXTuF6ESj+kQHVnEWSMcA4USdOntpfoTmeGYC9utk+8ukp8h41SJ9ALztkmzVoCc/D4NnBnKNflev5zFOnx1O9fMAw6/nKgRPqcXqC4WtWyNqdZIrqXftkrzaiqcZNzo06OjygSNsUtAGE9s06e0EKnWtMMw/gn9Lkc0d+oG+l71NlkVgEjwJRprXV22RuLg7DyRYleIiKDvMs6rhljyvEwBVZ/n6saQpXecYaip8GRWgR6uzO9VgSTj+q6aVXezt6UgyctvDOFA68nHTD1Pywf7q9YvSEJGSt4+bkG2ILRNxqzVLPVZHwM9J6YEfA75pYS7M5cmzrr4IdqJuMHMsKwZr26QYux16QWThXYDzLjU0VVbL9/axP739p8wkI+yUur6vzBmV5uQEdUOpX6ZwcMUhMP55o2kBCUyD5oUoxL++JAUGx/QXTSSn5tTBOwp9EawpHxcFdvs0ryMnxoYGUOZTKxafXBxgzoBkRH3mGX/4ZQ11QhKen5r/UfbSnMlVCgMKLCSF33w1Cpq5O3c4VtKblglCixxAvPSFYToz3nFgNMg== X-Forefront-Antispam-Report: CIP:198.47.23.194;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:lewvzet200.ext.ti.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(7416014)(376014)(34020700016)(1800799024)(12100799066);DIR:OUT;SFP:1501; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SjyuzaHF6vFZutdf9/9SBa656tSidTOmoPUVyZwW5aMaEVRsretDM6nr4a6BdpB6TUSyO2fNwqAoGvuqw+rrqkoATJSX464ExEua/pX0PaMckTaklWXGHMmqBs92TOEale6k52kPTHNSmz6ekv7dD2NFokd4UnKQfRLpAkm5yDLIk2lxQNTeWCK7e5v/jCRKurN4/CINIQafxjK/2b3BxmtPHwGVF6Gpr1qqf/nHj7x1UeTBr+wQLs9ZebaK6Ag5q6ywGdbnj95UlELRBbNf76h2tL1utCq7WYmiKv058YucQb9/2At1AKw16wT+mS5DStMO763w+GWEBte+ihLpQwBr9mn76t0gKtfbUwrpP88TwxxSBBwEGB0APiWtlMMpLndjKjThB3xTzXvGrr7O3kg2dXGLx4IbZQ2jypm9MMbTykRTWKeQOAA/8DTHASpc X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:56:49.4008 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5b583305-8afa-4dae-909c-08de7af156c7 X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.194];Helo=[lewvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00001507.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB4963 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/hwmon/pmbus/max20730.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/hwmon/pmbus/max20730.c b/drivers/hwmon/pmbus/max20730.c index 95869d198ecf0..fe03164788dfa 100644 --- a/drivers/hwmon/pmbus/max20730.c +++ b/drivers/hwmon/pmbus/max20730.c @@ -715,10 +715,7 @@ static int max20730_probe(struct i2c_client *client) return -ENODEV; } =20 - if (client->dev.of_node) - chip_id =3D (uintptr_t)of_device_get_match_data(dev); - else - chip_id =3D i2c_match_id(max20730_id, client)->driver_data; + chip_id =3D (uintptr_t)i2c_get_match_data(client); =20 data =3D devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); if (!data) --=20 2.39.2 From nobody Thu Apr 9 20:24:34 2026 Received: from CY3PR05CU001.outbound.protection.outlook.com (mail-westcentralusazhn15013060.outbound.protection.outlook.com [52.102.133.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEA4D3EBF14; Thu, 5 Mar 2026 19:57:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.102.133.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740625; cv=fail; b=AMwfJ1VL6MT6nKveh7jPZ4wPNpqMUqZrw7BHlC8LQyHQQraS12wt2gmGc7Z4K1S3pvi4PRYb/17wIOyCliupKgByQtyE0OAyjotZa5wtM/MrVlefjQHSXNfQouGCfL85aGSoRkUkfcOszHVNvApTxz/VJtR5ivHtQxncgHo535A= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740625; c=relaxed/simple; bh=Qedl7l5uopyR1yT3GaEhtWA7oN80N+dbDJYG2W1BbcQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OdCKj6L6G36rWZHXkqiw/9QGA56bfb/AU0S0tGuWJJEE236C8AiYYvUrjJEZmteYzwNPPVe5IElHSfK3v5DfZJyiwRxtSc1bUf/rvEylpX2fFyldDj8rcMjKMb6SRIq8ffgTFEjIMWWtqRBK5IGiK5NFY+1G/f15MW7YyR+qfWw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=GUzDxph+; arc=fail smtp.client-ip=52.102.133.60 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="GUzDxph+" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=c6i/5WLgYMqdu3hY+564sym4qHJx7Y9jod2cRCQf3bBrTmyxKBSWKYerki8Y8KKn1ONgl1oPEcX9aSkN6bchennm7lexJQe/NYXHMnOukPyx/rA9gy7p4+4ZAhWbpj5UwjKsldb7B3OaKb/lPfQhjGB27DnepnRpNuvnjmOgjizxWxDD2mt6uWuDaXb70DS3fvqHvSZRa7E6WRGuZ49Fbd/pcyOHWBJm1gZX38uAj2wY0BxSKE79mOVKgYoJVSNdAjjgQoLHd4PgTv3fdFkO2MBWA3zsF/iDT6HiT/fOu3NdLkendCInTizl+kTdp0tjUboAJoC4tipLrfQY315mhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WoxjNFEg4YhYxlJLOgr7y+VSvf7ULWMkAsQlDAVTVH4=; b=Ge2aHc42V+ILlyZIobccJTyyC1IrBv5hJhKL5iTwzm+4aEoZi+4CVXxY9KgM8x78GMFpTy3AJt/ofhAnfwM2BYPA/B20WA69L28dCXb8varSJJlz5SaEzvep7JjmGloaSkWjf6SbtvzCsq+1U4CT/4Q+RHLReuUPTDlbI3SK4dZDCiDqMM155d9V5Oh/aNbpdzGNU4dXBMGXnrx14IPCZDmXSVlC8Ye78MW0jG0AYj0l0Y1FLkMITJiwtlcsgrbEr2k3iBE1WMd8tMoEuZVBoo6PxxpXhTM5gYxFuG+wZXfbJ/79VmqrXDWO8Zv+Dgf0eUh+Ug7xNJ7kjsAT3f5ThA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.21.194) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WoxjNFEg4YhYxlJLOgr7y+VSvf7ULWMkAsQlDAVTVH4=; b=GUzDxph+4H4i/45af8CwqRM3XWXksqdAhGmwFkOyGPtbhWFXS9gXywC3QU/FfYGIbuInVmVVeLdXSObwFEec+xam44ZgHZbrOCn/dtw7LBIUvnBdjkmy3Kar0bOcB/b6npiT61x1GfE0eyZQyGPRxfYkGJRYNFhVFZpABiQ8ybE= Received: from BY5PR04CA0009.namprd04.prod.outlook.com (2603:10b6:a03:1d0::19) by DM3PPFA9583E3CA.namprd10.prod.outlook.com (2603:10b6:f:fc00::c40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18; Thu, 5 Mar 2026 19:56:58 +0000 Received: from SJ5PEPF000001D4.namprd05.prod.outlook.com (2603:10b6:a03:1d0:cafe::19) by BY5PR04CA0009.outlook.office365.com (2603:10b6:a03:1d0::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.22 via Frontend Transport; Thu, 5 Mar 2026 19:56:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.21.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.21.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.21.194; helo=flwvzet200.ext.ti.com; pr=C Received: from flwvzet200.ext.ti.com (198.47.21.194) by SJ5PEPF000001D4.mail.protection.outlook.com (10.167.242.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:56:56 +0000 Received: from DFLE208.ent.ti.com (10.64.6.66) by flwvzet200.ext.ti.com (10.248.192.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:47 -0600 Received: from DFLE207.ent.ti.com (10.64.6.65) by DFLE208.ent.ti.com (10.64.6.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:46 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE207.ent.ti.com (10.64.6.65) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:56:46 -0600 Received: from lelvem-mr06.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625Juigl2456638; Thu, 5 Mar 2026 13:56:46 -0600 From: Andrew Davis To: Guenter Roeck , Chiang Brian , Erick Karanja , "Grant Peltier" , Jeff Lin , Cherrence Sarip , Kim Seer Paller , Alexis Czezar Torreno CC: , , "Andrew Davis" Subject: [PATCH 05/11] hwmon: (pmbus/max34440) Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:56:36 -0600 Message-ID: <20260305195642.830695-6-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305195642.830695-1-afd@ti.com> References: <20260305195642.830695-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001D4:EE_|DM3PPFA9583E3CA:EE_ X-MS-Office365-Filtering-Correlation-Id: 06f3e4a2-d101-4b7a-a767-08de7af15b10 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|34020700016|36860700016|376014|7416014|82310400026|12100799066; X-Microsoft-Antispam-Message-Info: JuuYqEBqWKQJ8yPewRwfc0qC1KAZ9+HRQPHPz8uR7a9kznRlkKXgvqdwuSuW0I67Mdf96Q1uJogkBkKJ6jhhOyY+76kDSHVkjcbDjocYQcTa4TmwAn8y5teuDG4BXegH4B0ixPXnwgaEIkeqFFOq2DRn7T7EFpZ2eLPy5uAovZzvrDoE79FIshWUoKjVMjcHWeeFPJbUD3tPkjXCtoYiaGd3W75ckejBWokaZUZOO38cCJGYX+oZymYpulYzyEGCUV88MUoD15SfNEPRtupC2eB8bZ4vPP1WvTPNcT2xJ0IhUkux0QorPkwdVm5+9T2hjF98jPOp3pl0bkq2P/jHTYACNLxfH4XGIPh/hYjH4SOy5mo192h58DTPRsR1gpTpISIlQAv7+oRCAXrmGOgNcj4tctdZPcv9+YtWX6UH052sSTaYUHRtO9zbpmxIV0+QgB97aqWwOoxXx+SIbBvsOT2ejouftX0z53HSN2uKDPrj5mZFZTe9uL/xXo5ODWuJrbMQyAGow/Dfzhtkn1rEe5Xr0T+kImchQx3GdrDzU+wz5KNHPIYWtk8quFrquigY3suTID+c85bx4PXNA5AM3HUTJAAbtDV/eTT1dRbqsvzTijd+ZxdlJvoFKkT+TYUL+Deiwd3KZbYWP+MPUE8FYapsY8TuoUFJQA9bZ5uATYRcQhmLbr63ozUFpDxRWyAmc5g/4QbzVQT9slTVXR3YUrciXPE0WOR0ygjgMzc/AZwByepRSNcBS4NaCpH+chcqsq++mmApT8SQ84vdo/o75Q== X-Forefront-Antispam-Report: CIP:198.47.21.194;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:flwvzet200.ext.ti.com;PTR:ErrorRetry;CAT:NONE;SFS:(13230040)(1800799024)(34020700016)(36860700016)(376014)(7416014)(82310400026)(12100799066);DIR:OUT;SFP:1501; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: n+XYVL1xGoNkATV1jN6RdAdnyJRXb8A6gcrCypFJaO+0NqiuZjuGOZwO/t49Sfa6aEn3kN+zSfhXqoaH4lCIArJKBbnQTmGBQqQCJSyVcKkv8of7EOjH2iiTwrj+QMO0p5KpvJA+5JFcGVDSDQl0WjP/3EecBaw0Jzffe/SWu3CBqL2VE4K3nzu/qmqPGiVk0t5Z5PNQvvCctMFLxCh/sipmi0RslbSwpgT6Advygo2OLm9MQ0UYJaEjMdo+w8i1zQajZVO4qMXziUFwW+Kl6llHySRtlKmFyz3ltLPLbDqkbnEtRXBMyESSOkppSmfIset2ASlkz6QnSBlxL4jn6IoVYfRakOcojHYDs9oKJBMtgwn5pig9cjK7TmRn0q8INWLAbbe8/ZqlsZqR8Vibq2rx7XICdRF2Gy6vpRhkgb7a0WDqzVPBvE5/G6ViQSLO X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:56:56.5408 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 06f3e4a2-d101-4b7a-a767-08de7af15b10 X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.21.194];Helo=[flwvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: SJ5PEPF000001D4.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PPFA9583E3CA Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/hwmon/pmbus/max34440.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/hwmon/pmbus/max34440.c b/drivers/hwmon/pmbus/max34440.c index 8ea4e68d4e9de..cc96bb22f8f5a 100644 --- a/drivers/hwmon/pmbus/max34440.c +++ b/drivers/hwmon/pmbus/max34440.c @@ -71,8 +71,6 @@ struct max34440_data { =20 #define to_max34440_data(x) container_of(x, struct max34440_data, info) =20 -static const struct i2c_device_id max34440_id[]; - static int max34440_read_word_data(struct i2c_client *client, int page, int phase, int reg) { @@ -628,7 +626,7 @@ static int max34440_probe(struct i2c_client *client) GFP_KERNEL); if (!data) return -ENOMEM; - data->id =3D i2c_match_id(max34440_id, client)->driver_data; + data->id =3D (uintptr_t)i2c_get_match_data(client); data->info =3D max34440_info[data->id]; data->iout_oc_fault_limit =3D MAX34440_IOUT_OC_FAULT_LIMIT; data->iout_oc_warn_limit =3D MAX34440_IOUT_OC_WARN_LIMIT; --=20 2.39.2 From nobody Thu Apr 9 20:24:34 2026 Received: from SN4PR2101CU001.outbound.protection.outlook.com (mail-southcentralusazhn15012044.outbound.protection.outlook.com [52.102.140.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 659CD3EB7EF; Thu, 5 Mar 2026 19:56:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.102.140.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740613; cv=fail; b=GogB5K7GnAnti4v3M+m4Ui6FVI21HhwqS+bQxoZZxHIJODJGpwIfYacydKCGFWLk6i1OuUhFkEFS2fTJxbqAiG5UqnIpZ5IqOsDg4n96TTTbPPAgon2VkwASF6/pWkRhRaB/cuLP7XoPt5PR1SAB8hUmP4ia9Faeclq3k07v+Nc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740613; c=relaxed/simple; bh=Bb68I+TLognAj2G0ibMban8TSA/YLQ+PsGOtT/o2QNE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Qw6rOGsIZqplq7YfX3i16lu4dIhNcMxNc/HAo2TA+1Jv4bwh6ryEiyazs2C2Tl041U+YMDZUGrzmP7XEiX4IW2cjeDYkQ0DlrFETc2eIHxZd71G7MHT7f8zmRJPOABw4m19kfTB6EaAku4bJwe1QdTEFiSJGn1zebCa9aaCUybE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=folyarMr; arc=fail smtp.client-ip=52.102.140.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="folyarMr" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gRTAlQyeIKaxwp3M7sU4dXVl7gCmAGx7ekGtdI/FcvUxuUkx+7af722fvGOglmg/1LHn+5ylJgrT+AgdXT1/BgduWy81zvkzSusU0YGNQH8p62FF4Mr7xVpOD7FLRkSrzt6ZD657rOAH8/BoP949QrKqTy6H3rS8J4b6K0SEizmO0S8R32Rdth27bsAzeRZrQQ7lsE3S50y8y/lRkIMKEXHvNOIowYrG9bGxcjTMe/yzY5qwL0qfBq4MoitTCUqplROfR/2DGTBiAVkW9/Ljg+d+HZZ7vo2oWQoz/eR0G7W0J3BAf17elL7TbwMlItGm08y0eN0fGrWW/RJcIk+8CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XoYSQhBXUwMBNi2aatoKazvcmk87iCH5SkbVk3A2L8o=; b=HKpKOatUOj5rlx8QuQ8/oCG1i4bTM/JXUqL4lNeyG36m/SCa5GGD3t3UtUjWFXqChzLncaDJBoT+Sg8Y7P3uFwQk//Ju8VsbDbWFWoCgXV2ip+JfB/rgF20wjx7TRwV7agmSDXIala+c+n7DuBXl2ump/oTC2z/oDYGNIXZ45PQmbhacbha5NXrw4KhmKYvDlrBGdD5lyweidG9KtjznBBvyMkDxCLmFYa5azK2ksFjJqsX3lyyZpp4izCeB7bIIGYvzh+aqCbCp6QREajJCLeq6HxVF7kOsL2YE6FdgjP6uzhFZrgFTP27d5XW6AghEJ5AssNE9X3UHphuesCG5qA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.194) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XoYSQhBXUwMBNi2aatoKazvcmk87iCH5SkbVk3A2L8o=; b=folyarMrPoBQ8BiHp/+b44Jf4g5NY8j8wRlmhkkF+8zAaB6gPBe197abMfnAX3voqe8a51krL7Vs5yY7l/m0sa6ek0U9FgMRzEuZVHsjYzQRniO5+phBS8UBh2wa4R2hCmhb6QJCDZlMhVd7sMgVgYdVWKjVtLQ9r01Sc8cc9/E= Received: from SA1P222CA0022.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:22c::19) by IA3PR10MB8760.namprd10.prod.outlook.com (2603:10b6:208:581::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.22; Thu, 5 Mar 2026 19:56:50 +0000 Received: from SA2PEPF00001507.namprd04.prod.outlook.com (2603:10b6:806:22c:cafe::f0) by SA1P222CA0022.outlook.office365.com (2603:10b6:806:22c::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:56:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.194; helo=lewvzet200.ext.ti.com; pr=C Received: from lewvzet200.ext.ti.com (198.47.23.194) by SA2PEPF00001507.mail.protection.outlook.com (10.167.242.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:56:49 +0000 Received: from DLEE209.ent.ti.com (157.170.170.98) by lewvzet200.ext.ti.com (10.4.14.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:47 -0600 Received: from DLEE215.ent.ti.com (157.170.170.118) by DLEE209.ent.ti.com (157.170.170.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:47 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE215.ent.ti.com (157.170.170.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:56:47 -0600 Received: from lelvem-mr06.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625Juigm2456638; Thu, 5 Mar 2026 13:56:46 -0600 From: Andrew Davis To: Guenter Roeck , Chiang Brian , Erick Karanja , "Grant Peltier" , Jeff Lin , Cherrence Sarip , Kim Seer Paller , Alexis Czezar Torreno CC: , , "Andrew Davis" Subject: [PATCH 06/11] hwmon: (pmbus) Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:56:37 -0600 Message-ID: <20260305195642.830695-7-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305195642.830695-1-afd@ti.com> References: <20260305195642.830695-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001507:EE_|IA3PR10MB8760:EE_ X-MS-Office365-Filtering-Correlation-Id: 233edaa1-9bb6-4277-c44b-08de7af15700 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|7416014|1800799024|376014|82310400026|34020700016|12100799066; X-Microsoft-Antispam-Message-Info: 6wGsQgf9PUhRCIxmu2ZIVHAcZnmY/j15H1sYP6p/8oDTrHDuEjqdslCinpTOBx+TV+4qVqJfmbIYEBYdlJLrn+KsJUuMy6R12oXyyzHlQ3k6LVgejaIOMIkqSufBPzYAEQY6ee0zhvopy2zac8xXkzsJvtVJORSYeYkYlPocfYy5rctjSR8NS9OLuS+HrWOtyw/R/AP8BLfP6GeA+vu7YYUM0Qv97wF9/OdsEPAV0m/UmmFP3jcBvMoQ2IWCXVYkg0AW/xIgpGlLAe7XgJsl2HYU7137hPLGJS2DbJan8562PjET22SsNlCl8wIqrRbLexUD9uulh8gHq8B6ZUV8yDYV+dZ/8/0Hr0rsEQOH8jUfOXATlgisDKDOrKruZGa1EPOA4zVolkACeaTe/ClmYjIgiBFZWS8elmP0oifzbhozfo+qJp77U6kNJvOOidisnZNz+qzEuvywsb1jnWPsWQc0s2sDzUPan5mkylcwFjTsPjHrHWr1N9TgHChgp7owIytJ+lKFf/u9Wyxk30MBk5fnn0NF/UFuJ1ZCFok6aynvPhDf231jlqM8/eli7W3Kb82uefkuRlTRoUTqer8S1rl4cJ8gGY10+fQ8V8PTra2TUQZk9SUEwiEeSzL/6tBRU1igJDwUN157lwMATOed3SAdsKPdv33bkfrfRRho9n/wtUabOg6T+T0qoyj4RrqDQ02TvsQBSa941llk6//I1xwSdoeG0pRahgLI0xtIepatQxLRlqWQGxZGprZ5cpvf X-Forefront-Antispam-Report: CIP:198.47.23.194;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:lewvzet200.ext.ti.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700016)(7416014)(1800799024)(376014)(82310400026)(34020700016)(12100799066);DIR:OUT;SFP:1501; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rKvBD7wkTxJC9swwO7mPFgMgqI1ciR8Y5pv4+/20C/nZ7OQb3eftduHLEUANhIT2fdMPBDdTOVLQnN82beMlYIzV2I2lGrZML7no2WlOAI1QDdGow+VZ5tlRqIMOU1bpTeV4fhODZB7kY8umoT9BKSrVZso6EabUTa6r4wCA8NO0NBXgk6Ypv/qLLpeCR96uVdj6L0bUxWW7j/bgXAUmbQihWycY1dNV8QzNd2i/dt3aL26EqYUdkIPy8wyZFnf38I7nk41c+aoeN82C2ybe4Wf+UA9boXwsk7Q7Mce8tnbusJl+9jSCXOKAJ9TaIRKEn6T74OqFsyFvEKGtS/e8D51hcO7cj+NGkXQf0cFneFgcAeLkIpZuUEPwNcHoZabaZgm8lH3PlZBfJbJvFPJIiIwydti8ppaR+55T2eNYsycDKH9mm7Q36WxZ5C62pZIB X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:56:49.7848 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 233edaa1-9bb6-4277-c44b-08de7af15700 X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.194];Helo=[lewvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00001507.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA3PR10MB8760 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/hwmon/pmbus/pmbus.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/hwmon/pmbus/pmbus.c b/drivers/hwmon/pmbus/pmbus.c index 920cd5408141a..d1844c7a51eef 100644 --- a/drivers/hwmon/pmbus/pmbus.c +++ b/drivers/hwmon/pmbus/pmbus.c @@ -20,8 +20,6 @@ struct pmbus_device_info { u32 flags; }; =20 -static const struct i2c_device_id pmbus_id[]; - /* * Find sensor groups and status registers on each page. */ @@ -174,7 +172,7 @@ static int pmbus_probe(struct i2c_client *client) if (!info) return -ENOMEM; =20 - device_info =3D (struct pmbus_device_info *)i2c_match_id(pmbus_id, client= )->driver_data; + device_info =3D (struct pmbus_device_info *)i2c_get_match_data(client); if (device_info->flags) { pdata =3D devm_kzalloc(dev, sizeof(struct pmbus_platform_data), GFP_KERNEL); --=20 2.39.2 From nobody Thu Apr 9 20:24:34 2026 Received: from DM1PR04CU001.outbound.protection.outlook.com (mail-centralusazhn15010019.outbound.protection.outlook.com [52.102.139.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6B9839E17A; Thu, 5 Mar 2026 19:56:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.102.139.19 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740615; cv=fail; b=GHkMRrsc0A6kjvPkPwUWzLV3Jz6nQg2UhelgMyZ85mdMWT3/y4Teq3HrGxL72J2FiRQTOXatQgEG6ixxX+ZDa8JVp3dkfvwiq4o1Dy7vIBiwPjqv+c17djomuDAJSyhC+YRnIJLKvafZuKA7RAxZSpHCEqp/xiOFKNSOu/sQHuI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740615; c=relaxed/simple; bh=UmpOfaj5wRLrwN9iK1M0DfWX/OFQsZVrUes97eP7Guk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ubzb1Pq2+fUH/79veAH5KCDlnYz6FNJYt6gZ1ZY2bjh6qXxp1GuJn5d1J8M8/PhKNx/uBrE8Htf65w8X/TRQDUwY5dq3gYNtCXcK2yGWVJcj23yF9bKFX2K50jy5s4lwZFlqDV59r9JoOPZrzGFOnNsjFlE9ciZpzZ3PMutL4bk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=p5lQm23R; arc=fail smtp.client-ip=52.102.139.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="p5lQm23R" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nvm2/fGmJyHo+cA4wsTAIDJ0ZbzOuMUo0ObDv7yQnEYV30b90X4q0v08EcFdQL2Y/wsCMVCnGjgZkQE1O7UBisHKHckIMi4bM6L410UPo2n0GVUrIPFEDBUqmw9sl+WUa18hOeUth8DPiOkB4Y/XR60pYh3OCZFvdNxBGU+BcSmfrXod1yr+fGihCogu9dumnLrkhovW6VOE+evJC7ARNcm5uR2i4Gl6rQ1/uCOnbBS8LrZNomvg8WCWy/indp/EZeUdZ03HgX5U7SDvCgto/23VACTMlmDwj34UrYS3rf+cwjiFkzZKBZpmqLOGCMEcDjqVGLhES81OiQClDKpIGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9WQpH35TEhVa4H4KkSp7oPaB2ywpmxPp5i0BjorE5O4=; b=TIiU+lxX4ttwTcNdAJmfvkdrvvX3xifPa8a4SRjXDfM4bGkmulm++2AQZEIpS23v/++UvYMkU0II44QZShgXQ0hGTZlYKTSmrz8fBJUIM5r7Qer6CN5dAq787lDaEqHwc/r4tltjgFoqjfKdAWrXeQrZHSiGiXnm31HxXhI1RaKesAG6tkcaKIuUVDLPwZ0A1U9OmHuwJPjkqVJKaFWah+alS/17wvCKykVBg1uvuqa9jyRPk2ot3JMIcgNjYOfI5XlyR0WICN3scLyugen7N9IIjWIYNKv1nl2jf+XN5MVuNVlp890lx4C0ZZSiJRBtJpHXJYFK6nDPI0CkaaNshg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.21.195) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9WQpH35TEhVa4H4KkSp7oPaB2ywpmxPp5i0BjorE5O4=; b=p5lQm23RccnBt5G/PjH/0sFQzbVwz/lWe0LbzVug5Maa96DUOZXOx0Uv5spXCkjr5cPGuxtZOuTDlij71wKHnG3mL7+xri9+vKQTY8wjRksdG70tLJddJqupysj9hYexf9T8YBk6LsH6VcrttR/H4yFQpGREi9NzgUjzW7wg9kE= Received: from PH1PEPF00013314.namprd07.prod.outlook.com (2603:10b6:518:1::6) by CH3PR10MB7905.namprd10.prod.outlook.com (2603:10b6:610:1be::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18; Thu, 5 Mar 2026 19:56:49 +0000 Received: from SN1PEPF000397B1.namprd05.prod.outlook.com (2a01:111:f403:f90f::3) by PH1PEPF00013314.outlook.office365.com (2603:1036:903:47::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.23 via Frontend Transport; Thu, 5 Mar 2026 19:56:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.21.195) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.21.195 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.21.195; helo=flwvzet201.ext.ti.com; pr=C Received: from flwvzet201.ext.ti.com (198.47.21.195) by SN1PEPF000397B1.mail.protection.outlook.com (10.167.248.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:56:48 +0000 Received: from DFLE214.ent.ti.com (10.64.6.72) by flwvzet201.ext.ti.com (10.248.192.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:47 -0600 Received: from DFLE213.ent.ti.com (10.64.6.71) by DFLE214.ent.ti.com (10.64.6.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:47 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE213.ent.ti.com (10.64.6.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:56:47 -0600 Received: from lelvem-mr06.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625Juign2456638; Thu, 5 Mar 2026 13:56:47 -0600 From: Andrew Davis To: Guenter Roeck , Chiang Brian , Erick Karanja , "Grant Peltier" , Jeff Lin , Cherrence Sarip , Kim Seer Paller , Alexis Czezar Torreno CC: , , "Andrew Davis" Subject: [PATCH 07/11] hwmon: (pmbus/q54sj108a2) Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:56:38 -0600 Message-ID: <20260305195642.830695-8-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305195642.830695-1-afd@ti.com> References: <20260305195642.830695-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF000397B1:EE_|CH3PR10MB7905:EE_ X-MS-Office365-Filtering-Correlation-Id: 2d7b4899-645e-4287-0804-08de7af15602 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|34020700016|36860700016|82310400026|7416014|1800799024|12100799066; X-Microsoft-Antispam-Message-Info: +YfafO6QG5J4B/2wesORHh42lIlFoD8/Zn3M53qtcdAbRstwcjiEFt7ipmp6fbWPxNopg8KB/To/3oW5t9EyWg73u7Ruzu97UNwxauqRGPboxTHEMItl2eQ3Qi8hCiPKkxIvYS0ko+ntjRfFsuftCjGz2kkEMdJdfguGYtn1OkSW6RypONqxOILijk/GokkGBTicxqs8mElw6hd3+x4uopn+kIWkI25TFTAkPBCGNnU3c00N6qK12XTrqNoZwcx7MhBheAQo7/X+0gkkHroh5TcbMbckgb05TwntyGWeWNIQM4A3JmAryTjFtIIpaJlhUB9GCDFAwejH0hnn6Y5TXXDan6iAzkey3kkO/zUUNBLlQAS8Y9KEfaajz3F86FA5QT89/8mvWhd3ZSgiadrddPoPStFg8BEsT/OTPAYwqUg3XGnBwhyXC61GXxHNZqMrEQ6QNx56X07hER7iN8Ta5Sd6XEoU/aQGVx2KADaX/7juUOzzZ8qF5+unyBoCt+uZkJoj+qd4ekCkpYRxgjaFaKELqZij0qjBMwzAo9SNUegymb1IqKe8xqqOAol8RUgPj4es7jmoALFpG9UUDF0ML3H4Zqk9oOI2WhBQ0zlJL0K4N7bP8FD7WCU7qwAdaDSKRQF5WfNwoyQCKamMmUBzq2q5e117Jm+nuJvVMD9LPr+kbEbPgBDkcy3IlLsRkLqd6oN1dgsrW5ktuUPXiIKUbkoCPi9ebnVDtZG7DmpbSYNHN6hDggy9XPKGIE4LlnwaefgnOz5w31VAkyJur/FLeA== X-Forefront-Antispam-Report: CIP:198.47.21.195;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:flwvzet201.ext.ti.com;PTR:ErrorRetry;CAT:NONE;SFS:(13230040)(376014)(34020700016)(36860700016)(82310400026)(7416014)(1800799024)(12100799066);DIR:OUT;SFP:1501; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bmISOS4aAKYI6fledlTRgIsQv0yMWBc+vLkRskgCCa+Q2pbCRQM2eLhWz7vXuQ23gVqxorMkcsoUn5KiU8aOV+Kym3PLcudaziUhhVedjq248v8o85i6zCpZTuZWnq5lgZq2GULh7iXl5Xap0Ec710WNqFVYVGSBApUNwZbxqUR/U/VqSsC47dMbyySfiOlNfJh3A76uUdwZRX8mED9Kw+PcIUxX+Wfv4V34QK2C5jVZWWDY+k+0QtD0nXMCO9Ya47iqdLftkckFwzbfJLyOA6lKRDw5tX8nP9nL7O/MPA+hVfHN+lnaIfkZ7p4EfAQch2uabO3fLH+jTepGzqipJbDkKC30Sx9K51dCC2PoP62xrM5ir6fDAGOqpR2PF9bJMUTOYfPpeSYxAbi8u0Zik9bFkIzYYU0ipmptqfsDXyTKfxVBeTVUCEb20JXS6yvE X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:56:48.1071 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2d7b4899-645e-4287-0804-08de7af15602 X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.21.195];Helo=[flwvzet201.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF000397B1.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7905 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/hwmon/pmbus/q54sj108a2.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/hwmon/pmbus/q54sj108a2.c b/drivers/hwmon/pmbus/q54sj10= 8a2.c index fc030ca34480c..88c25290ffce1 100644 --- a/drivers/hwmon/pmbus/q54sj108a2.c +++ b/drivers/hwmon/pmbus/q54sj108a2.c @@ -291,10 +291,7 @@ static int q54sj108a2_probe(struct i2c_client *client) I2C_FUNC_SMBUS_BLOCK_DATA)) return -ENODEV; =20 - if (client->dev.of_node) - chip_id =3D (enum chips)(unsigned long)of_device_get_match_data(dev); - else - chip_id =3D i2c_match_id(q54sj108a2_id, client)->driver_data; + chip_id =3D (enum chips)(uintptr_t)i2c_get_match_data(client); =20 ret =3D i2c_smbus_read_block_data(client, PMBUS_MFR_ID, buf); if (ret < 0) { --=20 2.39.2 From nobody Thu Apr 9 20:24:34 2026 Received: from CY3PR05CU001.outbound.protection.outlook.com (mail-westcentralusazhn15013062.outbound.protection.outlook.com [52.102.133.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F26543E5584; Thu, 5 Mar 2026 19:56:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.102.133.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740615; cv=fail; b=qAaa7czOpWMDal8hc3h1WZ2wX2iJrUHkWQtl8B4SlDjWk0R+tRaxYF0WxFAZ2lAgYbf3p1hUvm611OHlegecz4+4FhzytX+rI5YdL0fVW1Eer/exAc/hHB8Q4FEysWLO0TmD8x8/TKeYaxKCKX09zSc2YdDLhJ9uxAGTdBVsuxc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740615; c=relaxed/simple; bh=9Kpx5jwiTpOEeTnjIbNVVOUNeKMdwgWhEDPcTwku5GI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LyaxcIx56/qt1/RDwvawdWSJG/o+oe6vGUZUPBp21oSglpfPbpvOzY6E/oPilsjcdDll/Hz03m2YZ6Puc5KjWShMJxUhyFwbOlhBisMwbCjZ5JdUG/naAZReSj0JOAx6IFz3g0zUOrqLbko2Yx92gOYw4d1RY93Q3UUatWSsr60= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=OacXmc8L; arc=fail smtp.client-ip=52.102.133.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="OacXmc8L" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Xl1lMDI4YI5wQdrCJrpgoegROjQ6ydk1pUY+5619bf+lKZQP+HSW8NfVHOAqA3q9r2Stbl66S75dMuvh5ttTkd2vU8cwZlPaoVFhMM/6l9B1eas6DyF5+2F5owFMRtttWE5tuYGgGjeRq1U3wNnd2LQvZDUaaWMYUq9tVvcfeA8WU5DYoqfAPsKqYGyJaGb4W8toBV30ryeZ0pnEFqwVKpat0vdsH08xYwjoOs+hl/1iow6L7gJJZnjxqAD+KOPB0CaFPgxm+iFLLRWKu6W+4VCQbByRnspP69lk21KXrrropryc6gHZHDcjCFiT/JxpzvlRmVuoUB6c6j9+GwUDbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NrOHZEB/iubfPEIH4QtZ3+1sRAJp7wiu8/yrVHKTEk0=; b=xtj7Qpi8M6eUGwZ9dcwCOKRULAE93t0Ag0o5zlpsa7L7js1Z1wbUYjSUssL+SEvBj35vAGzYy8oav2WwX1OhTcimhOcYw7lqbB/hFgg5grEgDrWpDdbV/hQRIfmqfyc1XGxgC5xyP8KXVvOq42sSMRvnrlOwqK5gooSa0B/y8ZDHemiDysnYHe9idFZTDAzFfknBqRCNMm7iKJbm6/Dy3WrZl7pyd5EeDn6dpgmxQuKI00l/rHvVreDTrL5dpu8mOOqpI1f2ORYIi2jVwcDO2hZDzg1+wI2BgDyEmmfkMOd+9X3R0amE1XkcMkt3GV7n6onh65L/YaGWKVQUsXAzyg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.195) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NrOHZEB/iubfPEIH4QtZ3+1sRAJp7wiu8/yrVHKTEk0=; b=OacXmc8LxXf2/j52MMk7kZCnbFOzfn5BUR1jgq49ab3SqWhfee8dT1LRC7FTDUxkmhfREeW1+1AIrRUYZN+f+z/dPRtjxjoAKjGOzdK3uf2CGGzJyIQzamPltxylA4IDdWHBk2tr+aQRF/GThpxB29h5X3sA/YUG0WvZhx1TltM= Received: from PH7PR02CA0018.namprd02.prod.outlook.com (2603:10b6:510:33d::19) by SJ0PR10MB5694.namprd10.prod.outlook.com (2603:10b6:a03:3ed::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.17; Thu, 5 Mar 2026 19:56:51 +0000 Received: from CY4PEPF0000E9D6.namprd05.prod.outlook.com (2603:10b6:510:33d:cafe::e9) by PH7PR02CA0018.outlook.office365.com (2603:10b6:510:33d::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:56:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.195) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.195 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.195; helo=lewvzet201.ext.ti.com; pr=C Received: from lewvzet201.ext.ti.com (198.47.23.195) by CY4PEPF0000E9D6.mail.protection.outlook.com (10.167.241.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:56:50 +0000 Received: from DLEE210.ent.ti.com (157.170.170.112) by lewvzet201.ext.ti.com (10.4.14.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:48 -0600 Received: from DLEE209.ent.ti.com (157.170.170.98) by DLEE210.ent.ti.com (157.170.170.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:48 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE209.ent.ti.com (157.170.170.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:56:48 -0600 Received: from lelvem-mr06.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625Juigo2456638; Thu, 5 Mar 2026 13:56:47 -0600 From: Andrew Davis To: Guenter Roeck , Chiang Brian , Erick Karanja , "Grant Peltier" , Jeff Lin , Cherrence Sarip , Kim Seer Paller , Alexis Czezar Torreno CC: , , "Andrew Davis" Subject: [PATCH 08/11] hwmon: (pmbus/tps53679) Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:56:39 -0600 Message-ID: <20260305195642.830695-9-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305195642.830695-1-afd@ti.com> References: <20260305195642.830695-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D6:EE_|SJ0PR10MB5694:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a6dfe8d-9f25-44a4-24e1-08de7af1579f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|82310400026|376014|7416014|34020700016|1800799024|12100799066; X-Microsoft-Antispam-Message-Info: bAERmYdc+sVFLLqhWynVTvvKo2Etm+2VyAuL/oOePyIAYt8Qto1F0b6GS13LYzRLynmLkV7Kdt0k4SrTVUAzF0pGFIzkPDrO6WtJJeMxAZWsFwBoMDDovqbjszSm4rtP8PH/hIiOZjvfODeiKGWp9oxHsfLdYbcIiBklcVvO2vmQ75Z67IEZyDsPBFcheJ/4+9rWc8vX+6AmE0zoY3KRxia2aCbFX3wWBsoqClikSisUWm1Ef+4sWjJF0v4ifkpQPUEYyTjmO9yuZ9JMAajubSFxtVLoTfGaIOex1Rf5/M71bTcCm5vHzR1O/0oH8uypb9MugVAACs+usB/Z0eMUKM9TXmavMB7F25+TNAICz1J8y/IAucT66rhY8sH+KUIx0kcooOJ+JH6F7MtuPZ6dHOWhOqTxDrZNnu1qKJOfv68sM/lhDcNZj7k6+tOMRapUVYcXcPo9KblLwN2d6tX21bl3j4J7qxEIXYIqUbMUjZ8UJLp4JyMVNWUvWdOHekfIwAZ2TPWAwXqxKfqdsjZ9EcjpDJgVcofbzj0pqSQdrbEAZtGkap6qpGWJNsgwiZX8A9cpll+GOuEVFiyHR6aV1er9VZ4A6YWl4825c8yDbW+a3X4ssOZ9uMLXxa6xXQIw3gHjc2P7gxyHtEzXeCJQ5+M073fc17pFU7e0fq4yfsYf8REUWif5ntrTZnZmHPXMCoCIfawUgFqIGbxv+mkSMV6g6kwiRNxxc1KEHOCutR3s4ogTgYpGkeGGKVB7Zc1roB1vX1krjITR4Uua5uK2aw== X-Forefront-Antispam-Report: CIP:198.47.23.195;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:lewvzet201.ext.ti.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700016)(82310400026)(376014)(7416014)(34020700016)(1800799024)(12100799066);DIR:OUT;SFP:1501; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IeCPNCKuIj7eTQr/No7JyDiXt4h/TkbQF1EFP7k5+QrAvRarI6kTA1oLCY0JQNs9dn/erfbk8dafv3/pjcV5DMCg1oi4fTc6TWr1OQuFpEgbtbc8gK/Wn2ySfRCB41HQ276w82N8iDf61tDbrt+PfKm1Au2RT0VGgwsvYsmVKpkq+B8nUuxQ9U85aw+LgdY5kx6qx7A97cczVP488UYcTvGcjK9diLvxDiZ9jY7IP50jzbBShBdN/XuKnDXXed36qDZIXPOEGpnuMHSjO4XCrc1IMrU7bEYqPxbtkz6EPSpnLxMMAPF3eHAzKNsWOBioAjyeycgo5oZZw1vx3UvXvbJgqFy4kGkE6f/h3FycF/WeC3hDDeAdtf7ClYp1Yh8w9wcsz9Lp+NWmlURYuiZP6RMIhkD8ipwfOyhfdJW2+gbIqGpxqrEKENx1VXkIltQP X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:56:50.8158 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6a6dfe8d-9f25-44a4-24e1-08de7af1579f X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.195];Helo=[lewvzet201.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D6.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5694 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/hwmon/pmbus/tps53679.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/hwmon/pmbus/tps53679.c b/drivers/hwmon/pmbus/tps53679.c index ca2bfa25eb04c..df2726659a4ed 100644 --- a/drivers/hwmon/pmbus/tps53679.c +++ b/drivers/hwmon/pmbus/tps53679.c @@ -253,10 +253,7 @@ static int tps53679_probe(struct i2c_client *client) struct pmbus_driver_info *info; enum chips chip_id; =20 - if (dev->of_node) - chip_id =3D (uintptr_t)of_device_get_match_data(dev); - else - chip_id =3D i2c_match_id(tps53679_id, client)->driver_data; + chip_id =3D (uintptr_t)i2c_get_match_data(client); =20 info =3D devm_kmemdup(dev, &tps53679_info, sizeof(*info), GFP_KERNEL); if (!info) --=20 2.39.2 From nobody Thu Apr 9 20:24:34 2026 Received: from CH1PR05CU001.outbound.protection.outlook.com (mail-northcentralusazhn15010019.outbound.protection.outlook.com [52.102.146.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C68413ED115; Thu, 5 Mar 2026 19:56:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.102.146.19 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740617; cv=fail; b=I/F4CKlKWw6gdYT5smoekYdIeZp0ooUPMNirLxdA5nJKndNEkOPEyYCf54m+12wLF3IpU6UQ8myWC0ONa6b81t9ZNkVQjKdRDogzZ7ItRk9dKtB80MNQxOKLBTE4hJZ4PueOyz2cXPkqohQqh06AD9SvR46urDj09WMkQ/IB0EM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740617; c=relaxed/simple; bh=/8qbNfm0PPPrqV+LVMmhzPvWwdqbCx9SrXC/dzghbh4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pWgINx7VVzo9ZXI4pE6ODVN2lS29M81MOH4ZSXoewmqvKhQSinnb4l9uRvAjZCeHHTTNb9mQDJU6wryh9IViH7y9vj+Tr4T2Tu1jGAG+10Y59EuldRDcHmjcA/ixaD9pHEy9SUcJd7DHr8BD9loXPmKQt+LoglyHPlYY6TKXhio= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=WiHWjAON; arc=fail smtp.client-ip=52.102.146.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="WiHWjAON" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=w9sw59j0Y5RwijrRBVgRN0LbQNOrfnTrxiICY7wb70ML+1/6Y3JhGuTburzqa5nL1X8eu/dx80nZRobJsjDeXfkcwiH71/b+MajWqNzOMNALiBAX3UkoLgZfThapGpf2EqAfUYNzm9SwAv/luhH+/zcD65Zqkpl1MNN3QLeqtZelRkcZs7wqXkUYCZlZ4HsyeRiaBl1LwTkzdqXwC9ITZrK3ExLiN1dblWpK1aXVeFTzrYAa1+kyflyBkWPxYZrDAeDWp1R+ymYALGLeMwPB1eR7C7h9yv820mYKMp5IY5SfaO7TUdGnM6DHsrNjHNA6mpqv5ZoIawnoPMyS7fIQUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8nktt/J3SK4kqg0Ff+Gsb3bybv45QLdDDwC1k1DRDJw=; b=soi3w/KeXcJUdJx1UPUqUhReWvhH+JJeee3ASrErhwVMyy+fqkXY4Hhh15Y0fatYg9P1AnAYJRvKBePNR/2TPUpwDbhwwzLJfLfFFfEsW5Vj9VhvI6lbLvS+emP6HECqhl16wsELCR1OEZlmfNKjDQoycflSdNrO3NGaqAs9SLzOGboPlWEVmgvmv6WPoPZqGRLjtbhUAtZOpu7hbxtJM4O6dSBK90ffe80LatOSmXDql9Mb13xw7GW73Y/Boq+4Dg6K5yrSmpJfeatMtUSLaqEVhKLJmorkeQtj4URaFrLBygQErBgJ13c5fkZaVHXXKCqyVmjV9hFJIcofPrn3wA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.195) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8nktt/J3SK4kqg0Ff+Gsb3bybv45QLdDDwC1k1DRDJw=; b=WiHWjAONTXuYQu4qzAL3XHlhc6zmCe54N7AyFFcFG7zUpNLWB5glgX4vXlB0EyXvUSkyG6vpASf6xWW2JDLFR1nK4pQAhvCoYVpMfvRNX3kE8eomfTLzHm4BG65/Yf2w4W//zSw7nRNxlrH3uTW7VUml8sQmRF09IDXDgHF0vZo= Received: from PH7PR02CA0030.namprd02.prod.outlook.com (2603:10b6:510:33d::24) by SJ0PR10MB6376.namprd10.prod.outlook.com (2603:10b6:a03:485::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18; Thu, 5 Mar 2026 19:56:53 +0000 Received: from CY4PEPF0000E9D6.namprd05.prod.outlook.com (2603:10b6:510:33d:cafe::c4) by PH7PR02CA0030.outlook.office365.com (2603:10b6:510:33d::24) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.22 via Frontend Transport; Thu, 5 Mar 2026 19:56:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.195) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.195 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.195; helo=lewvzet201.ext.ti.com; pr=C Received: from lewvzet201.ext.ti.com (198.47.23.195) by CY4PEPF0000E9D6.mail.protection.outlook.com (10.167.241.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:56:53 +0000 Received: from DLEE209.ent.ti.com (157.170.170.98) by lewvzet201.ext.ti.com (10.4.14.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:48 -0600 Received: from DLEE208.ent.ti.com (157.170.170.97) by DLEE209.ent.ti.com (157.170.170.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:48 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE208.ent.ti.com (157.170.170.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:56:48 -0600 Received: from lelvem-mr06.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625Juigp2456638; Thu, 5 Mar 2026 13:56:48 -0600 From: Andrew Davis To: Guenter Roeck , Chiang Brian , Erick Karanja , "Grant Peltier" , Jeff Lin , Cherrence Sarip , Kim Seer Paller , Alexis Czezar Torreno CC: , , "Andrew Davis" Subject: [PATCH 09/11] hwmon: (pmbus/fsp-3y) Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:56:40 -0600 Message-ID: <20260305195642.830695-10-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305195642.830695-1-afd@ti.com> References: <20260305195642.830695-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D6:EE_|SJ0PR10MB6376:EE_ X-MS-Office365-Filtering-Correlation-Id: de0b7722-ed39-4b03-36be-08de7af158f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|36860700016|376014|82310400026|34020700016|1800799024|12100799066; X-Microsoft-Antispam-Message-Info: V3bX/eckxnCyut0OJbJuGP/xfr6PPILxANWeWwvmxOIeyTeyBswLe5bWSBFNPN9KxzrHC+JkIzHFzqSnOAFun5lx9ZmePHKWIdRO7kn3JhDeLlHs9+dbaxAsIaY8a3HaI5loM/vA3GAdL0L4H5GzmEh/Svj5hNfD8uhY/rJXtQ4JEX4bcJXMoPQdVPsZjyPYkGZhmw11+wXMoxtiLhu+rZyJKAgBUNQjiibFrStIYXkPgVW3BP5zWYPPXmgPaopja3o1aAP4uxsV9uPmNsQrPLabD1k+zPnRkeXssyXnwD9/mipoFwbEhanAbOjfJQh5T9N9am1Vwk2LqMe86pQcesDMvWAsInKHggaYY3XC408k+97/lGKX+EKETGOHbNpzOPwA8Qq85mtBLpO8wkWUMiSWJyY7bHGlC2gMykva3ngPXtnCXr865Ea4H8wpNNmzPluvjdRtbFOmHr0Zo7ubnIrUwytCl8/j/RUhFL7SesD4Xk6dUC6rAbklfbU9P9YSe1tNaijT4PTd86lRFlIt/4bg2bpxBHPfwVhbnkUVLlEYGcbEiubKhwc5Bc0OexOZvGXnH90/jdlLsYBMVDgRWfw8B6MZqne/+TEJfNqgGmtJ88CfGW06O/prtWzso461HR2Aes+oFlqmtk/5hGieLk9Y43i1IFYtY3PwfYYTWRoL7UG1iWycvWlYUd44b44r2EQGLTjpW0xRjEI8DTcNEsQBVulR9QOFaweyauMwmLrsUO0qp03CpMBK2l1pqwDK8dFv7RX693XrYWS+c2R/Qw== X-Forefront-Antispam-Report: CIP:198.47.23.195;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:lewvzet201.ext.ti.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(7416014)(36860700016)(376014)(82310400026)(34020700016)(1800799024)(12100799066);DIR:OUT;SFP:1501; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Y4NOiH4w7SNJhBXTwpVMHq7VE4J8Jk1ni4anVStXrcI1h42I1psdZXLVTxeK8rZdA5Nae2WGB6Efi3b3HptkKn6VF9cngfNrKWbm3c9yQjkWRJOapHPoACkLp1FEAp5PUXZaYOMElh4J+rr70FTSKm4lVZg/P7ti6V4lEzrCimXWo4O0ODT7+cKcBlRH6ttnxSReB9lF65LnEDutdcVtXf9IOLT/riz/IQ9TvY5GaJW8a8k6rCHQ8d/4Kktmq1NuKUClICo5E3pGV1VVPfdtTfXsBqdMPg/4F4nzTlAK8FkSrVlVeEe/oLGGhxazg2D59nOSG6qWGDgr4RksObx6vqyXqcNp3qUSfc3S+CiTXYbq4kEn/GnWK148ASMYABkKQ5YFzZfMiAJuMPD73ncrHiHl4O0JobF21/XPWkqM3SnIdZxjIjom01mHH1IuBYu0 X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:56:53.0598 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: de0b7722-ed39-4b03-36be-08de7af158f7 X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.195];Helo=[lewvzet201.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D6.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB6376 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/hwmon/pmbus/fsp-3y.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/hwmon/pmbus/fsp-3y.c b/drivers/hwmon/pmbus/fsp-3y.c index a4dc09e2ef75a..cad4d23300036 100644 --- a/drivers/hwmon/pmbus/fsp-3y.c +++ b/drivers/hwmon/pmbus/fsp-3y.c @@ -222,12 +222,6 @@ static int fsp3y_detect(struct i2c_client *client) return -ENODEV; } =20 -static const struct i2c_device_id fsp3y_id[] =3D { - {"ym2151e", ym2151e}, - {"yh5151e", yh5151e}, - { } -}; - static int fsp3y_probe(struct i2c_client *client) { struct fsp3y_data *data; @@ -242,7 +236,7 @@ static int fsp3y_probe(struct i2c_client *client) if (data->chip < 0) return data->chip; =20 - id =3D i2c_match_id(fsp3y_id, client); + id =3D i2c_client_get_device_id(client); if (data->chip !=3D id->driver_data) dev_warn(&client->dev, "Device mismatch: Configured %s (%d), detected %d= \n", id->name, (int)id->driver_data, data->chip); @@ -276,6 +270,11 @@ static int fsp3y_probe(struct i2c_client *client) return pmbus_do_probe(client, &data->info); } =20 +static const struct i2c_device_id fsp3y_id[] =3D { + {"ym2151e", ym2151e}, + {"yh5151e", yh5151e}, + { } +}; MODULE_DEVICE_TABLE(i2c, fsp3y_id); =20 static struct i2c_driver fsp3y_driver =3D { --=20 2.39.2 From nobody Thu Apr 9 20:24:34 2026 Received: from CH4PR04CU002.outbound.protection.outlook.com (mail-northcentralusazhn15013044.outbound.protection.outlook.com [52.102.146.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18AC93ED5A3; Thu, 5 Mar 2026 19:56:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.102.146.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740618; cv=fail; b=iwHWhgW49vAvqevyU0KTz0ixAY83dGSHBJelGSLGO2dBIrLnLL/T2BXvTBeH7QjuvO2MliHQzhT6AeSU2JfuknNzN6uLAGkcVxbxmk4YHKlpzg/tnwPQv7gd66oIJRHHjSog10Bx6ViH6fESqQgmCHyEwdTrneNRvbVhHcddT/I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740618; c=relaxed/simple; bh=gyNbxyWjoul3lyNP6Hs0HFLW2zRg3uSPVc7b8O9XxlA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=czqsNvG4w1PiMBckqXFjjdZ6JpYSh7lfQqOo9UZk48SZJl1RxIh6Td/6gvIK2rXQ8W0CkPR0QZr/sFUnqL3EmP1ZUCqRrqQKD/8JWRvTaEG+jwBya0xogloV94B9rk38h0m6F9SVFjk89u4+5mgJ+Ph9en/v4Me+fLWv9SQhaTw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=U0JpuMf9; arc=fail smtp.client-ip=52.102.146.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="U0JpuMf9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iT20k5JkN9Y3VyHHpQQMWAH5QsVV52g23hZ6x9gWaxoc6Lrw7NXM2dDCz72x63Pf4i5PFEHAoqHpuz/Lnz5nZEH249ieurDgmR1F4qY9znMmDF9rOjee2zFJiRdCyGGUe0OISe74n9WEPVy0LiqryrFFQB2xfbcsvEg+DAoMfwdWO/XN+oGVkYvYl8JlevQQTXDwXKI2wtBuBhhpLMhgg/R01uVaOyQkB6MGwyRc3aZXGdgM3wAxJRdUkPV5OqaKxLbCNKm+HG572RlRVAszVb8L8rNbuDhpYOUwXt5brsnwpKFg15Xwk8qt9/9Y1417aprKAHIu2MX/Dq7hMgC4OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BlCSE/BUqAFJfStIb490DD44v8di2xJXM37itGgGS6Q=; b=YfvcSNLvtM5sPPvENNbLurwmY3pDkDB9DKJYyWKVPrVA+9h2texX3CDH9HHUFNaa63b1CRDA7v+nnnoipDdlh7iA5NHFOw0cyS0dKROCJGhElwToZH3jgyYElGzJ3umeubm1z6F503PmA+pgJmLovPuVW1CjS46+kISMI1OD008/iF2D8dAFM20cOrg81WJWSJ7yZKpOYqd0eGR8Uc8riJcre4Nl7RRird3LBs1MS5vzmxXedJTECP+huANC/jNqrNahN44JN8kDb808tUQtbpt0HmzUZ8el/W+EoIfW7Cb7cQfzC7UoowqEcwZ0DPkD4LLlVfUXXaw9eWgMKv9yQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.195) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BlCSE/BUqAFJfStIb490DD44v8di2xJXM37itGgGS6Q=; b=U0JpuMf9RFlaXHECna/LvcKiagOIPLei1W3yAbXe6/8ItrtCqbwVduheBE69oSihU5BWdidbkqRXv6M2Dc3bdeAuhLTBgtXTgJU+atMWdOA2KMdHDzOu7YpUssZ+mLXT5R/SgAJ7k4vTa9k79It0gY6DajgfgmqNCWOZPhWOqhM= Received: from PH7PR02CA0012.namprd02.prod.outlook.com (2603:10b6:510:33d::12) by LV0PR10MB997638.namprd10.prod.outlook.com (2603:10b6:408:346::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.17; Thu, 5 Mar 2026 19:56:54 +0000 Received: from CY4PEPF0000E9D6.namprd05.prod.outlook.com (2603:10b6:510:33d:cafe::a7) by PH7PR02CA0012.outlook.office365.com (2603:10b6:510:33d::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.23 via Frontend Transport; Thu, 5 Mar 2026 19:56:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.195) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.195 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.195; helo=lewvzet201.ext.ti.com; pr=C Received: from lewvzet201.ext.ti.com (198.47.23.195) by CY4PEPF0000E9D6.mail.protection.outlook.com (10.167.241.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:56:53 +0000 Received: from DLEE210.ent.ti.com (157.170.170.112) by lewvzet201.ext.ti.com (10.4.14.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:49 -0600 Received: from DLEE213.ent.ti.com (157.170.170.116) by DLEE210.ent.ti.com (157.170.170.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:48 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE213.ent.ti.com (157.170.170.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:56:48 -0600 Received: from lelvem-mr06.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625Juigq2456638; Thu, 5 Mar 2026 13:56:48 -0600 From: Andrew Davis To: Guenter Roeck , Chiang Brian , Erick Karanja , "Grant Peltier" , Jeff Lin , Cherrence Sarip , Kim Seer Paller , Alexis Czezar Torreno CC: , , "Andrew Davis" Subject: [PATCH 10/11] hwmon: (pmbus/ltc2978) Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:56:41 -0600 Message-ID: <20260305195642.830695-11-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305195642.830695-1-afd@ti.com> References: <20260305195642.830695-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D6:EE_|LV0PR10MB997638:EE_ X-MS-Office365-Filtering-Correlation-Id: 03075605-354f-409c-8330-08de7af15952 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|34020700016|36860700016|82310400026|7416014|376014|1800799024|12100799066; X-Microsoft-Antispam-Message-Info: b6dmLS/Q/RbiBTh1HvLMDMt0oIxguhpetBOZthII14rfZ1piWir+uA5mwtp6oR2fpkZdB8hug1xyFim2quc+CBxjPtJqLQsOEAD4sbkq1AN6yK6kgrDS0IdHe6OzvpowqSNogj7bnB3EeKXuWcEhIgUPuABE630yDjBtF4S91a7eNLJIR032tetLela+DWCH+ZDLZPJnzQthePbqUuXNLJnMJmsDm8Wiz2QFYEFdnwyRQE1xHQwQeC+G8SSjt8gfaOIngsfsIF5C9kSKPi9BlmkhDChQXXCX2R1KOdGxm+mD+ysT7/6V64cunKJ8uooDfkVveoSYzQ0qvG4k0whpsKyaald0oQwzxuC6mOLaBqC5vP9riH0AL9vWjpvHOgl00zzJkQeGwZB27sEr0Mnfbx8dcOConffZC65XcIWvrOnvyWBcoNBHY6+NcE9UwUgA4U0S714i6Q6qSH9Iv3xEf9cG2hnO6Kf3uJVKb2+p+QKjQwWzwYpv93tzjUItZdwPWhethfJUVLMKrwP7oy2fgvPQmeyG/oQYRm3dnD88+gRbbFIRwxfGOt22iRXLOv73/hMjyMSRkHfG5zziCR05nd+eIeQYx9WG/tPQYsuGBceXfxxRyLA6DRhXiFGVHxKhpT3e/3jnrcqzaHXJ8ZlNiKqoD8hn0r1qg6kntrR4rjAkhvuMDrEg3PqNVKPx09YxkogGIvwHEoPHFosUyZxvjIV+7HVxVY6i8CVYzWWMMGA/LANcoRPVtIKddqpORDWhh4wmBoafGmvXCFgiCnkr8Q== X-Forefront-Antispam-Report: CIP:198.47.23.195;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:lewvzet201.ext.ti.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(34020700016)(36860700016)(82310400026)(7416014)(376014)(1800799024)(12100799066);DIR:OUT;SFP:1501; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KpGgKqg8TZ4lGvz32ZewPLIXcIU2mj2VG/fCM8E9dFSFRsAeb4MsnThAXoSjgLk2uKG9UJdt/x03EPhSYZGp1dfN46jbEP3Hm/1jyT8Zlf+rGOsQqhUhVVGqvLrPx8HTPIXxURGWKzBRvUVp/aXGH5jA65ftiFhoUlyDeFVGMUNgfwqseENZLSIAlJMf9+TCHs1alhx+3we0l+UpugX5WYzdAAZnT0KTOi2uKi1e9aDUkdv2Ya2a7ctLHd3rzKrP5dKYMFG5I+Sc1bwscSmQ05Hefsy7vTDzcHbNkVkISSukxhpbJlywMWA5uATmNyx5jt+YUTqOVwK1XyqzEgD9H6f0hPmHX7DzUoR+ktaN52Rh8wJSqShz4gwWORV97Z5MFhHQv7n5J3DExxGO1+DGAO/E2OPbNPKBuSl5flrDT/OHg7Bfvsx6Yf56V51Yzf5R X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:56:53.6636 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 03075605-354f-409c-8330-08de7af15952 X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.195];Helo=[lewvzet201.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D6.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV0PR10MB997638 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/hwmon/pmbus/ltc2978.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c index 8f5be520a15db..d69a5e675e80e 100644 --- a/drivers/hwmon/pmbus/ltc2978.c +++ b/drivers/hwmon/pmbus/ltc2978.c @@ -733,7 +733,7 @@ static int ltc2978_probe(struct i2c_client *client) return chip_id; =20 data->id =3D chip_id; - id =3D i2c_match_id(ltc2978_id, client); + id =3D i2c_client_get_device_id(client); if (data->id !=3D id->driver_data) dev_warn(&client->dev, "Device mismatch: Configured %s (%d), detected %d\n", --=20 2.39.2 From nobody Thu Apr 9 20:24:34 2026 Received: from PH8PR06CU001.outbound.protection.outlook.com (mail-westus3azhn15012028.outbound.protection.outlook.com [52.102.149.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C51CF3EB7F6; Thu, 5 Mar 2026 19:56:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.102.149.28 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740614; cv=fail; b=oGrxl4eR51/UWqPdZSAdlz43Kt96izVmUxZsF05gQouQ0lI8ei9I7GTelpYZ1UFqiTj3GtY/edKRGl+OLta4EsPMmrF530BraPP9lpuFRdrpSazgE95TtEnPXmnMklT9PLn4IJhiYBA/eGpz/WkDeqxSaVR2esmT5tUt3w9MQ3c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772740614; c=relaxed/simple; bh=nQ8HT1FmX85D5PAFwIx51WZBZw2BMlqiznnUVpp5HJ0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CIFQbPgZCRulOa6ZZuWaZPGo92CeXmWJTkNG9eBS4KYHS3sy8Ydb7GB8xAYauwletrc3v8JwoZlQKlysDBwDkf5E2U7Et9IrQIh0C6mlocYeNpqtzFHfxifIbblhGKsP0sgNGXNYQeM76i8zu648KkG9oObur20ROmt+/vnx/3E= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=kQC4aw+C; arc=fail smtp.client-ip=52.102.149.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="kQC4aw+C" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=T8AklTdMg1liGW7mIqsTZbUaiPfDfNJ2RjmxGS9ShLs2e8w+/LBSG/qW4wmgldTjmWJCeTfPi+3w8r2Syp5kPCov9PMtGy4cIOtBpR5GId7DGWKELUeVAJTIs5vWsf7pyr/CysQXxmsVLTUOW8TE+YhLLPL70PKjriwveBf4FieJKmyL7rDNms1ixCw5jTF1pW6WtpN8sQgdiPcFBNvMzHb1T0bwRm0N1qq8IGW6O3ck6bm5kqVEELskroureNlBNvADewnTAdEovdMP5dyVqcx2GhsxmzYgfwXNlObmYKJv2ESizCo7Xr2zXYks/qoyStdgGYEtcqF1ztOS6nw6uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HvaY/IurmObiSRHxEXGts+BpBNUPBS2qToFF7rGP778=; b=Q307OIEk8UL94TC85zNxx7WF1HSJe6nquzmMOoxb9OaTyJUlxtMQAxsDfsDXDHPxbeNjGYfSdo8egSDP7GJydd324p+LvC4dWHzLC6sDwDxzSJDEMobf2XOQEnKuUmkuebcS/86wuYBEJ9pvVGs+JUY1KPrynekl3Et43I7fvTpuLxMf4L05FwSO2eSUCKobdHV47B+bmeGp17bxHvQsDME1J48zhJfsbefPQ4lzorLKySWBwfWSo+DJ7bCHWainqKl0seFIFiR/NQqZLmiUTMrFcqD4vKI00eE2kJ9lbltsv2ew6eNQGdInn7LTBeHcNz5vYbJZutfpBlY9/JfkrA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.194) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HvaY/IurmObiSRHxEXGts+BpBNUPBS2qToFF7rGP778=; b=kQC4aw+CcZEu2B1xqUa3rNiEqfu6UQm/Ib0CpvEh5TQ9R8Sk7KeRwu6DWNFpm3lf07KSCqg4cCuJTxyxMwqBVCoknivqIRSAW6rkxGM9iKICenMEfyeLXlBqSbN2voJfqiFHDE0LmKJGJX/TVuHl3S0tg36Zq1rhazi5b/9129c= Received: from SA1P222CA0027.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:22c::11) by SA1PR10MB7737.namprd10.prod.outlook.com (2603:10b6:806:3a7::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18; Thu, 5 Mar 2026 19:56:50 +0000 Received: from SA2PEPF00001507.namprd04.prod.outlook.com (2603:10b6:806:22c:cafe::21) by SA1P222CA0027.outlook.office365.com (2603:10b6:806:22c::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.23 via Frontend Transport; Thu, 5 Mar 2026 19:56:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.194; helo=lewvzet200.ext.ti.com; pr=C Received: from lewvzet200.ext.ti.com (198.47.23.194) by SA2PEPF00001507.mail.protection.outlook.com (10.167.242.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:56:50 +0000 Received: from DLEE210.ent.ti.com (157.170.170.112) by lewvzet200.ext.ti.com (10.4.14.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:49 -0600 Received: from DLEE205.ent.ti.com (157.170.170.85) by DLEE210.ent.ti.com (157.170.170.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:56:49 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE205.ent.ti.com (157.170.170.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:56:49 -0600 Received: from lelvem-mr06.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625Juigr2456638; Thu, 5 Mar 2026 13:56:48 -0600 From: Andrew Davis To: Guenter Roeck , Chiang Brian , Erick Karanja , "Grant Peltier" , Jeff Lin , Cherrence Sarip , Kim Seer Paller , Alexis Czezar Torreno CC: , , "Andrew Davis" Subject: [PATCH 11/11] hwmon: (pmbus/max16601) Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:56:42 -0600 Message-ID: <20260305195642.830695-12-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305195642.830695-1-afd@ti.com> References: <20260305195642.830695-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001507:EE_|SA1PR10MB7737:EE_ X-MS-Office365-Filtering-Correlation-Id: 3328083c-2951-4ad2-1e74-08de7af1576c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|376014|34020700016|36860700016|7416014|12100799066; X-Microsoft-Antispam-Message-Info: FiZQOh5dOoq/oGp6bRrPjyPqPalCq5M/P/COkErgjUlqQhdWpiN9TWDFoXULT3Y9EX9AQc+EUfMkAiq/su/gF/N1b+RXFl6mA2L8+blrr9mQjmIy5mBg1FFFdf0eeFIrTPbYWEeUj+/V9XyZYEurbGi0Ez4HxdJhrKPeGZdBDJLM4Flw9AtrQdT5Iq44H0mZIDLdLqJgz2fIkUPo2Jh1kU6qXD/JW9aGMl4jqIIMhw/jV7UOHwEhvQUp3YQeKYBYsxA62Vvdb0oxcHfydwLLPAiswgWBN2jx/vkHaRWxD9vZTehNyJNhB1+Rfy6XjFm1416uFkn0jkEXA8nXrmxR8L+jmGlUdM8kTvSbEc/5ZOq6a2KixhQZdTd24LnfcwrYKPZ/vr+sFKU28stcPB8wY+PQz5vm619yCYr6M+guGRGNj+kT6T/l2OX/Cg58lbUPJxWQLz96SnJt9FtAduBRpAo5zmyemLNqBlfS717SHapnnZyxaKflSMR3gjL1xqYKfiHV0Nmo9FJmk3egKOh71Cideh60enwI20/WV3QCQLVzprwVhWghGXy1HEAeV6LRO6PUeS29jUTAWSrRgcTKeS8riVP386thDgRwTy17t777zYMjOCwZI0dbX7Eq3656E3vrSjTyBhPJ8iVghdud3vAZwfS9lWr8Lhn2JxSsORv4PnXhdcWniarSpXz3uVO+snf+Y+B9yhlKxKobomyAXcqOFTv/aVj6UbMitPqRa8KvhAJkIT7Z9HdMOUlSNHjKV/6ptr0MaP2JXLBkmbP1BQ== X-Forefront-Antispam-Report: CIP:198.47.23.194;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:lewvzet200.ext.ti.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(376014)(34020700016)(36860700016)(7416014)(12100799066);DIR:OUT;SFP:1501; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +VB3CgAfOdRg3+hqQue3zqh4OcdLeTeOBeB7lOHwZR8e8agtFFNVoEbIQfFBjUBYom6n1PD7DLRq0MUknZFl4MHQn/9oJ2407h54WcdB5Lxm7GNA22LOwRt7MgFaSVtJ7WrlLMvKm1Pgf8Ndp+pTFQOQgvM88nHZ9GcqVoO1UOCYuKn0Y10yn9otS/6WLucijaImjAIyd8PokmWUMVPeQ50UpujfCnyZlUiVA6+QbVbasuTaDxyEK8O+SBt2Ftqtopzg37CkJXXPgYlXm0yRQ/2ErmbrM9+FjzxQliI0KL2n2S6hVx4r+bHqdL2Ujgf4FEwS7w9vi0WPzem937M0ZWmOItBOJTqg9k1gyDn3XqgFpBsj6VGCfx/XlAUioT/vSDgV/UxJUHQgUvlGpM/ijQ5tX1vPkjMf7OqqzJ34JLvnPm64uXFBPZyW3rxY/sBP X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:56:50.4947 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3328083c-2951-4ad2-1e74-08de7af1576c X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.194];Helo=[lewvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00001507.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB7737 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/hwmon/pmbus/max16601.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/pmbus/max16601.c b/drivers/hwmon/pmbus/max16601.c index d696e506aafba..36dc13424d929 100644 --- a/drivers/hwmon/pmbus/max16601.c +++ b/drivers/hwmon/pmbus/max16601.c @@ -318,7 +318,7 @@ static int max16601_probe(struct i2c_client *client) if (chip_id < 0) return chip_id; =20 - id =3D i2c_match_id(max16601_id, client); + id =3D i2c_client_get_device_id(client); if (chip_id !=3D id->driver_data) dev_warn(&client->dev, "Device mismatch: Configured %s (%d), detected %d\n", --=20 2.39.2