]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
spi: pxa2xx: Rework self-initiated platform data creation for non-ACPI
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Wed, 28 Oct 2015 13:13:43 +0000 (15:13 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 30 Oct 2015 02:18:05 +0000 (11:18 +0900)
commit0db642151ad80967e9e1c2abf3e19bd7902ecdc9
treec1739c82c82a973749e32a167f92c6acfa69856b
parentb7c08cf85c9a3a4b05474b7acacc9fbce8fb3eaf
spi: pxa2xx: Rework self-initiated platform data creation for non-ACPI

Extend the pxa2xx_spi_acpi_get_pdata() so that it can create platform data
also on platforms that do not support ACPI or if CONFIG_ACPI is not set.
Now it is expected that "pxa2xx-spi" platform device is either created with
explicit platform data or has an ACPI companion device.

However there is only little in pxa2xx_spi_acpi_get_pdata() that is really
dependent on ACPI companion and it can be reworked to cover also cases
where "pxa2xx-spi" device doesn't have ACPI companion and is created
without platform data.

Do this by renaming the pxa2xx_spi_acpi_get_pdata(), moving it outside of
CONFIG_ACPI test and changing a few runtime tests there to support non-ACPI
case. Only port/bus ID setting based on ACPI _UID is dependent on ACPI and
is moved to own function inside CONFIG_ACPI.

Purpose of this to support non-ACPI case for those PCI enumerated compound
devices that integrate both LPSS SPI host controller and integrated DMA
engine under the same PCI ID and which are registered in MFD layer instead
of in spi-pxa2xx-pci.c.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pxa2xx.c