From patchwork Thu Apr 25 21:44:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13643802 Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.205]) (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 4BBA7153834; Thu, 25 Apr 2024 21:44:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.205 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714081486; cv=none; b=ARPWe3qa7XAG8RhQn2jTSctPcnCctQHyt142PbKilFaYzcHq8I91vvN+ZrkPFFv4GtNp7B46Kv3/xXhVgW6rFrNRZDrreehHn9+OnxhxnTGIiF4LhR+uQMF10PkeV/rcprWZUWlWetMmNA64xQngd9rGjlI5fO5OaWhJIYEGZ3A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714081486; c=relaxed/simple; bh=XWtzJrSwSicDwJ6itlPAo63YEYNCPCp+5FvVdfwfwc8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qR9qnzH1eMXy13BROlpZy3+dB0oChr01WnM67A47iaUURucJwnOdf5HyFq8XNzKWaw8oZIpiEEXWFstXnYBinAbr/+57/3KnR8VxLb6RScrNy9poXYM4XTQZGThylBJ+8spXfTzCjtAjDNxM5oeOHfYyJdakUrtGkq9HQ8NOBhc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=u0NAEyL8; arc=none smtp.client-ip=192.19.144.205 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="u0NAEyL8" Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 1984FC002825; Thu, 25 Apr 2024 14:44:42 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 1984FC002825 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1714081482; bh=XWtzJrSwSicDwJ6itlPAo63YEYNCPCp+5FvVdfwfwc8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u0NAEyL8pRwRLU25wUUIBJiXuxfN6Z27cFNnJiypMuatqHijrxLYyy2Vr18QNCHnQ Mi/luXIxXVlsbx2M4QsAHvrMusqMboLsCztYbPlODNZDn930lB/SnlO+Zr90LVg7Ih mq+BUrR8b73DZ28tFHKJQ32GcACt4S/9AbnoU9g4= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id 183C718041CAC6; Thu, 25 Apr 2024 14:44:40 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Andi Shyti , Mario Limonciello , Jarkko Nikula , Serge Semin , Mika Westerberg , Jan Dabros , Lee Jones , Jiawen Wu , Mengyuan Lou , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maciej Fijalkowski , Andrew Lunn , Duanqiang Wen , linux-i2c@vger.kernel.org (open list:SYNOPSYS DESIGNWARE I2C DRIVER), netdev@vger.kernel.org (open list:WANGXUN ETHERNET DRIVER) Subject: [PATCH v3 1/5] i2c: designware: Replace MODULE_ALIAS() with MODULE_DEVICE_TABLE() Date: Thu, 25 Apr 2024 14:44:34 -0700 Message-Id: <20240425214438.2100534-2-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240425214438.2100534-1-florian.fainelli@broadcom.com> References: <20240425214438.2100534-1-florian.fainelli@broadcom.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko As Krzysztof Kozlowski pointed out the better is to use MODULE_DEVICE_TABLE() as it will be consistent with the content of the real ID table of the platform devices. While at it, drop unneeded and unused module alias in PCI glue driver as PCI already has its own ID table and automatic loading should just work. Reviewed-by: Andi Shyti Reviewed-by: Mario Limonciello Acked-by: Jarkko Nikula Tested-by: Jarkko Nikula Tested-by: Serge Semin Link: https://lore.kernel.org/r/20231120144641.1660574-9-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-pcidrv.c | 2 -- drivers/i2c/busses/i2c-designware-platdrv.c | 8 ++++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index 9be9a2658e1f..a1b379a1e904 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -424,8 +424,6 @@ static struct pci_driver dw_i2c_driver = { }; module_pci_driver(dw_i2c_driver); -/* Work with hotplug and coldplug */ -MODULE_ALIAS("i2c_designware-pci"); MODULE_AUTHOR("Baruch Siach "); MODULE_DESCRIPTION("Synopsys DesignWare PCI I2C bus adapter"); MODULE_LICENSE("GPL"); diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 4ab41ba39d55..0be7b0dc849b 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -479,8 +479,11 @@ static const struct dev_pm_ops dw_i2c_dev_pm_ops = { RUNTIME_PM_OPS(dw_i2c_plat_runtime_suspend, dw_i2c_plat_runtime_resume, NULL) }; -/* Work with hotplug and coldplug */ -MODULE_ALIAS("platform:i2c_designware"); +static const struct platform_device_id dw_i2c_platform_ids[] = { + { "i2c_designware" }, + {} +}; +MODULE_DEVICE_TABLE(platform, dw_i2c_platform_ids); static struct platform_driver dw_i2c_driver = { .probe = dw_i2c_plat_probe, @@ -491,6 +494,7 @@ static struct platform_driver dw_i2c_driver = { .acpi_match_table = ACPI_PTR(dw_i2c_acpi_match), .pm = pm_ptr(&dw_i2c_dev_pm_ops), }, + .id_table = dw_i2c_platform_ids, }; static int __init dw_i2c_init_driver(void) From patchwork Thu Apr 25 21:44:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13643799 Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.209]) (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 AA6C0155726; Thu, 25 Apr 2024 21:44:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.209 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714081485; cv=none; b=XVc6xpEGnT54jcA/Tr560hgr9JKP5Jnq4o9j2zIfMnRdATv5BDlbFo9dowHba571JG2ZMlCgTuFvaXdc1g+JzNLJiFAuAO0xCbT1PEHoehoDtZJlxVlGnR31RCrjnjAbW9wOK0R0UdZdLIaSaSoZvg3fts1axhfBfRm+yGm27F4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714081485; c=relaxed/simple; bh=9mL/dj9SJENEHlN7H9ZQRKRS3vgcoRMl1JiH1RhpS0Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=os+LFTB6Mp1VGVdhZYPuCTOuayYtj5bW61QMY3vEsfG41I+Qm7/kV8i03bD/U5yFt/nrT1B9B573WgafK0CwW1kygH//g0H3iBtQtbiKDndXtg1kgTPNb/iPBmw+BPCNi8fouHZBxU6Z20Q9vK6X+4I5tq7eBBBS+/UfwdWNF4g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=FRqmzLRc; arc=none smtp.client-ip=192.19.144.209 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="FRqmzLRc" Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 4813EC0005E5; Thu, 25 Apr 2024 14:44:42 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 4813EC0005E5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1714081482; bh=9mL/dj9SJENEHlN7H9ZQRKRS3vgcoRMl1JiH1RhpS0Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FRqmzLRcyzSfOxRf6V2y9d/ku6PZ4Jefrqx3EXIpa4pEOcEAv4W/Z4S0Uwc7NtWrA Eit+GRi70AfnpxrZ6VMegSPdarPW8qLfhiw1hkcA/9PQosihFZQIKTTg4ZyFR6RZ4D ohgaNNckJlQ1ZNoG4oOljRNdVUJ8ih1i0f2/d+cw= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id 53DC418041CAC7; Thu, 25 Apr 2024 14:44:40 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Jan Dabros , Andi Shyti , Lee Jones , Jiawen Wu , Mengyuan Lou , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maciej Fijalkowski , Andrew Lunn , Duanqiang Wen , linux-i2c@vger.kernel.org (open list:SYNOPSYS DESIGNWARE I2C DRIVER), netdev@vger.kernel.org (open list:WANGXUN ETHERNET DRIVER) Subject: [PATCH v3 2/5] i2c: designware: Create shared header hosting driver name Date: Thu, 25 Apr 2024 14:44:35 -0700 Message-Id: <20240425214438.2100534-3-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240425214438.2100534-1-florian.fainelli@broadcom.com> References: <20240425214438.2100534-1-florian.fainelli@broadcom.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 We have a number of drivers that reference the string "i2c_designware" towards two goals: - ensure their device gets bound to the i2c_designware platform_driver - create a clock lookup reference that matches the i2c_designware instance number for the i2c-designware-platdrv.c driver to be able to lookup the input reference clock Since this string is copied in a bunch of different places and since it is possible to get this named wrong (see [1] and [2]) with unintended consequences, create a header file that hosts that define for other drivers to use and all agree on the correct name to use. Link: https://lore.kernel.org/all/20240422084109.3201-1-duanqiangwen@net-swift.com/ [1] Link: https://lore.kernel.org/all/20240422084109.3201-2-duanqiangwen@net-swift.com/ [2] Signed-off-by: Florian Fainelli --- MAINTAINERS | 1 + drivers/i2c/busses/i2c-designware-platdrv.c | 4 +++- include/linux/platform_data/i2c-designware.h | 12 ++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 include/linux/platform_data/i2c-designware.h diff --git a/MAINTAINERS b/MAINTAINERS index 2d5acd6d98c4..da1b39df2b94 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -21438,6 +21438,7 @@ R: Jan Dabros L: linux-i2c@vger.kernel.org S: Supported F: drivers/i2c/busses/i2c-designware-* +F: include/linux/platform_data/i2c-designware.h SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER M: Jaehoon Chung diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 0be7b0dc849b..107945d0337e 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -33,6 +33,8 @@ #include #include +#include + #include "i2c-designware-core.h" static u32 i2c_dw_get_clk_rate_khz(struct dw_i2c_dev *dev) @@ -489,7 +491,7 @@ static struct platform_driver dw_i2c_driver = { .probe = dw_i2c_plat_probe, .remove_new = dw_i2c_plat_remove, .driver = { - .name = "i2c_designware", + .name = I2C_DESIGNWARE_NAME, .of_match_table = of_match_ptr(dw_i2c_of_match), .acpi_match_table = ACPI_PTR(dw_i2c_acpi_match), .pm = pm_ptr(&dw_i2c_dev_pm_ops), diff --git a/include/linux/platform_data/i2c-designware.h b/include/linux/platform_data/i2c-designware.h new file mode 100644 index 000000000000..1196103df4f5 --- /dev/null +++ b/include/linux/platform_data/i2c-designware.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef __I2C_DESIGNWARE_PDATA_H__ +#define __I2C_DESIGNWARE_PDATA_H__ + +/* + * This is the i2c-designware-platdrv.c platform driver name. This name is used + * to bind the device to the driver as well as by the driver itself to request + * the input reference clock. + */ +#define I2C_DESIGNWARE_NAME "i2c_designware" + +#endif /* __I2C_DESIGNWARE_PDATA_H__ */ From patchwork Thu Apr 25 21:44:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13643800 Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.207]) (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 F0C1D15572F; Thu, 25 Apr 2024 21:44:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.207 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714081485; cv=none; b=GkKu4Zs50t3S+dI7zrv0onn4LkXmn+OQTqEe1C/725YTPKfFgkdbjjmD+IUU+xpG+sbUyZRWa5gcb2ppiBdyHe8WaxMXPpsDJcBX4uGa+IX34ISM3mItfu6uuuHmd+cZe2gHJEw+NSkc/OB3bjUESUnk0GlpaWO+XCmgdvKDVB8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714081485; c=relaxed/simple; bh=bgYCW8aseELL+zqdy/zQWvlFQOP8m9UJ/7Tg6+4zcqE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DqRNim8pguTsgqU9JYiiXYKcnvTMkP+GJ7kJH+PKAn1N44Y/XWyRdRqY2AT1k5esuNYbgz6TM2Qe/TvbJCFC9uYoEAICYqMJL5KUSK59X2jtpswf9WB/bd2wpw7rPTAhIJi1R2V4qq5BasS8w884JKWICP9Dq2QKfrM5FKYzi8E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=hxQAc0yZ; arc=none smtp.client-ip=192.19.144.207 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="hxQAc0yZ" Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 8FA67C0000EC; Thu, 25 Apr 2024 14:44:42 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 8FA67C0000EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1714081482; bh=bgYCW8aseELL+zqdy/zQWvlFQOP8m9UJ/7Tg6+4zcqE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hxQAc0yZeCMheMQRZnITAggRvpAonTQWOkFLuNyfM4XJv2lq+R4xETd8r94P1oTrB WBKditV9aw9/iiZG6pb3CFDiSpDc9o+q8MoI8HWg+mawAIUN2i0QU7BsSNaHGCyNAW KXTJOpq8Xj0bVt4sbnzlkErZTCl/Ef+VIB1snX2c= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id 906BA18041CAC4; Thu, 25 Apr 2024 14:44:40 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Andy Shevchenko , Jarkko Nikula , Mika Westerberg , Jan Dabros , Andi Shyti , Lee Jones , Jiawen Wu , Mengyuan Lou , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maciej Fijalkowski , Andrew Lunn , Duanqiang Wen , linux-i2c@vger.kernel.org (open list:SYNOPSYS DESIGNWARE I2C DRIVER), netdev@vger.kernel.org (open list:WANGXUN ETHERNET DRIVER) Subject: [PATCH v3 3/5] mfd: intel-lpss: Utilize i2c-designware.h Date: Thu, 25 Apr 2024 14:44:36 -0700 Message-Id: <20240425214438.2100534-4-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240425214438.2100534-1-florian.fainelli@broadcom.com> References: <20240425214438.2100534-1-florian.fainelli@broadcom.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Rather than open code the i2c_designware string, utilize the newly defined constant in i2c-designware.h. Acked-by: Andy Shevchenko Signed-off-by: Florian Fainelli --- drivers/mfd/intel-lpss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c index 2a9018112dfc..1327a6a07d1f 100644 --- a/drivers/mfd/intel-lpss.c +++ b/drivers/mfd/intel-lpss.c @@ -33,6 +33,7 @@ #include #include +#include #include "intel-lpss.h" @@ -116,7 +117,7 @@ static const struct mfd_cell intel_lpss_idma64_cell = { }; static const struct mfd_cell intel_lpss_i2c_cell = { - .name = "i2c_designware", + .name = I2C_DESIGNWARE_NAME, .num_resources = ARRAY_SIZE(intel_lpss_dev_resources), .resources = intel_lpss_dev_resources, }; From patchwork Thu Apr 25 21:44:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13643801 Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.208]) (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 5EA6515573A; Thu, 25 Apr 2024 21:44:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.208 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714081485; cv=none; b=D8VdTvyG3tqlGVz34h50SVjJ6JdGBwdeR8gOUF/milbjNCfN/ugpZpJZxAfE+HGYOe+RK2J+aDqFuJXe9Sf6sD42PETls4QOY/gIuJIb2VkR/Y4mKnBhixm0hUPutj2ePYZ0cXq7y826sj6jilguzFRKQWCo9HL4WHCM16RK+GE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714081485; c=relaxed/simple; bh=thjt11Q2mq8PIMSTXSWsp2Op1jKN73Dixr5yJcrrc/w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SRQeThMMIRv/VJJXKe9QGQRX6AhfX4+hbZ6Co7wqrC2STmLG/Ks5PH8FgyW36TANiMDmadc3jC0efo8yCNWcgGr92Rr1fTi2Bomd++pxjbzbQKk4pHXVu5fNiOZjrUGKpE9e5SXazYvLTT8xHvzcMNFSSjlpsh99uanMMU+P5g8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=PzZbIkb3; arc=none smtp.client-ip=192.19.144.208 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="PzZbIkb3" Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 1C34BC0003CF; Thu, 25 Apr 2024 14:44:43 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 1C34BC0003CF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1714081483; bh=thjt11Q2mq8PIMSTXSWsp2Op1jKN73Dixr5yJcrrc/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PzZbIkb3/uddE859zhNN5Fx4hZRfqFXfc+fRmkwuom7Ypa4RCDw7bZfBvfFH1t04s t9TLFuVLnMzE0iHsAe+tqQg5UavqwXab1GRdJksZRvtNXRLTUxvxUvrLtg+IirUkOD fjOoBWXYuCUbY14TsTvQtpbgDqyNpkLo2RDqzSEQ= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id C9F5318041CAC6; Thu, 25 Apr 2024 14:44:40 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Jan Dabros , Andi Shyti , Lee Jones , Jiawen Wu , Mengyuan Lou , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maciej Fijalkowski , Andrew Lunn , Duanqiang Wen , linux-i2c@vger.kernel.org (open list:SYNOPSYS DESIGNWARE I2C DRIVER), netdev@vger.kernel.org (open list:WANGXUN ETHERNET DRIVER) Subject: [PATCH v3 4/5] mfd: intel_quark_i2c_gpio: Utilize i2c-designware.h Date: Thu, 25 Apr 2024 14:44:37 -0700 Message-Id: <20240425214438.2100534-5-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240425214438.2100534-1-florian.fainelli@broadcom.com> References: <20240425214438.2100534-1-florian.fainelli@broadcom.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Rather than open code the i2c_designware string, utilize the newly defined constant in i2c-designware.h. Signed-off-by: Florian Fainelli Acked-by: Andy Shevchenko --- drivers/mfd/intel_quark_i2c_gpio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/intel_quark_i2c_gpio.c b/drivers/mfd/intel_quark_i2c_gpio.c index 9b9c76bd067b..86620de5c9ba 100644 --- a/drivers/mfd/intel_quark_i2c_gpio.c +++ b/drivers/mfd/intel_quark_i2c_gpio.c @@ -19,6 +19,8 @@ #include #include +#include + /* PCI BAR for register base address */ #define MFD_I2C_BAR 0 #define MFD_GPIO_BAR 1 @@ -30,7 +32,7 @@ #define INTEL_QUARK_IORES_MEM 0 #define INTEL_QUARK_IORES_IRQ 1 -#define INTEL_QUARK_I2C_CONTROLLER_CLK "i2c_designware.0" +#define INTEL_QUARK_I2C_CONTROLLER_CLK I2C_DESIGNWARE_NAME ".0" /* The Quark I2C controller source clock */ #define INTEL_QUARK_I2C_CLK_HZ 33000000 @@ -136,7 +138,7 @@ static const struct software_node *intel_quark_gpio_node_group[] = { static struct mfd_cell intel_quark_mfd_cells[] = { [MFD_I2C_BAR] = { .id = MFD_I2C_BAR, - .name = "i2c_designware", + .name = I2C_DESIGNWARE_NAME, .acpi_match = &intel_quark_acpi_match_i2c, .num_resources = ARRAY_SIZE(intel_quark_i2c_res), .resources = intel_quark_i2c_res, From patchwork Thu Apr 25 21:44:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13643803 X-Patchwork-Delegate: kuba@kernel.org Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.208]) (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 5D1A8155739; Thu, 25 Apr 2024 21:44:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.208 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714081489; cv=none; b=YSgb3V6IvQ3g9DE1MyzdlwwrLxAiPrlyLgrT3h4nmkuMa2QEzhJSnJ/RMOuswxWA+hPRHooEdZXC2lVTWt/kyg7HjqzW8Ez1fN96O/6dMs+zhAHwn6qhfK8Y4Vpsb2RhHC5Q+oIo+HjRV73xffe7lrThiBN74L0vm1abOd/DF50= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714081489; c=relaxed/simple; bh=bh0Gh/pQHLvaTDCe1mGlX2hRI+Z5t3HiiUgGmfeGYOE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lG0WoH4oN7EyZZBQW2uuUGvnF1zAoRVdbywG9jL4y6tp+5Gn5OiAP0Ix40+89Q+KEY0YlQIobZy5i73qb3MKzse/fn1PDDJRBTc8Ixz52E/YSKSGXgJny5MoHzAlPmbQ0/On5CBaINagTVwXSt7S34eS0cy/u9PqZPTw1heUldo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=emc2KvjJ; arc=none smtp.client-ip=192.19.144.208 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="emc2KvjJ" Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 19B93C0003C8; Thu, 25 Apr 2024 14:44:43 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 19B93C0003C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1714081483; bh=bh0Gh/pQHLvaTDCe1mGlX2hRI+Z5t3HiiUgGmfeGYOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=emc2KvjJesvvkf/wXqc/g2BFz47SK2fhKNpVUgwj2oaa9UhaAoIbNc5TMFLtKzafW DIQg2Mvzb5uUpmHLP3dd7amPFTy8JunbkOjbJAig24iS7/tPI8u+Rb5qfbduBq0cZ6 43tVzwTTfmD8FtrbYczapRn1A/pKLeCDpdZgV2sg= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id 1226418041CAC7; Thu, 25 Apr 2024 14:44:41 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Jan Dabros , Andi Shyti , Lee Jones , Jiawen Wu , Mengyuan Lou , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maciej Fijalkowski , Andrew Lunn , Duanqiang Wen , linux-i2c@vger.kernel.org (open list:SYNOPSYS DESIGNWARE I2C DRIVER), netdev@vger.kernel.org (open list:WANGXUN ETHERNET DRIVER) Subject: [PATCH v3 5/5] net: txgbe: Utilize i2c-designware.h Date: Thu, 25 Apr 2024 14:44:38 -0700 Message-Id: <20240425214438.2100534-6-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240425214438.2100534-1-florian.fainelli@broadcom.com> References: <20240425214438.2100534-1-florian.fainelli@broadcom.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Rather than open code the i2c_designware string, utilize the newly defined constant in i2c-designware.h. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c index 93295916b1d2..01a442c38248 100644 --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c @@ -13,6 +13,8 @@ #include #include +#include + #include "../libwx/wx_type.h" #include "../libwx/wx_lib.h" #include "../libwx/wx_hw.h" @@ -571,7 +573,7 @@ static int txgbe_clock_register(struct txgbe *txgbe) char clk_name[32]; struct clk *clk; - snprintf(clk_name, sizeof(clk_name), "i2c_designware.%d", + snprintf(clk_name, sizeof(clk_name), I2C_DESIGNWARE_NAME ".%d", pci_dev_id(pdev)); clk = clk_register_fixed_rate(NULL, clk_name, NULL, 0, 156250000); @@ -634,7 +636,7 @@ static int txgbe_i2c_register(struct txgbe *txgbe) info.parent = &pdev->dev; info.fwnode = software_node_fwnode(txgbe->nodes.group[SWNODE_I2C]); - info.name = "i2c_designware"; + info.name = I2C_DESIGNWARE_NAME; info.id = pci_dev_id(pdev); info.res = &DEFINE_RES_IRQ(pdev->irq);