From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Mark Brown <broonie@kernel.org>,
linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>
Subject: [PATCH v5 0/4] spi: pxa2xx: Pass the SSP type via device property
Date: Fri, 21 Oct 2022 22:00:14 +0300 [thread overview]
Message-ID: <20221021190018.63646-1-andriy.shevchenko@linux.intel.com> (raw)
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 v5:
- added a patch to validate the SSP type
- reworked LPSS detection code to narrow its scope (Mark)
- dropped applied patches
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 (4):
spi: pxa2xx: Validate the correctness of the SSP type
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
drivers/spi/spi-pxa2xx.c | 171 ++++++++-----------------------------
include/linux/pxa2xx_ssp.h | 1 +
2 files changed, 37 insertions(+), 135 deletions(-)
--
2.35.1
next reply other threads:[~2022-10-21 19:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 19:00 Andy Shevchenko [this message]
2022-10-21 19:00 ` [PATCH v5 1/4] spi: pxa2xx: Validate the correctness of the SSP type Andy Shevchenko
2022-10-21 19:00 ` [PATCH v5 2/4] spi: pxa2xx: Respect Intel SSP type given by a property Andy Shevchenko
2022-10-21 19:00 ` [PATCH v5 3/4] spi: pxa2xx: Remove no more needed PCI ID table Andy Shevchenko
2022-10-21 19:00 ` [PATCH v5 4/4] spi: pxa2xx: Move OF and ACPI ID tables closer to their user Andy Shevchenko
2022-10-24 14:13 ` [PATCH v5 0/4] spi: pxa2xx: Pass the SSP type via device property Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221021190018.63646-1-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=daniel@zonque.org \
--cc=haojian.zhuang@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=robert.jarzmik@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).