diff mbox series

[v3,4/5] mfd: intel_quark_i2c_gpio: Utilize i2c-designware.h

Message ID 20240425214438.2100534-5-florian.fainelli@broadcom.com (mailing list archive)
State Not Applicable
Headers show
Series Define i2c_designware in a header file | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 926 this patch: 926
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 1 of 1 maintainers
netdev/build_clang success Errors and warnings before: 937 this patch: 937
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 937 this patch: 937
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 24 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Florian Fainelli April 25, 2024, 9:44 p.m. UTC
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/mfd/intel_quark_i2c_gpio.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Andy Shevchenko April 26, 2024, 2:30 p.m. UTC | #1
On Thu, Apr 25, 2024 at 02:44:37PM -0700, Florian Fainelli wrote:
> Rather than open code the i2c_designware string, utilize the newly
> defined constant in i2c-designware.h.

Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

P.S>
Note, my tags for MFD patches does not imply that I agree on the general idea
of this series, it's just in case if it will be approved by the respective
maintainers (I²C / MFD / etc).
Andi Shyti April 30, 2024, 9:36 a.m. UTC | #2
Hi Andy,

On Fri, Apr 26, 2024 at 05:30:24PM +0300, Andy Shevchenko wrote:
> On Thu, Apr 25, 2024 at 02:44:37PM -0700, Florian Fainelli wrote:
> > Rather than open code the i2c_designware string, utilize the newly
> > defined constant in i2c-designware.h.
> 
> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> P.S>
> Note, my tags for MFD patches does not imply that I agree on the general idea
> of this series, it's just in case if it will be approved by the respective
> maintainers (I²C / MFD / etc).

I waited a bit to see if more comments were coming.

Do you have a better approach in mind?

Andi
Jarkko Nikula May 2, 2024, 9:19 a.m. UTC | #3
On 4/30/24 12:36 PM, Andi Shyti wrote:
> Hi Andy,
> 
> On Fri, Apr 26, 2024 at 05:30:24PM +0300, Andy Shevchenko wrote:
>> On Thu, Apr 25, 2024 at 02:44:37PM -0700, Florian Fainelli wrote:
>>> Rather than open code the i2c_designware string, utilize the newly
>>> defined constant in i2c-designware.h.
>>
>> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>
>> P.S>
>> Note, my tags for MFD patches does not imply that I agree on the general idea
>> of this series, it's just in case if it will be approved by the respective
>> maintainers (I²C / MFD / etc).
> 
> I waited a bit to see if more comments were coming.
> 
Well I had doubts about the idea will it help maintaining code or do the 
opposite but didn't receive a reply from the patch author:

https://lore.kernel.org/linux-i2c/62e58960-f568-459d-8690-0c9c608a4d9f@linux.intel.com/

Also Lee Jones have similar concerns:

https://lore.kernel.org/linux-i2c/20240502071751.GA5338@google.com/
Lee Jones May 2, 2024, 10:11 a.m. UTC | #4
On Thu, 02 May 2024, Jarkko Nikula wrote:

> On 4/30/24 12:36 PM, Andi Shyti wrote:
> > Hi Andy,
> > 
> > On Fri, Apr 26, 2024 at 05:30:24PM +0300, Andy Shevchenko wrote:
> > > On Thu, Apr 25, 2024 at 02:44:37PM -0700, Florian Fainelli wrote:
> > > > Rather than open code the i2c_designware string, utilize the newly
> > > > defined constant in i2c-designware.h.
> > > 
> > > Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > 
> > > P.S>
> > > Note, my tags for MFD patches does not imply that I agree on the general idea
> > > of this series, it's just in case if it will be approved by the respective
> > > maintainers (I²C / MFD / etc).
> > 
> > I waited a bit to see if more comments were coming.
> > 
> Well I had doubts about the idea will it help maintaining code or do the
> opposite but didn't receive a reply from the patch author:
> 
> https://lore.kernel.org/linux-i2c/62e58960-f568-459d-8690-0c9c608a4d9f@linux.intel.com/
> 
> Also Lee Jones have similar concerns:
> 
> https://lore.kernel.org/linux-i2c/20240502071751.GA5338@google.com/

Right.  It's a NACK from me, sorry.
Florian Fainelli May 2, 2024, 4:08 p.m. UTC | #5
On 5/2/24 02:19, Jarkko Nikula wrote:
> On 4/30/24 12:36 PM, Andi Shyti wrote:
>> Hi Andy,
>>
>> On Fri, Apr 26, 2024 at 05:30:24PM +0300, Andy Shevchenko wrote:
>>> On Thu, Apr 25, 2024 at 02:44:37PM -0700, Florian Fainelli wrote:
>>>> Rather than open code the i2c_designware string, utilize the newly
>>>> defined constant in i2c-designware.h.
>>>
>>> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>>
>>> P.S>
>>> Note, my tags for MFD patches does not imply that I agree on the 
>>> general idea
>>> of this series, it's just in case if it will be approved by the 
>>> respective
>>> maintainers (I²C / MFD / etc).
>>
>> I waited a bit to see if more comments were coming.
>>
> Well I had doubts about the idea will it help maintaining code or do the 
> opposite but didn't receive a reply from the patch author:
> 
> https://lore.kernel.org/linux-i2c/62e58960-f568-459d-8690-0c9c608a4d9f@linux.intel.com/

I read your message and the fact that you provided a diff as a 
suggestion as to what would become acceptable if incorporating your 
suggested change, and made that a v3. If this was not acceptable to you 
from the get go, it would have been clearer with an explicit Nack like 
what others have done now.

> 
> Also Lee Jones have similar concerns:
> 
> https://lore.kernel.org/linux-i2c/20240502071751.GA5338@google.com/
> 

Yes, so clearly I failed to convince all of you that if someone was able 
to trip over that problem, something should be done about it. No 
problem, these are not driver I maintain, so if someone hits the same 
issue, lore has the patches now.
diff mbox series

Patch

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 <linux/i2c.h>
 #include <linux/property.h>
 
+#include <linux/platform_data/i2c-designware.h>
+
 /* 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,