[v4,0/5] spi: pxa2xx: Pass the SSP type via device property

Message ID 20221020194500.10225-1-andriy.shevchenko@linux.intel.com
Headers
Series spi: pxa2xx: Pass the SSP type via device property |

Message

Andy Shevchenko Oct. 20, 2022, 7:44 p.m. UTC
  Currently the SPI PXA2xx devices on Intel platforms can be instantiated
via the following paths:
 1) as ACPI LPSS device on Haswell, Bay Trail and Cherry Trail;
 2) as ACPI LPSS device on the Sky Lake and newer;
 3) as PCI LPSS device on Haswell, Bay Trail and Cherry Trail;
 4) as PCI LPSS device on the Sky Lake and newer;
 5) as PCI device via ID table.

Each of these cases provides some platform related data differently,
i.e.:
 1) via drivers/acpi/acpi_lpss.c and drivers/spi/spi-pxa2xx.c
 2) via drivers/mfd/intel-lpss-acpi.c
 3) via drivers/spi/spi-pxa2xx-pci.c
 4) via drivers/mfd/intel-lpss-pci.c and drivers/spi/spi-pxa2xx.c
 5) via drivers/spi/spi-pxa2xx-pci.c

This approach has two downsides:

a) there is no data propagated in the case #2 because we can't have
   two or more drivers to match the same ACPI ID and hence some cases
   are still not supported (Sky Lake and newer ACPI enabled LPSS);

b) the data is duplicated over two drivers in the cases #1 & #4 and,
   besides to be a bloatware, it is error prone (e.g. Lakefield has
   a wrong data right now due to missed PCI entry in the spi-pxa2xx.c).

This series fixes the downsides, and enables previously unsupported
cases. On top of that it has a couple of cleanups (patches 4 and 5).

Changelog v4:
- apply the property only for known MFD enumerated devices (Mark)

Changelog v3:
- added tags to patches 4 & 5 (Jonathan)
- massaged cover letter

Changelog v2:
- added cover letter (Mark)
- dropped applied patch

Andy Shevchenko (5):
  spi: pxa2xx: Respect Intel SSP type given by a property
  spi: pxa2xx: Remove no more needed PCI ID table
  spi: pxa2xx: Move OF and ACPI ID tables closer to their user
  spi: pxa2xx: Consistently use dev variable in pxa2xx_spi_init_pdata()
  spi: pxa2xx: Switch from PM ifdeffery to pm_ptr()

 drivers/spi/spi-pxa2xx.c   | 186 ++++++++-----------------------------
 include/linux/pxa2xx_ssp.h |   1 +
 2 files changed, 41 insertions(+), 146 deletions(-)
  

Comments

Mark Brown Oct. 21, 2022, 3:31 p.m. UTC | #1
On Thu, 20 Oct 2022 22:44:55 +0300, Andy Shevchenko wrote:
> Currently the SPI PXA2xx devices on Intel platforms can be instantiated
> via the following paths:
>  1) as ACPI LPSS device on Haswell, Bay Trail and Cherry Trail;
>  2) as ACPI LPSS device on the Sky Lake and newer;
>  3) as PCI LPSS device on Haswell, Bay Trail and Cherry Trail;
>  4) as PCI LPSS device on the Sky Lake and newer;
>  5) as PCI device via ID table.
> 
> [...]

Applied to

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

Thanks!

[4/5] spi: pxa2xx: Consistently use dev variable in pxa2xx_spi_init_pdata()
      commit: 8fc8250a1586008cceaadd6f4df9db23643d4b3e
[5/5] spi: pxa2xx: Switch from PM ifdeffery to pm_ptr()
      commit: 6c3c438c085b2cd79b3291b67f8f7ece62371947

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