2024-03-07 17:05:09

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v2 0/3] spi: pxa2xx: Clean up linux/spi/pxa2xx_spi.h

A couple of cleanups against linux/spi/pxa2xx_spi.h.

In v2:
- preserved a comment (Arnd)
- added tag (Arnd)
- added new patch to avoid using unneeded header in soc/pxa/ssp.c

Andy Shevchenko (3):
spi: pxa2xx: Kill pxa2xx_set_spi_info()
spi: pxa2xx: Make num_chipselect 8-bit in the struct
pxa2xx_spi_controller
spi: pxa2xx: Use proper SSP header in soc/pxa/ssp.c

arch/arm/mach-pxa/devices.c | 18 ------------------
arch/arm/mach-pxa/spitz.c | 14 +++++++++++++-
drivers/soc/pxa/ssp.c | 2 +-
include/linux/spi/pxa2xx_spi.h | 10 +---------
4 files changed, 15 insertions(+), 29 deletions(-)

--
2.43.0.rc1.1.gbec44491f096



2024-03-07 17:52:59

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] spi: pxa2xx: Clean up linux/spi/pxa2xx_spi.h

On Thu, Mar 07, 2024 at 07:03:14PM +0200, Andy Shevchenko wrote:
> A couple of cleanups against linux/spi/pxa2xx_spi.h.

Besides obvious compilation error I think I can follow Arnd's suggestion to get
rid of the pxa2xx_spi.h altogether. Stay tuned!


--
With Best Regards,
Andy Shevchenko



2024-03-07 18:13:09

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v2 3/3] spi: pxa2xx: Use proper SSP header in soc/pxa/ssp.c

There is nothing from pxa2xx_spi.h used by soc/pxa/ssp.c.
Replace it with pxa2xx_ssp.h.

Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/soc/pxa/ssp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/pxa/ssp.c b/drivers/soc/pxa/ssp.c
index 7af04e8b8163..854d32e04558 100644
--- a/drivers/soc/pxa/ssp.c
+++ b/drivers/soc/pxa/ssp.c
@@ -25,7 +25,7 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/platform_device.h>
-#include <linux/spi/pxa2xx_spi.h>
+#include <linux/pxa2xx_ssp.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_device.h>
--
2.43.0.rc1.1.gbec44491f096


2024-03-07 20:11:30

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v2 2/3] spi: pxa2xx: Make num_chipselect 8-bit in the struct pxa2xx_spi_controller

There is no use for whole 16-bit for the number of chip select pins.
Drop it to 8 bits.

Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
---
include/linux/spi/pxa2xx_spi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/spi/pxa2xx_spi.h b/include/linux/spi/pxa2xx_spi.h
index 56aba2f737b1..e5a4a045fb67 100644
--- a/include/linux/spi/pxa2xx_spi.h
+++ b/include/linux/spi/pxa2xx_spi.h
@@ -17,7 +17,7 @@ struct dma_chan;
* (resides in device.platform_data).
*/
struct pxa2xx_spi_controller {
- u16 num_chipselect;
+ u8 num_chipselect;
u8 enable_dma;
u8 dma_burst_size;
bool is_target;
--
2.43.0.rc1.1.gbec44491f096


2024-03-07 22:07:37

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] spi: pxa2xx: Use proper SSP header in soc/pxa/ssp.c

On Thu, Mar 7, 2024, at 18:03, Andy Shevchenko wrote:
> There is nothing from pxa2xx_spi.h used by soc/pxa/ssp.c.
> Replace it with pxa2xx_ssp.h.
>
> Signed-off-by: Andy Shevchenko <[email protected]>

Acked-by: Arnd Bergmann <[email protected]>

2024-03-08 12:12:32

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] spi: pxa2xx: Use proper SSP header in soc/pxa/ssp.c

On Thu, Mar 07, 2024 at 11:06:00PM +0100, Arnd Bergmann wrote:
> On Thu, Mar 7, 2024, at 18:03, Andy Shevchenko wrote:
> > There is nothing from pxa2xx_spi.h used by soc/pxa/ssp.c.
> > Replace it with pxa2xx_ssp.h.
> >
> > Signed-off-by: Andy Shevchenko <[email protected]>
>
> Acked-by: Arnd Bergmann <[email protected]>

Thanks. There is a v3.

--
With Best Regards,
Andy Shevchenko