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 |
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).
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
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/
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.
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 --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,
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(-)