* From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
@ 2024-08-19 18:45 Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 1/7] i2c: designware: Replace a while-loop by for-loop Andy Shevchenko
` (8 more replies)
0 siblings, 9 replies; 12+ messages in thread
From: Andy Shevchenko @ 2024-08-19 18:45 UTC (permalink / raw)
To: Andi Shyti, Andy Shevchenko, linux-i2c, linux-kernel
Cc: Jarkko Nikula, Mika Westerberg, Jan Dabros, Narasimhan.V,
Borislav Petkov, Kim Phillips, grom,
84c04d074b1778886a1af1062a4ca9d9afd72306, Mon, Sep, 17,
"00:00:00", 2001
This is the subset of the patches [1] that should not affect any
functionality. Here is the unification of ID tables, a couple of
function prototypes, and other small cleanups.
In any case this is Cc'ed to AMD who reported a problem in [1]
presumably in the patch that is *not* included here.
Link: https://lore.kernel.org/linux-i2c/20231207141653.2785124-1-andriy.shevchenko@linux.intel.com/ [1]
v3:
- fixed one more rebase issue in patch 5 (LKP)
v2:
- fixed rebase issue in patch 5 (LKP)
Andy Shevchenko (7):
i2c: designware: Replace a while-loop by for-loop
i2c: designware: Let PCI core to take care about interrupt vectors
i2c: designware: Add missing 'c' into PCI IDs variable name
i2c: designware: Unify terminator in device ID tables
i2c: designware: Always provide device ID tables
i2c: designware: Drop return value from i2c_dw_acpi_configure()
i2c: designware: Drop return value from dw_i2c_of_configure()
drivers/i2c/busses/i2c-designware-common.c | 4 +-
drivers/i2c/busses/i2c-designware-core.h | 4 +-
drivers/i2c/busses/i2c-designware-pcidrv.c | 22 ++----
drivers/i2c/busses/i2c-designware-platdrv.c | 76 +++++++++------------
4 files changed, 44 insertions(+), 62 deletions(-)
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 1/7] i2c: designware: Replace a while-loop by for-loop
2024-08-19 18:45 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Andy Shevchenko
@ 2024-08-19 18:45 ` Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 2/7] i2c: designware: Let PCI core to take care about interrupt vectors Andy Shevchenko
` (7 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2024-08-19 18:45 UTC (permalink / raw)
To: Andi Shyti, Andy Shevchenko, linux-i2c, linux-kernel
Cc: Jarkko Nikula, Mika Westerberg, Jan Dabros, Narasimhan.V,
Borislav Petkov, Kim Phillips, Mario Limonciello
Replace a while-loop by for-loop in i2c_dw_probe_lock_support() to
save a few lines of code.
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/i2c/busses/i2c-designware-platdrv.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index df3dc1e8093e..d092532375b8 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -238,11 +238,9 @@ static int i2c_dw_probe_lock_support(struct dw_i2c_dev *dev)
int i = 0;
int ret;
- ptr = i2c_dw_semaphore_cb_table;
-
dev->semaphore_idx = -1;
- while (ptr->probe) {
+ for (ptr = i2c_dw_semaphore_cb_table; ptr->probe; ptr++) {
ret = ptr->probe(dev);
if (ret) {
/*
@@ -254,7 +252,6 @@ static int i2c_dw_probe_lock_support(struct dw_i2c_dev *dev)
return ret;
i++;
- ptr++;
continue;
}
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 2/7] i2c: designware: Let PCI core to take care about interrupt vectors
2024-08-19 18:45 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 1/7] i2c: designware: Replace a while-loop by for-loop Andy Shevchenko
@ 2024-08-19 18:45 ` Andy Shevchenko
2024-08-20 11:15 ` Jarkko Nikula
2024-08-19 18:45 ` [PATCH v3 3/7] i2c: designware: Add missing 'c' into PCI IDs variable name Andy Shevchenko
` (6 subsequent siblings)
8 siblings, 1 reply; 12+ messages in thread
From: Andy Shevchenko @ 2024-08-19 18:45 UTC (permalink / raw)
To: Andi Shyti, Andy Shevchenko, linux-i2c, linux-kernel
Cc: Jarkko Nikula, Mika Westerberg, Jan Dabros, Narasimhan.V,
Borislav Petkov, Kim Phillips
PCI core, after pcim_enable_device(), takes care about the allocated
IRQ vectors, no need to do it explicitly and break the cleaning up
order.
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/i2c/busses/i2c-designware-pcidrv.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index a1b379a1e904..507e114332cd 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -295,10 +295,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
if (controller->setup) {
r = controller->setup(pdev, controller);
- if (r) {
- pci_free_irq_vectors(pdev);
+ if (r)
return r;
- }
}
i2c_dw_adjust_bus_speed(dev);
@@ -307,10 +305,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
i2c_dw_acpi_configure(&pdev->dev);
r = i2c_dw_validate_speed(dev);
- if (r) {
- pci_free_irq_vectors(pdev);
+ if (r)
return r;
- }
i2c_dw_configure(dev);
@@ -330,10 +326,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
adap->nr = controller->bus_num;
r = i2c_dw_probe(dev);
- if (r) {
- pci_free_irq_vectors(pdev);
+ if (r)
return r;
- }
if ((dev->flags & MODEL_MASK) == MODEL_AMD_NAVI_GPU) {
dev->slave = i2c_new_ccgx_ucsi(&dev->adapter, dev->irq, &dgpu_node);
@@ -359,8 +353,6 @@ static void i2c_dw_pci_remove(struct pci_dev *pdev)
pm_runtime_get_noresume(&pdev->dev);
i2c_del_adapter(&dev->adapter);
- devm_free_irq(&pdev->dev, dev->irq, dev);
- pci_free_irq_vectors(pdev);
}
static const struct pci_device_id i2_designware_pci_ids[] = {
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 3/7] i2c: designware: Add missing 'c' into PCI IDs variable name
2024-08-19 18:45 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 1/7] i2c: designware: Replace a while-loop by for-loop Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 2/7] i2c: designware: Let PCI core to take care about interrupt vectors Andy Shevchenko
@ 2024-08-19 18:45 ` Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 4/7] i2c: designware: Unify terminator in device ID tables Andy Shevchenko
` (5 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2024-08-19 18:45 UTC (permalink / raw)
To: Andi Shyti, Andy Shevchenko, linux-i2c, linux-kernel
Cc: Jarkko Nikula, Mika Westerberg, Jan Dabros, Narasimhan.V,
Borislav Petkov, Kim Phillips
Add missing 'c' into i2c_designware_pci_ids variable name.
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/i2c/busses/i2c-designware-pcidrv.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index 507e114332cd..4cbcdae8cd90 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -355,7 +355,7 @@ static void i2c_dw_pci_remove(struct pci_dev *pdev)
i2c_del_adapter(&dev->adapter);
}
-static const struct pci_device_id i2_designware_pci_ids[] = {
+static const struct pci_device_id i2c_designware_pci_ids[] = {
/* Medfield */
{ PCI_VDEVICE(INTEL, 0x0817), medfield },
{ PCI_VDEVICE(INTEL, 0x0818), medfield },
@@ -403,16 +403,16 @@ static const struct pci_device_id i2_designware_pci_ids[] = {
{ PCI_VDEVICE(ATI, 0x7464), navi_amd },
{ 0,}
};
-MODULE_DEVICE_TABLE(pci, i2_designware_pci_ids);
+MODULE_DEVICE_TABLE(pci, i2c_designware_pci_ids);
static struct pci_driver dw_i2c_driver = {
.name = DRIVER_NAME,
- .id_table = i2_designware_pci_ids,
.probe = i2c_dw_pci_probe,
.remove = i2c_dw_pci_remove,
.driver = {
.pm = &i2c_dw_pm_ops,
},
+ .id_table = i2c_designware_pci_ids,
};
module_pci_driver(dw_i2c_driver);
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 4/7] i2c: designware: Unify terminator in device ID tables
2024-08-19 18:45 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Andy Shevchenko
` (2 preceding siblings ...)
2024-08-19 18:45 ` [PATCH v3 3/7] i2c: designware: Add missing 'c' into PCI IDs variable name Andy Shevchenko
@ 2024-08-19 18:45 ` Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 5/7] i2c: designware: Always provide " Andy Shevchenko
` (4 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2024-08-19 18:45 UTC (permalink / raw)
To: Andi Shyti, Andy Shevchenko, linux-i2c, linux-kernel
Cc: Jarkko Nikula, Mika Westerberg, Jan Dabros, Narasimhan.V,
Borislav Petkov, Kim Phillips, Mario Limonciello
Make the terminator entry look the same in all device ID tables.
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/i2c/busses/i2c-designware-pcidrv.c | 2 +-
drivers/i2c/busses/i2c-designware-platdrv.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index 4cbcdae8cd90..cbbcbcc265c9 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -401,7 +401,7 @@ static const struct pci_device_id i2c_designware_pci_ids[] = {
{ PCI_VDEVICE(ATI, 0x73c4), navi_amd },
{ PCI_VDEVICE(ATI, 0x7444), navi_amd },
{ PCI_VDEVICE(ATI, 0x7464), navi_amd },
- { 0,}
+ {}
};
MODULE_DEVICE_TABLE(pci, i2c_designware_pci_ids);
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index d092532375b8..9ce74a8be43a 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -58,7 +58,7 @@ static const struct acpi_device_id dw_i2c_acpi_match[] = {
{ "HISI02A2", 0 },
{ "HISI02A3", 0 },
{ "HYGO0010", ACCESS_INTR_MASK },
- { }
+ {}
};
MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
#endif
@@ -154,7 +154,7 @@ static const struct of_device_id dw_i2c_of_match[] = {
{ .compatible = "snps,designware-i2c", },
{ .compatible = "mscc,ocelot-i2c", .data = (void *)MODEL_MSCC_OCELOT },
{ .compatible = "baikal,bt1-sys-i2c", .data = (void *)MODEL_BAIKAL_BT1 },
- {},
+ {}
};
MODULE_DEVICE_TABLE(of, dw_i2c_of_match);
#else
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 5/7] i2c: designware: Always provide device ID tables
2024-08-19 18:45 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Andy Shevchenko
` (3 preceding siblings ...)
2024-08-19 18:45 ` [PATCH v3 4/7] i2c: designware: Unify terminator in device ID tables Andy Shevchenko
@ 2024-08-19 18:45 ` Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 6/7] i2c: designware: Drop return value from i2c_dw_acpi_configure() Andy Shevchenko
` (3 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2024-08-19 18:45 UTC (permalink / raw)
To: Andi Shyti, Andy Shevchenko, linux-i2c, linux-kernel
Cc: Jarkko Nikula, Mika Westerberg, Jan Dabros, Narasimhan.V,
Borislav Petkov, Kim Phillips, Mario Limonciello
There is no need to have ugly ifdeffery and additional macros
for the device ID tables. Always provide them. Since we touch
the ACPI table, make it sorted by ID.
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/i2c/busses/i2c-designware-platdrv.c | 64 ++++++++++-----------
1 file changed, 31 insertions(+), 33 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 9ce74a8be43a..c1e1344c3fc6 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -40,29 +40,6 @@ static u32 i2c_dw_get_clk_rate_khz(struct dw_i2c_dev *dev)
return clk_get_rate(dev->clk) / KILO;
}
-#ifdef CONFIG_ACPI
-static const struct acpi_device_id dw_i2c_acpi_match[] = {
- { "INT33C2", 0 },
- { "INT33C3", 0 },
- { "INT3432", 0 },
- { "INT3433", 0 },
- { "INTC10EF", 0 },
- { "80860F41", ACCESS_NO_IRQ_SUSPEND },
- { "808622C1", ACCESS_NO_IRQ_SUSPEND },
- { "AMD0010", ACCESS_INTR_MASK },
- { "AMDI0010", ACCESS_INTR_MASK },
- { "AMDI0019", ACCESS_INTR_MASK | ARBITRATION_SEMAPHORE },
- { "AMDI0510", 0 },
- { "APMC0D0F", 0 },
- { "HISI02A1", 0 },
- { "HISI02A2", 0 },
- { "HISI02A3", 0 },
- { "HYGO0010", ACCESS_INTR_MASK },
- {}
-};
-MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
-#endif
-
#ifdef CONFIG_OF
#define BT1_I2C_CTL 0x100
#define BT1_I2C_CTL_ADDR_MASK GENMASK(7, 0)
@@ -149,14 +126,6 @@ static int dw_i2c_of_configure(struct platform_device *pdev)
return 0;
}
-
-static const struct of_device_id dw_i2c_of_match[] = {
- { .compatible = "snps,designware-i2c", },
- { .compatible = "mscc,ocelot-i2c", .data = (void *)MODEL_MSCC_OCELOT },
- { .compatible = "baikal,bt1-sys-i2c", .data = (void *)MODEL_BAIKAL_BT1 },
- {}
-};
-MODULE_DEVICE_TABLE(of, dw_i2c_of_match);
#else
static int bt1_i2c_request_regs(struct dw_i2c_dev *dev)
{
@@ -477,6 +446,35 @@ static const struct dev_pm_ops dw_i2c_dev_pm_ops = {
RUNTIME_PM_OPS(dw_i2c_plat_runtime_suspend, dw_i2c_plat_runtime_resume, NULL)
};
+static const struct of_device_id dw_i2c_of_match[] = {
+ { .compatible = "snps,designware-i2c", },
+ { .compatible = "mscc,ocelot-i2c", .data = (void *)MODEL_MSCC_OCELOT },
+ { .compatible = "baikal,bt1-sys-i2c", .data = (void *)MODEL_BAIKAL_BT1 },
+ {}
+};
+MODULE_DEVICE_TABLE(of, dw_i2c_of_match);
+
+static const struct acpi_device_id dw_i2c_acpi_match[] = {
+ { "80860F41", ACCESS_NO_IRQ_SUSPEND },
+ { "808622C1", ACCESS_NO_IRQ_SUSPEND },
+ { "AMD0010", ACCESS_INTR_MASK },
+ { "AMDI0010", ACCESS_INTR_MASK },
+ { "AMDI0019", ACCESS_INTR_MASK | ARBITRATION_SEMAPHORE },
+ { "AMDI0510", 0 },
+ { "APMC0D0F", 0 },
+ { "HISI02A1", 0 },
+ { "HISI02A2", 0 },
+ { "HISI02A3", 0 },
+ { "HYGO0010", ACCESS_INTR_MASK },
+ { "INT33C2", 0 },
+ { "INT33C3", 0 },
+ { "INT3432", 0 },
+ { "INT3433", 0 },
+ { "INTC10EF", 0 },
+ {}
+};
+MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
+
static const struct platform_device_id dw_i2c_platform_ids[] = {
{ "i2c_designware" },
{}
@@ -488,8 +486,8 @@ static struct platform_driver dw_i2c_driver = {
.remove_new = dw_i2c_plat_remove,
.driver = {
.name = "i2c_designware",
- .of_match_table = of_match_ptr(dw_i2c_of_match),
- .acpi_match_table = ACPI_PTR(dw_i2c_acpi_match),
+ .of_match_table = dw_i2c_of_match,
+ .acpi_match_table = dw_i2c_acpi_match,
.pm = pm_ptr(&dw_i2c_dev_pm_ops),
},
.id_table = dw_i2c_platform_ids,
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 6/7] i2c: designware: Drop return value from i2c_dw_acpi_configure()
2024-08-19 18:45 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Andy Shevchenko
` (4 preceding siblings ...)
2024-08-19 18:45 ` [PATCH v3 5/7] i2c: designware: Always provide " Andy Shevchenko
@ 2024-08-19 18:45 ` Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 7/7] i2c: designware: Drop return value from dw_i2c_of_configure() Andy Shevchenko
` (2 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2024-08-19 18:45 UTC (permalink / raw)
To: Andi Shyti, Andy Shevchenko, linux-i2c, linux-kernel
Cc: Jarkko Nikula, Mika Westerberg, Jan Dabros, Narasimhan.V,
Borislav Petkov, Kim Phillips
i2c_dw_acpi_configure() is called without checking of the returned
value, hence just drop it by converting to void.
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/i2c/busses/i2c-designware-common.c | 4 +---
drivers/i2c/busses/i2c-designware-core.h | 4 ++--
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c
index 4160c5e57df4..f0d7cad92f1c 100644
--- a/drivers/i2c/busses/i2c-designware-common.c
+++ b/drivers/i2c/busses/i2c-designware-common.c
@@ -255,7 +255,7 @@ static void i2c_dw_acpi_params(struct device *device, char method[],
kfree(buf.pointer);
}
-int i2c_dw_acpi_configure(struct device *device)
+void i2c_dw_acpi_configure(struct device *device)
{
struct dw_i2c_dev *dev = dev_get_drvdata(device);
struct i2c_timings *t = &dev->timings;
@@ -285,8 +285,6 @@ int i2c_dw_acpi_configure(struct device *device)
dev->sda_hold_time = fs_ht;
break;
}
-
- return 0;
}
EXPORT_SYMBOL_GPL(i2c_dw_acpi_configure);
diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h
index 3e48f446ce53..ebcf816b731c 100644
--- a/drivers/i2c/busses/i2c-designware-core.h
+++ b/drivers/i2c/busses/i2c-designware-core.h
@@ -420,7 +420,7 @@ int i2c_dw_validate_speed(struct dw_i2c_dev *dev);
void i2c_dw_adjust_bus_speed(struct dw_i2c_dev *dev);
#if IS_ENABLED(CONFIG_ACPI)
-int i2c_dw_acpi_configure(struct device *device);
+void i2c_dw_acpi_configure(struct device *device);
#else
-static inline int i2c_dw_acpi_configure(struct device *device) { return -ENODEV; }
+static inline void i2c_dw_acpi_configure(struct device *device) { }
#endif
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 7/7] i2c: designware: Drop return value from dw_i2c_of_configure()
2024-08-19 18:45 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Andy Shevchenko
` (5 preceding siblings ...)
2024-08-19 18:45 ` [PATCH v3 6/7] i2c: designware: Drop return value from i2c_dw_acpi_configure() Andy Shevchenko
@ 2024-08-19 18:45 ` Andy Shevchenko
2024-08-19 20:27 ` From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Andi Shyti
2024-08-21 14:11 ` Andi Shyti
8 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2024-08-19 18:45 UTC (permalink / raw)
To: Andi Shyti, Andy Shevchenko, linux-i2c, linux-kernel
Cc: Jarkko Nikula, Mika Westerberg, Jan Dabros, Narasimhan.V,
Borislav Petkov, Kim Phillips, Mario Limonciello
dw_i2c_of_configure() is called without checking of the returned
value, hence just drop it by converting to void.
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/i2c/busses/i2c-designware-platdrv.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index c1e1344c3fc6..cd24d2b8becf 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -110,7 +110,7 @@ static int mscc_twi_set_sda_hold_time(struct dw_i2c_dev *dev)
return 0;
}
-static int dw_i2c_of_configure(struct platform_device *pdev)
+static void dw_i2c_of_configure(struct platform_device *pdev)
{
struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
@@ -123,8 +123,6 @@ static int dw_i2c_of_configure(struct platform_device *pdev)
default:
break;
}
-
- return 0;
}
#else
static int bt1_i2c_request_regs(struct dw_i2c_dev *dev)
@@ -132,9 +130,8 @@ static int bt1_i2c_request_regs(struct dw_i2c_dev *dev)
return -ENODEV;
}
-static inline int dw_i2c_of_configure(struct platform_device *pdev)
+static inline void dw_i2c_of_configure(struct platform_device *pdev)
{
- return -ENODEV;
}
#endif
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-08-19 18:45 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Andy Shevchenko
` (6 preceding siblings ...)
2024-08-19 18:45 ` [PATCH v3 7/7] i2c: designware: Drop return value from dw_i2c_of_configure() Andy Shevchenko
@ 2024-08-19 20:27 ` Andi Shyti
2024-08-21 14:11 ` Andi Shyti
8 siblings, 0 replies; 12+ messages in thread
From: Andi Shyti @ 2024-08-19 20:27 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-i2c, linux-kernel, Jarkko Nikula, Mika Westerberg,
Jan Dabros, Narasimhan.V, Borislav Petkov, Kim Phillips, grom,
84c04d074b1778886a1af1062a4ca9d9afd72306, Mon, Sep, 17, 2001
Hi Andy,
On Mon, Aug 19, 2024 at 09:45:06PM GMT, Andy Shevchenko wrote:
> This is the subset of the patches [1] that should not affect any
> functionality. Here is the unification of ID tables, a couple of
> function prototypes, and other small cleanups.
>
> In any case this is Cc'ed to AMD who reported a problem in [1]
> presumably in the patch that is *not* included here.
>
> Link: https://lore.kernel.org/linux-i2c/20231207141653.2785124-1-andriy.shevchenko@linux.intel.com/ [1]
>
> v3:
> - fixed one more rebase issue in patch 5 (LKP)
>
> v2:
> - fixed rebase issue in patch 5 (LKP)
>
> Andy Shevchenko (7):
> i2c: designware: Replace a while-loop by for-loop
> i2c: designware: Let PCI core to take care about interrupt vectors
> i2c: designware: Add missing 'c' into PCI IDs variable name
> i2c: designware: Unify terminator in device ID tables
> i2c: designware: Always provide device ID tables
> i2c: designware: Drop return value from i2c_dw_acpi_configure()
> i2c: designware: Drop return value from dw_i2c_of_configure()
It all applies neatly on my branch and it's all reviewed by me.
I will keep it for a few more days so that others have a chance
to review this series as well.
Thanks,
Andi
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/7] i2c: designware: Let PCI core to take care about interrupt vectors
2024-08-19 18:45 ` [PATCH v3 2/7] i2c: designware: Let PCI core to take care about interrupt vectors Andy Shevchenko
@ 2024-08-20 11:15 ` Jarkko Nikula
0 siblings, 0 replies; 12+ messages in thread
From: Jarkko Nikula @ 2024-08-20 11:15 UTC (permalink / raw)
To: Andy Shevchenko, Andi Shyti, linux-i2c, linux-kernel
Cc: Mika Westerberg, Jan Dabros, Narasimhan.V, Borislav Petkov,
Kim Phillips
On 8/19/24 9:45 PM, Andy Shevchenko wrote:
> PCI core, after pcim_enable_device(), takes care about the allocated
> IRQ vectors, no need to do it explicitly and break the cleaning up
> order.
>
> Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/i2c/busses/i2c-designware-pcidrv.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
I wanted to test this due to earlier 9be8bc4dd617 ("i2c: designware-pci:
Fix BUG_ON during device removal").
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-08-19 18:45 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Andy Shevchenko
` (7 preceding siblings ...)
2024-08-19 20:27 ` From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Andi Shyti
@ 2024-08-21 14:11 ` Andi Shyti
2024-08-21 14:15 ` Andy Shevchenko
8 siblings, 1 reply; 12+ messages in thread
From: Andi Shyti @ 2024-08-21 14:11 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-i2c, linux-kernel, Jarkko Nikula, Mika Westerberg,
Jan Dabros, Narasimhan.V, Borislav Petkov, Kim Phillips, grom,
84c04d074b1778886a1af1062a4ca9d9afd72306, Mon, Sep, 17, 2001
Hi Andy,
All merged to i2c/i2c-host.
Thanks,
Andi
On Mon, Aug 19, 2024 at 09:45:06PM GMT, Andy Shevchenko wrote:
> This is the subset of the patches [1] that should not affect any
> functionality. Here is the unification of ID tables, a couple of
> function prototypes, and other small cleanups.
>
> In any case this is Cc'ed to AMD who reported a problem in [1]
> presumably in the patch that is *not* included here.
>
> Link: https://lore.kernel.org/linux-i2c/20231207141653.2785124-1-andriy.shevchenko@linux.intel.com/ [1]
>
> v3:
> - fixed one more rebase issue in patch 5 (LKP)
>
> v2:
> - fixed rebase issue in patch 5 (LKP)
>
> Andy Shevchenko (7):
> i2c: designware: Replace a while-loop by for-loop
> i2c: designware: Let PCI core to take care about interrupt vectors
> i2c: designware: Add missing 'c' into PCI IDs variable name
> i2c: designware: Unify terminator in device ID tables
> i2c: designware: Always provide device ID tables
> i2c: designware: Drop return value from i2c_dw_acpi_configure()
> i2c: designware: Drop return value from dw_i2c_of_configure()
>
> drivers/i2c/busses/i2c-designware-common.c | 4 +-
> drivers/i2c/busses/i2c-designware-core.h | 4 +-
> drivers/i2c/busses/i2c-designware-pcidrv.c | 22 ++----
> drivers/i2c/busses/i2c-designware-platdrv.c | 76 +++++++++------------
> 4 files changed, 44 insertions(+), 62 deletions(-)
>
> --
> 2.43.0.rc1.1336.g36b5255a03ac
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-08-21 14:11 ` Andi Shyti
@ 2024-08-21 14:15 ` Andy Shevchenko
0 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2024-08-21 14:15 UTC (permalink / raw)
To: Andi Shyti
Cc: linux-i2c, linux-kernel, Jarkko Nikula, Mika Westerberg,
Jan Dabros, Narasimhan.V, Borislav Petkov, Kim Phillips, grom,
84c04d074b1778886a1af1062a4ca9d9afd72306, Mon, Sep, 17, 2001
On Wed, Aug 21, 2024 at 04:11:44PM +0200, Andi Shyti wrote:
> Hi Andy,
>
> All merged to i2c/i2c-host.
Thank you!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2024-08-21 14:15 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-19 18:45 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 1/7] i2c: designware: Replace a while-loop by for-loop Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 2/7] i2c: designware: Let PCI core to take care about interrupt vectors Andy Shevchenko
2024-08-20 11:15 ` Jarkko Nikula
2024-08-19 18:45 ` [PATCH v3 3/7] i2c: designware: Add missing 'c' into PCI IDs variable name Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 4/7] i2c: designware: Unify terminator in device ID tables Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 5/7] i2c: designware: Always provide " Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 6/7] i2c: designware: Drop return value from i2c_dw_acpi_configure() Andy Shevchenko
2024-08-19 18:45 ` [PATCH v3 7/7] i2c: designware: Drop return value from dw_i2c_of_configure() Andy Shevchenko
2024-08-19 20:27 ` From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Andi Shyti
2024-08-21 14:11 ` Andi Shyti
2024-08-21 14:15 ` Andy Shevchenko
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 NNTP newsgroup(s).