* [PATCH v1 1/3] fpga: lattice-sysconfig-spi: Fix the terminator entries in ID tables
2026-05-08 8:25 [PATCH v1 0/3] fpga: lattice-sysconfig-spi: Ad-hoc cleanups Andy Shevchenko
@ 2026-05-08 8:25 ` Andy Shevchenko
2026-05-08 8:25 ` [PATCH v1 2/3] fpga: lattice-sysconfig-spi: Drop of_match_ptr() protection Andy Shevchenko
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-05-08 8:25 UTC (permalink / raw)
To: Andy Shevchenko, linux-fpga, linux-kernel
Cc: Moritz Fischer, Xu Yilun, Tom Rix
The whole purpose of the terminator entry is to be the last one.
The trailing comma makes this statement prone to failure. On top
of that the style is used for the entries is unusual. Standardize
this all by moving terminator entries to their own lines and drop
trailing commas.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/fpga/lattice-sysconfig-spi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/fpga/lattice-sysconfig-spi.c b/drivers/fpga/lattice-sysconfig-spi.c
index 6a906df45941..d8d5a33a25b7 100644
--- a/drivers/fpga/lattice-sysconfig-spi.c
+++ b/drivers/fpga/lattice-sysconfig-spi.c
@@ -116,7 +116,8 @@ static const struct spi_device_id sysconfig_spi_ids[] = {
{
.name = "sysconfig-ecp5",
.driver_data = (kernel_ulong_t)&ecp5_spi_max_speed_hz,
- }, {},
+ },
+ {}
};
MODULE_DEVICE_TABLE(spi, sysconfig_spi_ids);
@@ -125,7 +126,8 @@ static const struct of_device_id sysconfig_of_ids[] = {
{
.compatible = "lattice,sysconfig-ecp5",
.data = &ecp5_spi_max_speed_hz,
- }, {},
+ },
+ {}
};
MODULE_DEVICE_TABLE(of, sysconfig_of_ids);
#endif /* IS_ENABLED(CONFIG_OF) */
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v1 2/3] fpga: lattice-sysconfig-spi: Drop of_match_ptr() protection
2026-05-08 8:25 [PATCH v1 0/3] fpga: lattice-sysconfig-spi: Ad-hoc cleanups Andy Shevchenko
2026-05-08 8:25 ` [PATCH v1 1/3] fpga: lattice-sysconfig-spi: Fix the terminator entries in ID tables Andy Shevchenko
@ 2026-05-08 8:25 ` Andy Shevchenko
2026-05-08 8:25 ` [PATCH v1 3/3] fpga: lattice-sysconfig-spi: Don't use "proxy" headers Andy Shevchenko
2026-05-11 15:12 ` [PATCH v1 0/3] fpga: lattice-sysconfig-spi: Ad-hoc cleanups Xu Yilun
3 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-05-08 8:25 UTC (permalink / raw)
To: Andy Shevchenko, linux-fpga, linux-kernel
Cc: Moritz Fischer, Xu Yilun, Tom Rix
Limiting the scope of devicetree support to CONFIG_OF prevents use of this
driver with ACPI via PRP0001. Drop the dependency.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/fpga/lattice-sysconfig-spi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/fpga/lattice-sysconfig-spi.c b/drivers/fpga/lattice-sysconfig-spi.c
index d8d5a33a25b7..76df5d7ad1f4 100644
--- a/drivers/fpga/lattice-sysconfig-spi.c
+++ b/drivers/fpga/lattice-sysconfig-spi.c
@@ -121,7 +121,6 @@ static const struct spi_device_id sysconfig_spi_ids[] = {
};
MODULE_DEVICE_TABLE(spi, sysconfig_spi_ids);
-#if IS_ENABLED(CONFIG_OF)
static const struct of_device_id sysconfig_of_ids[] = {
{
.compatible = "lattice,sysconfig-ecp5",
@@ -130,14 +129,13 @@ static const struct of_device_id sysconfig_of_ids[] = {
{}
};
MODULE_DEVICE_TABLE(of, sysconfig_of_ids);
-#endif /* IS_ENABLED(CONFIG_OF) */
static struct spi_driver lattice_sysconfig_driver = {
.probe = sysconfig_spi_probe,
.id_table = sysconfig_spi_ids,
.driver = {
.name = "lattice_sysconfig_spi_fpga_mgr",
- .of_match_table = of_match_ptr(sysconfig_of_ids),
+ .of_match_table = sysconfig_of_ids,
},
};
module_spi_driver(lattice_sysconfig_driver);
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v1 3/3] fpga: lattice-sysconfig-spi: Don't use "proxy" headers
2026-05-08 8:25 [PATCH v1 0/3] fpga: lattice-sysconfig-spi: Ad-hoc cleanups Andy Shevchenko
2026-05-08 8:25 ` [PATCH v1 1/3] fpga: lattice-sysconfig-spi: Fix the terminator entries in ID tables Andy Shevchenko
2026-05-08 8:25 ` [PATCH v1 2/3] fpga: lattice-sysconfig-spi: Drop of_match_ptr() protection Andy Shevchenko
@ 2026-05-08 8:25 ` Andy Shevchenko
2026-05-11 15:12 ` [PATCH v1 0/3] fpga: lattice-sysconfig-spi: Ad-hoc cleanups Xu Yilun
3 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-05-08 8:25 UTC (permalink / raw)
To: Andy Shevchenko, linux-fpga, linux-kernel
Cc: Moritz Fischer, Xu Yilun, Tom Rix
Update header inclusions to follow IWYU (Include What You Use)
principle.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/fpga/lattice-sysconfig-spi.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/fpga/lattice-sysconfig-spi.c b/drivers/fpga/lattice-sysconfig-spi.c
index 76df5d7ad1f4..8462bc4be06e 100644
--- a/drivers/fpga/lattice-sysconfig-spi.c
+++ b/drivers/fpga/lattice-sysconfig-spi.c
@@ -3,8 +3,14 @@
* Lattice FPGA programming over slave SPI sysCONFIG interface.
*/
-#include <linux/of.h>
+#include <linux/dev_printk.h>
+#include <linux/device/devres.h>
+#include <linux/errno.h>
+#include <linux/mod_devicetable.h>
+#include <linux/module.h>
+#include <linux/slab.h>
#include <linux/spi/spi.h>
+#include <linux/types.h>
#include "lattice-sysconfig.h"
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 0/3] fpga: lattice-sysconfig-spi: Ad-hoc cleanups
2026-05-08 8:25 [PATCH v1 0/3] fpga: lattice-sysconfig-spi: Ad-hoc cleanups Andy Shevchenko
` (2 preceding siblings ...)
2026-05-08 8:25 ` [PATCH v1 3/3] fpga: lattice-sysconfig-spi: Don't use "proxy" headers Andy Shevchenko
@ 2026-05-11 15:12 ` Xu Yilun
3 siblings, 0 replies; 5+ messages in thread
From: Xu Yilun @ 2026-05-11 15:12 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-fpga, linux-kernel, Moritz Fischer, Xu Yilun, Tom Rix
On Fri, May 08, 2026 at 10:25:34AM +0200, Andy Shevchenko wrote:
> While converting the driver to use modern SPI APIs, I have noticed
> more things to improve, hence this mini-series. Note, it's independent
> to the above mentioned conversion patch and may be applied before or
> after (separately).
>
> Andy Shevchenko (3):
> fpga: lattice-sysconfig-spi: Fix the terminator entries in ID tables
> fpga: lattice-sysconfig-spi: Drop of_match_ptr() protection
> fpga: lattice-sysconfig-spi: Don't use "proxy" headers
>
> drivers/fpga/lattice-sysconfig-spi.c | 18 ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Applied to for-next.
>
> --
> 2.50.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread