mbox series

[v1,00/10] spi: pxa2xx: Get rid of an additional layer in PCI driver

Message ID 20240517195344.813032-1-andriy.shevchenko@linux.intel.com
Headers show
Series spi: pxa2xx: Get rid of an additional layer in PCI driver | expand

Message

Andy Shevchenko May 17, 2024, 7:47 p.m. UTC
SPI PXA2xx main driver is a compound of a core library and
a platform driver code. Decoupling that allows to eventually
get rid of an additional layer of devices hierarchy in PCI driver.
There are also precursor cleanups.

Andy Shevchenko (10):
  spi: pxa2xx: Reorganize the SSP type retrieval
  spi: pxa2xx: Remove no more needed driver data
  spi: pxa2xx: Remove hard coded number of chip select pins
  spi: pxa2xx: Utilise temporary variable for struct device
  spi: pxa2xx: Print DMA burst size only when DMA is enabled
  spi: pxa2xx: Remove duplicate check
  spi: pxa2xx: Remove superflous check for Intel Atom SoCs
  spi: pxa2xx: Extract pxa2xx_spi_platform_*() callbacks
  spi: pxa2xx: Move platform driver to a separate file
  spi: pxa2xx: Convert PCI driver to use spi-pxa2xx code directly

 drivers/spi/Makefile              |   3 +-
 drivers/spi/spi-pxa2xx-pci.c      |  39 ++---
 drivers/spi/spi-pxa2xx-platform.c | 201 +++++++++++++++++++++++++
 drivers/spi/spi-pxa2xx.c          | 239 ++++--------------------------
 drivers/spi/spi-pxa2xx.h          |   6 +
 5 files changed, 253 insertions(+), 235 deletions(-)
 create mode 100644 drivers/spi/spi-pxa2xx-platform.c

Comments

Andy Shevchenko May 17, 2024, 8:36 p.m. UTC | #1
On Fri, May 17, 2024 at 10:47:43PM +0300, Andy Shevchenko wrote:
> The spi-pxa2xx.c is bloated with a platform driver code while
> pretending to provide a core functionality. Make it real core
> library by splitting out the platform driver to a separate file.

...

> @@ -1597,8 +1485,9 @@ static int pxa2xx_spi_probe(struct device *dev, struct ssp_device *ssp)

>  	pxa_ssp_free(ssp);

Looking at this leftover, namely this patch should remove the above line,
I realised that there is a problem with the original code as well as it may
drop a reference count in pxa/ssp.c before cleaning up other things which
might have unexpected behaviour.

>  	return status;
>  }
> +EXPORT_SYMBOL_NS_GPL(pxa2xx_spi_probe, SPI_PXA2xx);

I will rework this one along with providing a fix for the above mentioned
issue. Meanwhile I will wait for other comments for the rest of the series.