linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] spi: xilinx: Massage xilinx_spi.h
@ 2024-03-08 16:27 Andy Shevchenko
  2024-03-08 16:27 ` [PATCH v2 1/3] spi: xilinx: Fix kernel documentation in the xilinx_spi.h Andy Shevchenko
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Andy Shevchenko @ 2024-03-08 16:27 UTC (permalink / raw)
  To: Andy Shevchenko, linux-spi, linux-arm-kernel, linux-kernel
  Cc: Mark Brown, Michal Simek

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/3] spi: xilinx: Fix kernel documentation in the xilinx_spi.h
  2024-03-08 16:27 [PATCH v2 0/3] spi: xilinx: Massage xilinx_spi.h Andy Shevchenko
@ 2024-03-08 16:27 ` Andy Shevchenko
  2024-03-08 16:27 ` [PATCH v2 2/3] spi: xilinx: Add necessary inclusion and forward declaration Andy Shevchenko
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2024-03-08 16:27 UTC (permalink / raw)
  To: Andy Shevchenko, linux-spi, linux-arm-kernel, linux-kernel
  Cc: Mark Brown, Michal Simek

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 <michal.simek@amd.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/3] spi: xilinx: Add necessary inclusion and forward declaration
  2024-03-08 16:27 [PATCH v2 0/3] spi: xilinx: Massage xilinx_spi.h Andy Shevchenko
  2024-03-08 16:27 ` [PATCH v2 1/3] spi: xilinx: Fix kernel documentation in the xilinx_spi.h Andy Shevchenko
@ 2024-03-08 16:27 ` Andy Shevchenko
  2024-03-12 14:18   ` Michal Simek
  2024-03-08 16:27 ` [PATCH v2 3/3] spi: xilinx: Make num_chipselect 8-bit in the struct xspi_platform_data Andy Shevchenko
  2024-03-26 12:39 ` [PATCH v2 0/3] spi: xilinx: Massage xilinx_spi.h Mark Brown
  3 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2024-03-08 16:27 UTC (permalink / raw)
  To: Andy Shevchenko, linux-spi, linux-arm-kernel, linux-kernel
  Cc: Mark Brown, Michal Simek

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

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 3/3] spi: xilinx: Make num_chipselect 8-bit in the struct xspi_platform_data
  2024-03-08 16:27 [PATCH v2 0/3] spi: xilinx: Massage xilinx_spi.h Andy Shevchenko
  2024-03-08 16:27 ` [PATCH v2 1/3] spi: xilinx: Fix kernel documentation in the xilinx_spi.h Andy Shevchenko
  2024-03-08 16:27 ` [PATCH v2 2/3] spi: xilinx: Add necessary inclusion and forward declaration Andy Shevchenko
@ 2024-03-08 16:27 ` Andy Shevchenko
  2024-03-12 14:19   ` Michal Simek
  2024-03-26 12:39 ` [PATCH v2 0/3] spi: xilinx: Massage xilinx_spi.h Mark Brown
  3 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2024-03-08 16:27 UTC (permalink / raw)
  To: Andy Shevchenko, linux-spi, linux-arm-kernel, linux-kernel
  Cc: Mark Brown, Michal Simek

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 <andriy.shevchenko@linux.intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/3] spi: xilinx: Add necessary inclusion and forward declaration
  2024-03-08 16:27 ` [PATCH v2 2/3] spi: xilinx: Add necessary inclusion and forward declaration Andy Shevchenko
@ 2024-03-12 14:18   ` Michal Simek
  0 siblings, 0 replies; 7+ messages in thread
From: Michal Simek @ 2024-03-12 14:18 UTC (permalink / raw)
  To: Andy Shevchenko, linux-spi, linux-arm-kernel, linux-kernel; +Cc: Mark Brown



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 <andriy.shevchenko@linux.intel.com>
> ---
>   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 <michal.simek@amd.com>

Thanks,
Michal

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 3/3] spi: xilinx: Make num_chipselect 8-bit in the struct xspi_platform_data
  2024-03-08 16:27 ` [PATCH v2 3/3] spi: xilinx: Make num_chipselect 8-bit in the struct xspi_platform_data Andy Shevchenko
@ 2024-03-12 14:19   ` Michal Simek
  0 siblings, 0 replies; 7+ messages in thread
From: Michal Simek @ 2024-03-12 14:19 UTC (permalink / raw)
  To: Andy Shevchenko, linux-spi, linux-arm-kernel, linux-kernel; +Cc: Mark Brown



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 <andriy.shevchenko@linux.intel.com>
> ---
>   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 <michal.simek@amd.com>

Thanks,
Michal

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/3] spi: xilinx: Massage xilinx_spi.h
  2024-03-08 16:27 [PATCH v2 0/3] spi: xilinx: Massage xilinx_spi.h Andy Shevchenko
                   ` (2 preceding siblings ...)
  2024-03-08 16:27 ` [PATCH v2 3/3] spi: xilinx: Make num_chipselect 8-bit in the struct xspi_platform_data Andy Shevchenko
@ 2024-03-26 12:39 ` Mark Brown
  3 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2024-03-26 12:39 UTC (permalink / raw)
  To: linux-spi, linux-arm-kernel, linux-kernel, Andy Shevchenko; +Cc: Michal Simek

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-26 12:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-08 16:27 [PATCH v2 0/3] spi: xilinx: Massage xilinx_spi.h Andy Shevchenko
2024-03-08 16:27 ` [PATCH v2 1/3] spi: xilinx: Fix kernel documentation in the xilinx_spi.h Andy Shevchenko
2024-03-08 16:27 ` [PATCH v2 2/3] spi: xilinx: Add necessary inclusion and forward declaration Andy Shevchenko
2024-03-12 14:18   ` Michal Simek
2024-03-08 16:27 ` [PATCH v2 3/3] spi: xilinx: Make num_chipselect 8-bit in the struct xspi_platform_data Andy Shevchenko
2024-03-12 14:19   ` Michal Simek
2024-03-26 12:39 ` [PATCH v2 0/3] spi: xilinx: Massage xilinx_spi.h Mark Brown

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).