diff mbox series

[v1,05/14] spi: pxa2xx: Consolidate related headers under include/linux/spi

Message ID 20210423163437.89306-5-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v1,01/14] spi: pxa2xx: Use one point of return when ->probe() fails | expand

Commit Message

Andy Shevchenko April 23, 2021, 4:34 p.m. UTC
We have two headers split between include/linux and include/linux/spi.
Consolidated them under SPI realm, i.e. in the latter folder.

Update users accordingly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/input/mouse/navpoint.c       | 3 ++-
 drivers/spi/spi-pxa2xx-dma.c         | 2 --
 drivers/spi/spi-pxa2xx-pci.c         | 1 +
 drivers/spi/spi-pxa2xx.h             | 2 +-
 include/linux/spi/pxa2xx_spi.h       | 9 +++++----
 include/linux/{ => spi}/pxa2xx_ssp.h | 6 +++---
 sound/soc/intel/catpt/dsp.c          | 4 +++-
 sound/soc/pxa/pxa-ssp.c              | 3 ++-
 8 files changed, 17 insertions(+), 13 deletions(-)
 rename include/linux/{ => spi}/pxa2xx_ssp.h (99%)

Comments

Mark Brown April 23, 2021, 4:56 p.m. UTC | #1
On Fri, Apr 23, 2021 at 07:34:28PM +0300, Andy Shevchenko wrote:

> We have two headers split between include/linux and include/linux/spi.
> Consolidated them under SPI realm, i.e. in the latter folder.

Why?  Isn't the point to maintain an abstraction between the general
purpose use of the SSP IP and its application as a SPI controller?  I'd
check the cover letter for the series but there doesn't seem to be one.
Mark Brown April 23, 2021, 5:49 p.m. UTC | #2
On Fri, Apr 23, 2021 at 08:30:08PM +0300, Andy Shevchenko wrote:
> On Fri, Apr 23, 2021 at 05:56:30PM +0100, Mark Brown wrote:
> > On Fri, Apr 23, 2021 at 07:34:28PM +0300, Andy Shevchenko wrote:

> > > We have two headers split between include/linux and include/linux/spi.
> > > Consolidated them under SPI realm, i.e. in the latter folder.

> > Why?  Isn't the point to maintain an abstraction between the general
> > purpose use of the SSP IP and its application as a SPI controller?

> Aren't the General Purpose of the SSP IP is an SPI controller either way?
> What you are talking about is probably GP SPI vs. private (dedicated) SPI.

SPI and any other serial protocols that happen to come up - these
generic serial IPs also often get used for audio for example.

> > I'd
> > check the cover letter for the series but there doesn't seem to be one.

> Set of cleanups here and there related to the SPI PXA2xx driver.
> It's hard to add something else here.

It doesn't need to be much more than what you just wrote.
diff mbox series

Patch

diff --git a/drivers/input/mouse/navpoint.c b/drivers/input/mouse/navpoint.c
index 4d67575bb276..a0731cfbbafa 100644
--- a/drivers/input/mouse/navpoint.c
+++ b/drivers/input/mouse/navpoint.c
@@ -15,9 +15,10 @@ 
 #include <linux/input/navpoint.h>
 #include <linux/interrupt.h>
 #include <linux/mutex.h>
-#include <linux/pxa2xx_ssp.h>
 #include <linux/slab.h>
 
