2024-03-08 16:29:36

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v2 0/3] spi: xilinx: Massage xilinx_spi.h

Fix kernel documentation and inclusion block, and dropping the size
of the num_chipselect.

In v2:
- added tags (Michal)
- reshuffled fields better to avoid gaps on 64-bits (Michal)

Andy Shevchenko (3):
spi: xilinx: Fix kernel documentation in the xilinx_spi.h
spi: xilinx: Add necessary inclusion and forward declaration
spi: xilinx: Make num_chipselect 8-bit in the struct
xspi_platform_data

include/linux/spi/xilinx_spi.h | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

--
2.43.0.rc1.1.gbec44491f096



2024-03-08 16:29:46

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v2 3/3] spi: xilinx: Make num_chipselect 8-bit in the struct xspi_platform_data

There is no use for whole 16-bit for the number of chip select pins.
Drop it to 8 bits and reshuffle the data structure layout to avoid
unnecessary paddings.

Signed-off-by: Andy Shevchenko <[email protected]>
---
include/linux/spi/xilinx_spi.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/spi/xilinx_spi.h b/include/linux/spi/xilinx_spi.h
index 4ba8f53ce570..1b8d984668b6 100644
--- a/include/linux/spi/xilinx_spi.h
+++ b/include/linux/spi/xilinx_spi.h
@@ -8,17 +8,17 @@ struct spi_board_info;

/**
* struct xspi_platform_data - Platform data of the Xilinx SPI driver
- * @num_chipselect: Number of chip select by the IP.
- * @bits_per_word: Number of bits per word.
* @devices: Devices to add when the driver is probed.
* @num_devices: Number of devices in the devices array.
+ * @num_chipselect: Number of chip select by the IP.
+ * @bits_per_word: Number of bits per word.
* @force_irq: If set, forces QSPI transaction requirements.
*/
struct xspi_platform_data {
- u16 num_chipselect;
- u8 bits_per_word;
struct spi_board_info *devices;
u8 num_devices;
+ u8 num_chipselect;
+ u8 bits_per_word;
bool force_irq;
};

--
2.43.0.rc1.1.gbec44491f096


2024-03-08 16:30:01

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v2 1/3] spi: xilinx: Fix kernel documentation in the xilinx_spi.h

While updating the data structure layout the kernel documentation
became outdated. Synchronize kernel documentation with the actual
data structure layout.

Fixes: 1dd46599f83a ("spi: xilinx: add force_irq for QSPI mode")
Fixes: 082339bc63cc ("spi: spi-xilinx: Add run run-time endian detection")
Reviewed-by: Michal Simek <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
---
include/linux/spi/xilinx_spi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/spi/xilinx_spi.h b/include/linux/spi/xilinx_spi.h
index 3934ce789d87..fd6add419e94 100644
--- a/include/linux/spi/xilinx_spi.h
+++ b/include/linux/spi/xilinx_spi.h
@@ -5,10 +5,10 @@
/**
* struct xspi_platform_data - Platform data of the Xilinx SPI driver
* @num_chipselect: Number of chip select by the IP.
- * @little_endian: If registers should be accessed little endian or not.
* @bits_per_word: Number of bits per word.
* @devices: Devices to add when the driver is probed.
* @num_devices: Number of devices in the devices array.
+ * @force_irq: If set, forces QSPI transaction requirements.
*/
struct xspi_platform_data {
u16 num_chipselect;
--
2.43.0.rc1.1.gbec44491f096


2024-03-08 16:30:04

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v2 2/3] spi: xilinx: Add necessary inclusion and forward declaration

xilinx_spi.h is mnissing inclusion and forward declaration, add them.

Signed-off-by: Andy Shevchenko <[email protected]>
---
include/linux/spi/xilinx_spi.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/include/linux/spi/xilinx_spi.h b/include/linux/spi/xilinx_spi.h
index fd6add419e94..4ba8f53ce570 100644
--- a/include/linux/spi/xilinx_spi.h
+++ b/include/linux/spi/xilinx_spi.h
@@ -2,6 +2,10 @@
#ifndef __LINUX_SPI_XILINX_SPI_H
#define __LINUX_SPI_XILINX_SPI_H

