Linux-i2c Archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <florian.fainelli@broadcom.com>
To: linux-kernel@vger.kernel.org
Cc: Florian Fainelli <florian.fainelli@broadcom.com>,
	Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Jan Dabros <jsd@semihalf.com>, Andi Shyti <andi.shyti@kernel.org>,
	Lee Jones <lee@kernel.org>, Jiawen Wu <jiawenwu@trustnetic.com>,
	Mengyuan Lou <mengyuanlou@net-swift.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Duanqiang Wen <duanqiangwen@net-swift.com>,
	linux-i2c@vger.kernel.org (open list:SYNOPSYS DESIGNWARE I2C
	DRIVER),
	netdev@vger.kernel.org (open list:WANGXUN ETHERNET DRIVER)
Subject: [PATCH 4/4] net: txgbe: Utilize i2c-designware.h
Date: Tue, 23 Apr 2024 16:36:22 -0700	[thread overview]
Message-ID: <20240423233622.1494708-5-florian.fainelli@broadcom.com> (raw)
In-Reply-To: <20240423233622.1494708-1-florian.fainelli@broadcom.com>

Rather than open code the i2c_designware string, utilize the newly
defined constant in i2c-designware.h.

Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 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..c601eea164f1 100644
--- a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
+++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
@@ -7,6 +7,7 @@
 #include <linux/clk-provider.h>
 #include <linux/clkdev.h>
 #include <linux/i2c.h>
+#include <linux/i2c-designware.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
@@ -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);
-- 
2.34.1


  parent reply	other threads:[~2024-04-23 23:36 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 23:36 [PATCH 0/4] Define i2c_designware in a header file Florian Fainelli
2024-04-23 23:36 ` [PATCH 1/4] i2c: designware: Create shared header hosting driver name Florian Fainelli
2024-04-23 23:59   ` Andy Shevchenko
2024-04-24  1:22     ` Florian Fainelli
2024-04-24 12:18       ` Andrew Lunn
2024-04-24 12:45         ` Andy Shevchenko
2024-04-25  8:33     ` Jarkko Nikula
2024-04-25  9:20       ` Andy Shevchenko
2024-04-23 23:36 ` [PATCH 2/4] mfd: intel-lpss: Utilize i2c-designware.h Florian Fainelli
2024-04-24  0:00   ` Andy Shevchenko
2024-04-24  3:20     ` Florian Fainelli
2024-05-02  7:17       ` Lee Jones
2024-05-02 16:19         ` Florian Fainelli
2024-05-02 16:42           ` Lee Jones
2024-04-23 23:36 ` [PATCH 3/4] mfd: intel_quark_i2c_gpio: " Florian Fainelli
2024-04-24  0:01   ` Andy Shevchenko
2024-04-24  1:28     ` Florian Fainelli
2024-04-24 12:37       ` Andy Shevchenko
2024-04-24 16:35         ` Florian Fainelli
2024-04-23 23:36 ` Florian Fainelli [this message]
2024-04-24 16:14   ` [PATCH 4/4] net: txgbe: " Simon Horman
2024-04-24 16:22     ` Florian Fainelli
2024-04-24 17:34       ` Simon Horman
2024-04-23 23:56 ` [PATCH 0/4] Define i2c_designware in a header file Andy Shevchenko
2024-04-24  1:21   ` Florian Fainelli
2024-04-24 14:26     ` Andy Shevchenko
2024-04-24 16:26       ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240423233622.1494708-5-florian.fainelli@broadcom.com \
    --to=florian.fainelli@broadcom.com \
    --cc=andi.shyti@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=duanqiangwen@net-swift.com \
    --cc=edumazet@google.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=jsd@semihalf.com \
    --cc=kuba@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=mengyuanlou@net-swift.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).