From patchwork Thu Apr 25 00:26:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13642758 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 D58D981F; Thu, 25 Apr 2024 00:26:51 +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=1714004813; cv=none; b=nikhsowRW6jWKUOgBfqxngqW9FwdVb8RVhSeck1zi6YQuG/UBW9OgpwO36dQBxLf7XSso3rKv3qhS6K4Vj+qeseol/s1M0PTNfW5cyC7IPcDqsB3rfXwZiFWt8bpfKwoL3vbyhXbFvW60VAjSDcrPMoRxS/5Cx3nRiFXm8dvTCM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714004813; c=relaxed/simple; bh=F1S87CksO9YcMorfhmRvrNBLU5zsOwiltZkftyOz8f0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kDe+pZKZTtFiDc+XG7DSPgPzNTrMWzoZl8aw+hR5YLHgso2gPGRg2RJE41SL6MLl7qY6yK3YnI9w37ZYItvdujzWfWtikqCoFJQDi4B12CuKpz4X6oVgpGJCIjpfiI8aaDxjFhvj5aRY+EshdJaKgdaiqrEGZcEpk44VuL2FHeE= 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=FiZ124UI; 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="FiZ124UI" 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 AF56FC000C85; Wed, 24 Apr 2024 17:26:44 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com AF56FC000C85 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1714004804; bh=F1S87CksO9YcMorfhmRvrNBLU5zsOwiltZkftyOz8f0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FiZ124UIT6v8GQZ6pbi0LVPT++DjpeKtPSETWqf7Af18UC9POLdwVidzRDKSx6kXP l2JcRbfyVR8vN4fTdkmZiP6qwWFfHZT8f6r5nCFAjK5V5e7bKMyInGd4M5FQOFeh0o VkKOX+g2mgOfPJI++33OwzQIWqYeCXCIGfZzEaV0= 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 B80CB18041CAC6; Wed, 24 Apr 2024 17:26:42 -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 v2 1/4] i2c: designware: Create shared header hosting driver name Date: Wed, 24 Apr 2024 17:26:39 -0700 Message-Id: <20240425002642.2053657-2-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240425002642.2053657-1-florian.fainelli@broadcom.com> References: <20240425002642.2053657-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. [1]: https://lore.kernel.org/all/20240422084109.3201-1-duanqiangwen@net-swift.com/ [2]: https://lore.kernel.org/all/20240422084109.3201-2-duanqiangwen@net-swift.com/ Signed-off-by: Florian Fainelli --- MAINTAINERS | 1 + drivers/i2c/busses/i2c-designware-pcidrv.c | 3 ++- drivers/i2c/busses/i2c-designware-platdrv.c | 5 +++-- include/linux/platform_data/i2c-designware.h | 11 +++++++++++ 4 files changed, 17 insertions(+), 3 deletions(-) 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-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index 9be9a2658e1f..32d6f338a1ea 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -425,7 +426,7 @@ static struct pci_driver dw_i2c_driver = { module_pci_driver(dw_i2c_driver); /* Work with hotplug and coldplug */ -MODULE_ALIAS("i2c_designware-pci"); +MODULE_ALIAS(I2C_DESIGNWARE_NAME "-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..8aa2bf274d78 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -480,13 +481,13 @@ static const struct dev_pm_ops dw_i2c_dev_pm_ops = { }; /* Work with hotplug and coldplug */ -MODULE_ALIAS("platform:i2c_designware"); +MODULE_ALIAS("platform:" I2C_DESIGNWARE_NAME); 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..e385b6d70a04 --- /dev/null +++ b/include/linux/platform_data/i2c-designware.h @@ -0,0 +1,11 @@ +/* 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 00:26:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13642757 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 E562DA34; Thu, 25 Apr 2024 00:26:51 +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=1714004813; cv=none; b=U8aBTUshMqGkMQ++k0IKCsVNz9AAv//qgcPb7RVga/s8lmb/MKebi3eStdOlpf96wesbeahEZRenx0EeIOhNmB4wYegmC8INmNOB3tYy7lMmFMDePgomu1OBZNsshavwtjrFNqQ/TMGKS3MmWDnbKYPBRy4D6pC7KpFMRZc0An0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714004813; c=relaxed/simple; bh=Gjv+z3avNl60Oy8+L5J449oxNFE+QwgWYIbUkzovjOo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rfxeMWJq/qVxaIU/gkwJ9745y3p2qKqizIQ7Ym0FODRRbx25ThH4Av98+qbWl+pUrC/vI4ZF+8yJ/qMiaXPkVXdnZId5P63J0QMRMMoGW9FWEF29s0zkimIqtq8swpbX1bhrOPuehXXVzWzmpPtruqi+5hpgxMnh7HSvRTYzVeE= 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=oNHPcBwV; 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="oNHPcBwV" 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 ED0D1C000C8F; Wed, 24 Apr 2024 17:26:44 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com ED0D1C000C8F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1714004805; bh=Gjv+z3avNl60Oy8+L5J449oxNFE+QwgWYIbUkzovjOo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oNHPcBwV+kFa+lTiPRT6JW1wGLCQiJWrNmwfLElceB8RILTlibeQHit6Vlmj0IUkl swnXFVPWYv7RMYaVkTn8JRoA7iIfsDwcCEcpEyTDRokQX6g33M/RfL4vkX0YF51+og J+Kna409akRvAwG1FNiPTHLLnJRUBG8nchqmUzq4= 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 F365918041CAC7; Wed, 24 Apr 2024 17:26:42 -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 v2 2/4] mfd: intel-lpss: Utilize i2c-designware.h Date: Wed, 24 Apr 2024 17:26:40 -0700 Message-Id: <20240425002642.2053657-3-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240425002642.2053657-1-florian.fainelli@broadcom.com> References: <20240425002642.2053657-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-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..551560beff7b 100644 --- a/drivers/mfd/intel-lpss.c +++ b/drivers/mfd/intel-lpss.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -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 00:26:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13642756 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 D58A4816; Thu, 25 Apr 2024 00:26:51 +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=1714004813; cv=none; b=soim5JsMVr4oiDbNgepGn4LI0/G7s0CBf6IFtLPNXvSpj7OoZBbC1L1E9s9dFaEVwQO1Wt5IrFu7PPX3WupjnoMqtlBeL74eZYLN2roZdnlyQrBkaPlub+yu2N5TbJD/yqmp3ly8rB4WIOOif2QmlwlcPxX84nh1QN0JZYuQiMA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714004813; c=relaxed/simple; bh=KUOLZ8zPxT+a28U7lKki1joh8uQ88dQcZ5pMqNkBKAY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=flHRGKZss9iY5wKHyyF4pUjJjYt7+oc3TZHrAO8u1n3UQZ33GSi4ji9TFHBUWXZg18WDM2k3XEEXvAL44snVEbL9D+/zQl+itw+rI2Ij8wBFGX2RydzrakXiAi+fuMPOvFxEV9Uaj/11AEMHyNN6p+JtzLKCs5H1JdB4BIfBsxI= 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=Dr044oAK; 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="Dr044oAK" 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 28A4EC000C95; Wed, 24 Apr 2024 17:26:45 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 28A4EC000C95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1714004805; bh=KUOLZ8zPxT+a28U7lKki1joh8uQ88dQcZ5pMqNkBKAY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dr044oAKpqzzjau3IcyhuFVqup8yhk3MUeKMCfqcgh929t4aDtsLbtSzJAh9eYEIJ XTBJM+ysMTR+tIpUnQI4wWPIWeSuvXFCo37vPyYMixVIvoOrZPyjXHWWjpg8Ax1q+O hmnxWYl3N2z4BGs8S1RGLglAzGYGvFn/zfTOFvqc= 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 3B21618041CAC4; Wed, 24 Apr 2024 17:26:43 -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 v2 3/4] mfd: intel_quark_i2c_gpio: Utilize i2c-designware.h Date: Wed, 24 Apr 2024 17:26:41 -0700 Message-Id: <20240425002642.2053657-4-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240425002642.2053657-1-florian.fainelli@broadcom.com> References: <20240425002642.2053657-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 --- drivers/mfd/intel_quark_i2c_gpio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/intel_quark_i2c_gpio.c b/drivers/mfd/intel_quark_i2c_gpio.c index 9b9c76bd067b..08e296fc56f3 100644 --- a/drivers/mfd/intel_quark_i2c_gpio.c +++ b/drivers/mfd/intel_quark_i2c_gpio.c @@ -17,6 +17,7 @@ #include #include #include +#include #include /* PCI BAR for register base address */ @@ -30,7 +31,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 +137,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 00:26:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13642759 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 06754A35; Thu, 25 Apr 2024 00:26:51 +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=1714004816; cv=none; b=GjlQrAq9CADgzUv2szj4mHWjmu/tT9gHxHcHzu7FVlFbUqjxdaCyaUb1l/PnJ2mRAE/Zg8ftYfZ/FPNJsev+aS4t59+3Bn3cUoCnU8rjIe17zyUoeFusfscU8Y8HxYTBKEXiWJ3B9qfdJMbCfc4y8rKvCTYzGBG87aeUJaXBLRg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714004816; c=relaxed/simple; bh=ZFagWEYvJBD4GgAH/EVhAXHdfVqrRJ5Qc84fXqDt6To=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=u9jfYCYHq6f+Dj+eHPihl+ppe3+Mrsk+bNjS382SFXnqdHo7IMbSYedf3e+hJi7emlJutxPP4bYC4kUmArQpGWfkfbmuhQXnPl6NGf+ylh7A2707M9MdxbDlCffX1YIIGE07w/+0hegVWXj7XiCzyINP8wrvxNC8zQsq44BoqcI= 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=Ooz+ZMrB; 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="Ooz+ZMrB" 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 68382C00150E; Wed, 24 Apr 2024 17:26:45 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 68382C00150E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1714004805; bh=ZFagWEYvJBD4GgAH/EVhAXHdfVqrRJ5Qc84fXqDt6To=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ooz+ZMrBGXlrrU/+yGUPCdaHyWxl5xE1O4jhIf2L7xDTF/nF41mHEjyOB/ENbXiV8 58RWm616PZfFgHsrvglg9qcoF6MdMPY2Gpa6c0xmT2uqHCHiBeShN/+cupzcQc7Ajs glAOkNNaDoPvttnzrlZHuODUHE0OLv+4JA5EGLyw= 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 76E9318041CAC6; Wed, 24 Apr 2024 17:26:43 -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 v2 4/4] net: txgbe: Utilize i2c-designware.h Date: Wed, 24 Apr 2024 17:26:42 -0700 Message-Id: <20240425002642.2053657-5-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240425002642.2053657-1-florian.fainelli@broadcom.com> References: <20240425002642.2053657-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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c index 93295916b1d2..7545aacc9c19 100644 --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -571,8 +572,8 @@ static int txgbe_clock_register(struct txgbe *txgbe) char clk_name[32]; struct clk *clk; - snprintf(clk_name, sizeof(clk_name), "i2c_designware.%d", - pci_dev_id(pdev)); + snprintf(clk_name, sizeof(clk_name), "%s.%d", + I2C_DESIGNWARE_NAME, pci_dev_id(pdev)); clk = clk_register_fixed_rate(NULL, clk_name, NULL, 0, 156250000); if (IS_ERR(clk)) @@ -634,7 +635,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);