LKML Archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: linux-kernel@vger.kernel.org,
	Jarkko Nikula <jarkko.nikula@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>,
	"open list:SYNOPSYS DESIGNWARE I2C DRIVER"
	<linux-i2c@vger.kernel.org>,
	"open list:WANGXUN ETHERNET DRIVER" <netdev@vger.kernel.org>
Subject: Re: [PATCH v2 1/4] i2c: designware: Create shared header hosting driver name
Date: Thu, 25 Apr 2024 12:39:20 +0300	[thread overview]
Message-ID: <ZiokyEXqMTAs_M7M@smile.fi.intel.com> (raw)
In-Reply-To: <20240425002642.2053657-2-florian.fainelli@broadcom.com>

On Wed, Apr 24, 2024 at 05:26:39PM -0700, Florian Fainelli wrote:
> 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/

Make them tags.

Link: URL#1 [1]
Link: URL#2 [2]

> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>

> +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
> @@ -19,6 +19,7 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/pci.h>

> +#include <linux/platform_data/i2c-designware.h>

Please, make it a separate group after linux/* and before "xxx" below.

>  #include <linux/pm_runtime.h>
>  #include <linux/power_supply.h>
>  #include <linux/sched.h>

...

>  module_pci_driver(dw_i2c_driver);
>  
>  /* Work with hotplug and coldplug */
> -MODULE_ALIAS("i2c_designware-pci");
> +MODULE_ALIAS(I2C_DESIGNWARE_NAME "-pci");

As Jarkko said, please get rid of this.
You may take my patch from here:
https://lore.kernel.org/linux-i2c/20231207141653.2785124-9-andriy.shevchenko@linux.intel.com/
and incorporate in this series.

...

>  #include <linux/mfd/syscon.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> +#include <linux/platform_data/i2c-designware.h>

As per above.

>  #include <linux/platform_device.h>
>  #include <linux/pm.h>
>  #include <linux/pm_runtime.h>

...

>  /* Work with hotplug and coldplug */
> -MODULE_ALIAS("platform:i2c_designware");
> +MODULE_ALIAS("platform:" I2C_DESIGNWARE_NAME);

See above.

...

> +/* 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
> + */

/*
 * Use correct multi-line comment style. This
 * is not the net subsystem, we use traditional style.
 */

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-04-25  9:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-25  0:26 [PATCH v2 0/4] Define i2c_designware in a header file Florian Fainelli
2024-04-25  0:26 ` [PATCH v2 1/4] i2c: designware: Create shared header hosting driver name Florian Fainelli
2024-04-25  9:39   ` Andy Shevchenko [this message]
2024-04-25  0:26 ` [PATCH v2 2/4] mfd: intel-lpss: Utilize i2c-designware.h Florian Fainelli
2024-04-25  9:34   ` Andy Shevchenko
2024-05-02 10:00   ` Lee Jones
2024-04-25  0:26 ` [PATCH v2 3/4] mfd: intel_quark_i2c_gpio: " Florian Fainelli
2024-04-25  9:42   ` Andy Shevchenko
2024-04-25  0:26 ` [PATCH v2 4/4] net: txgbe: " Florian Fainelli
2024-04-25  9:44   ` Andy Shevchenko
2024-04-25 13:11 ` [PATCH v2 0/4] Define i2c_designware in a header file Jarkko Nikula

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=ZiokyEXqMTAs_M7M@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=andi.shyti@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=duanqiangwen@net-swift.com \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.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).