+#include <linux/spi/pxa2xx_ssp.h>
+
 /*
  * Synaptics Modular Embedded Protocol: Module Packet Format.
  * Module header byte 2:0 = Length (# bytes that follow)
diff --git a/drivers/spi/spi-pxa2xx-dma.c b/drivers/spi/spi-pxa2xx-dma.c
index 32ab7391396d..e00dbadd39ec 100644
--- a/drivers/spi/spi-pxa2xx-dma.c
+++ b/drivers/spi/spi-pxa2xx-dma.c
@@ -15,8 +15,6 @@ 
 #include <linux/spi/pxa2xx_spi.h>
 #include <linux/spi/spi.h>
 
-#include <linux/pxa2xx_ssp.h>
-
 #include "spi-pxa2xx.h"
 
 static void pxa2xx_spi_dma_transfer_complete(struct driver_data *drv_data,
diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c
index f60ed4c62000..5af0a3fbc1b0 100644
--- a/drivers/spi/spi-pxa2xx-pci.c
+++ b/drivers/spi/spi-pxa2xx-pci.c
@@ -8,6 +8,7 @@ 
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
+
 #include <linux/spi/pxa2xx_spi.h>
 
 #include <linux/dmaengine.h>
diff --git a/drivers/spi/spi-pxa2xx.h b/drivers/spi/spi-pxa2xx.h
index 739e264feaa6..b6dae0981b61 100644
--- a/drivers/spi/spi-pxa2xx.h
+++ b/drivers/spi/spi-pxa2xx.h
@@ -12,7 +12,7 @@ 
 #include <linux/types.h>
 #include <linux/sizes.h>
 
-#include <linux/pxa2xx_ssp.h>
+#include <linux/spi/pxa2xx_ssp.h>
 
 struct gpio_desc;
 struct pxa2xx_spi_controller;
diff --git a/include/linux/spi/pxa2xx_spi.h b/include/linux/spi/pxa2xx_spi.h
index 1e0e2f136319..4baae475bd89 100644
--- a/include/linux/spi/pxa2xx_spi.h
+++ b/include/linux/spi/pxa2xx_spi.h
@@ -2,12 +2,12 @@ 
 /*
  * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs
  */
-#ifndef __linux_pxa2xx_spi_h
-#define __linux_pxa2xx_spi_h
+#ifndef __LINUX_PXA2XX_SPI_H
+#define __LINUX_PXA2XX_SPI_H
 
 #include <linux/types.h>
 
-#include <linux/pxa2xx_ssp.h>
+#include <linux/spi/pxa2xx_ssp.h>
 
 #define PXA2XX_CS_ASSERT (0x01)
 #define PXA2XX_CS_DEASSERT (0x02)
@@ -51,4 +51,5 @@  struct pxa2xx_spi_chip {
 extern void pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_controller *info);
 
 #endif
-#endif
+
+#endif	/* __LINUX_PXA2XX_SPI_H */
diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/spi/pxa2xx_ssp.h
similarity index 99%
rename from include/linux/pxa2xx_ssp.h
rename to include/linux/spi/pxa2xx_ssp.h
index 7f73b26ed22e..14b049840faf 100644
--- a/include/linux/pxa2xx_ssp.h
+++ b/include/linux/spi/pxa2xx_ssp.h
@@ -11,8 +11,8 @@ 
  *       PXA3xx     SSP1, SSP2, SSP3, SSP4
  */
 
-#ifndef __LINUX_SSP_H
-#define __LINUX_SSP_H
+#ifndef __LINUX_PXA2XX_SSP_H
+#define __LINUX_PXA2XX_SSP_H
 
 #include <linux/bits.h>
 #include <linux/compiler_types.h>
@@ -270,4 +270,4 @@  static inline struct ssp_device *pxa_ssp_request_of(const struct device_node *n,
 static inline void pxa_ssp_free(struct ssp_device *ssp) {}
 #endif
 
-#endif
+#endif	/* __LINUX_PXA2XX_SSP_H */
diff --git a/sound/soc/intel/catpt/dsp.c b/sound/soc/intel/catpt/dsp.c
index 9c5fd18f2600..08af8bab8704 100644
--- a/sound/soc/intel/catpt/dsp.c
+++ b/sound/soc/intel/catpt/dsp.c
@@ -9,7 +9,9 @@ 
 #include <linux/dma-mapping.h>
 #include <linux/firmware.h>
 #include <linux/pci.h>
-#include <linux/pxa2xx_ssp.h>
+
+#include <linux/spi/pxa2xx_ssp.h>
+
 #include "core.h"
 #include "messages.h"
 #include "registers.h"
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index b941adcbb8f9..710c8dbd18bc 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -16,10 +16,11 @@ 
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/io.h>
-#include <linux/pxa2xx_ssp.h>
 #include <linux/of.h>
 #include <linux/dmaengine.h>
 
+#include <linux/spi/pxa2xx_ssp.h>
+
 #include <asm/irq.h>
 
 #include <sound/core.h>