+#include <linux/types.h>
+
+struct spi_board_info;
+
/**
* struct xspi_platform_data - Platform data of the Xilinx SPI driver
* @num_chipselect: Number of chip select by the IP.
--
2.43.0.rc1.1.gbec44491f096


2024-03-12 14:19:32

by Michal Simek

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] spi: xilinx: Add necessary inclusion and forward declaration



On 3/8/24 17:27, Andy Shevchenko wrote:
> xilinx_spi.h is mnissing inclusion and forward declaration, add them.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
> include/linux/spi/xilinx_spi.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/spi/xilinx_spi.h b/include/linux/spi/xilinx_spi.h
> index fd6add419e94..4ba8f53ce570 100644
> --- a/include/linux/spi/xilinx_spi.h
> +++ b/include/linux/spi/xilinx_spi.h
> @@ -2,6 +2,10 @@
> #ifndef __LINUX_SPI_XILINX_SPI_H
> #define __LINUX_SPI_XILINX_SPI_H
>
> +#include <linux/types.h>
> +
> +struct spi_board_info;
> +
> /**
> * struct xspi_platform_data - Platform data of the Xilinx SPI driver
> * @num_chipselect: Number of chip select by the IP.

Acked-by: Michal Simek <[email protected]>

Thanks,
Michal

2024-03-12 14:19:49

by Michal Simek

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] spi: xilinx: Make num_chipselect 8-bit in the struct xspi_platform_data



On 3/8/24 17:27, Andy Shevchenko wrote:
> There is no use for whole 16-bit for the number of chip select pins.
> Drop it to 8 bits and reshuffle the data structure layout to avoid
> unnecessary paddings.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
> include/linux/spi/xilinx_spi.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/spi/xilinx_spi.h b/include/linux/spi/xilinx_spi.h
> index 4ba8f53ce570..1b8d984668b6 100644
> --- a/include/linux/spi/xilinx_spi.h
> +++ b/include/linux/spi/xilinx_spi.h
> @@ -8,17 +8,17 @@ struct spi_board_info;
>
> /**
> * struct xspi_platform_data - Platform data of the Xilinx SPI driver
> - * @num_chipselect: Number of chip select by the IP.
> - * @bits_per_word: Number of bits per word.
> * @devices: Devices to add when the driver is probed.
> * @num_devices: Number of devices in the devices array.
> + * @num_chipselect: Number of chip select by the IP.
> + * @bits_per_word: Number of bits per word.
> * @force_irq: If set, forces QSPI transaction requirements.
> */
> struct xspi_platform_data {
> - u16 num_chipselect;
> - u8 bits_per_word;
> struct spi_board_info *devices;
> u8 num_devices;
> + u8 num_chipselect;
> + u8 bits_per_word;
> bool force_irq;
> };
>


Reviewed-by: Michal Simek <[email protected]>

Thanks,
Michal

2024-03-26 12:40:05

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] spi: xilinx: Massage xilinx_spi.h

On Fri, 08 Mar 2024 18:27:45 +0200, Andy Shevchenko wrote:
> Fix kernel documentation and inclusion block, and dropping the size
> of the num_chipselect.
>
> In v2:
> - added tags (Michal)
> - reshuffled fields better to avoid gaps on 64-bits (Michal)
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/3] spi: xilinx: Fix kernel documentation in the xilinx_spi.h
commit: d650d1c46d8471bf8ebf556629ac13077f13e647
[2/3] spi: xilinx: Add necessary inclusion and forward declaration
commit: 8f40647d87610ecff6637d673024fe7bd045c913
[3/3] spi: xilinx: Make num_chipselect 8-bit in the struct xspi_platform_data
commit: a39111b1cf0864b1782f30f9a1fa65260d057327

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark