Received: by 2002:a05:7412:3210:b0:e2:908c:2ebd with SMTP id eu16csp740081rdb; Fri, 1 Sep 2023 02:54:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE3Gpi6uwlnYBYTqpTRkPDzLzL9sTgescDzUEJy7UNO5oUyGlzE43XZ2LOGxn3pqqA8eOhv X-Received: by 2002:a05:6402:ca6:b0:521:ef0f:8ef9 with SMTP id cn6-20020a0564020ca600b00521ef0f8ef9mr4634815edb.19.1693562044184; Fri, 01 Sep 2023 02:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693562044; cv=none; d=google.com; s=arc-20160816; b=FeVQ0Fa+qz+CQy8L49198yPvIT3r+m9I+bxQlyDZG8Zb86pPgLTWybB6WcH8Tmbgdr ZiSRjRuxs9lAoRVwyTbGZLtx51rskdBdlRPTIrVNWs7S6pNMWWgkfJh3/SaZs4YS6Jf2 C/kCIp3b6b0hxyx6YOP9svRvUk1a6HEEfieZCg1OD0NpruGebxnqy12dMWV/sl+jlZoq BinnXK6ClRgrWLtOsUeYzTdIuSHADuJHJnkviNtor2wzEAOAiinLBi1lbPMZG7QeKcyd PLInJeC3EyGuoEEisgNHtlly24yJe0MKT5aMsn25HT7LDuU30QVrPizIXxYTgrxR7GYw IHPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=qexVxqEsOSoeaTbkz8ElE05pHScwC/lDVuyEpi3POVc=; fh=VdeWdNv2Y3HwtDbQJ/FB5+bX4+EoEjY9/LxfbUHZuDA=; b=E+bgHIcvbaYYJHgXBx0WGgrEW0o8EQRnSBj6aIKegXvo4f7h2JJpDK/skFFn1S6h7A 6hCGudYXPeYHZpGZePqrtLYwAEGTt6JY5rPfRtlajSlvER8di5Q1gAzSP7kGQpcF2pXo 1mz7HCvF7IcYQvan4d2A3PZpveAPrsVIJJ9UxFHW+GGUx52Qb4x2GR8J7rTlJVeGPq/r OgBoFnhXbklKcMyZardBMKYh5qzsxNEVhfs0SP3xaay2MYUdrRm2XPxk5jToEbhMto/l Ga2OJvJIJ607nI7XXgm6OTprhoW00neXVThPpPAlCqprwt/1MHlDQnJTQuLBrE5zmpq/ vfcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u1-20020aa7d981000000b0052a3c3ca01fsi2414419eds.559.2023.09.01.02.53.36; Fri, 01 Sep 2023 02:54:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347056AbjHaScM (ORCPT + 93 others); Thu, 31 Aug 2023 14:32:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347047AbjHaScL (ORCPT ); Thu, 31 Aug 2023 14:32:11 -0400 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 367BCE76; Thu, 31 Aug 2023 11:32:08 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.02,217,1688396400"; d="scan'208";a="174628379" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 01 Sep 2023 03:32:07 +0900 Received: from localhost.localdomain (unknown [10.226.92.179]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 040DF400CEF1; Fri, 1 Sep 2023 03:32:05 +0900 (JST) From: Biju Das To: Tony Lindgren , Lee Jones Cc: Biju Das , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Shevchenko Subject: [PATCH v3 4/4] mfd: palmas: Make similar OF and ID table Date: Thu, 31 Aug 2023 19:31:53 +0100 Message-Id: <20230831183153.63750-5-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230831183153.63750-1-biju.das.jz@bp.renesas.com> References: <20230831183153.63750-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make similar OF and ID table to extend support for ID match using i2c_match_data(). Currently it works only for OF match tables as the driver_data is wrong for ID match. Signed-off-by: Biju Das --- v2->v3: * Updated commit description. v1->v2: * No change. --- drivers/mfd/palmas.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c index 3ac9dec2b117..7fc886f4f80e 100644 --- a/drivers/mfd/palmas.c +++ b/drivers/mfd/palmas.c @@ -513,7 +513,7 @@ static int palmas_i2c_probe(struct i2c_client *i2c) palmas->dev = &i2c->dev; palmas->irq = i2c->irq; - driver_data = device_get_match_data(&i2c->dev); + driver_data = i2c_get_match_data(i2c); palmas->features = driver_data->features; for (i = 0; i < PALMAS_NUM_CLIENTS; i++) { @@ -699,10 +699,10 @@ static const struct of_device_id of_palmas_match_tbl[] = { MODULE_DEVICE_TABLE(of, of_palmas_match_tbl); static const struct i2c_device_id palmas_i2c_id[] = { - { "palmas", }, - { "twl6035", }, - { "twl6037", }, - { "tps65913", }, + { "palmas", (kernel_ulong_t)&palmas_data }, + { "twl6035", (kernel_ulong_t)&palmas_data }, + { "twl6037", (kernel_ulong_t)&palmas_data }, + { "tps65913", (kernel_ulong_t)&palmas_data }, { /* end */ } }; MODULE_DEVICE_TABLE(i2c, palmas_i2c_id); -- 2.25.1