Commit c7ed5fd5 authored by Mark Brown's avatar Mark Brown

Merge branch 'for-5.12' of...

Merge branch 'for-5.12' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-5.13
parents 58eaa7b2 8c4ffe4d
...@@ -31,6 +31,7 @@ properties: ...@@ -31,6 +31,7 @@ properties:
- mediatek,mt7623-nor - mediatek,mt7623-nor
- mediatek,mt7629-nor - mediatek,mt7629-nor
- mediatek,mt8192-nor - mediatek,mt8192-nor
- mediatek,mt8195-nor
- enum: - enum:
- mediatek,mt8173-nor - mediatek,mt8173-nor
- items: - items:
......
...@@ -1496,6 +1496,10 @@ static const struct pci_device_id pxa2xx_spi_pci_compound_match[] = { ...@@ -1496,6 +1496,10 @@ static const struct pci_device_id pxa2xx_spi_pci_compound_match[] = {
{ PCI_VDEVICE(INTEL, 0x51aa), LPSS_CNL_SSP }, { PCI_VDEVICE(INTEL, 0x51aa), LPSS_CNL_SSP },
{ PCI_VDEVICE(INTEL, 0x51ab), LPSS_CNL_SSP }, { PCI_VDEVICE(INTEL, 0x51ab), LPSS_CNL_SSP },
{ PCI_VDEVICE(INTEL, 0x51fb), LPSS_CNL_SSP }, { PCI_VDEVICE(INTEL, 0x51fb), LPSS_CNL_SSP },
/* ADL-M */
{ PCI_VDEVICE(INTEL, 0x54aa), LPSS_CNL_SSP },
{ PCI_VDEVICE(INTEL, 0x54ab), LPSS_CNL_SSP },
{ PCI_VDEVICE(INTEL, 0x54fb), LPSS_CNL_SSP },
/* APL */ /* APL */
{ PCI_VDEVICE(INTEL, 0x5ac2), LPSS_BXT_SSP }, { PCI_VDEVICE(INTEL, 0x5ac2), LPSS_BXT_SSP },
{ PCI_VDEVICE(INTEL, 0x5ac4), LPSS_BXT_SSP }, { PCI_VDEVICE(INTEL, 0x5ac4), LPSS_BXT_SSP },
......
...@@ -1927,7 +1927,7 @@ static int stm32_spi_probe(struct platform_device *pdev) ...@@ -1927,7 +1927,7 @@ static int stm32_spi_probe(struct platform_device *pdev)
pm_runtime_set_active(&pdev->dev); pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev); pm_runtime_enable(&pdev->dev);
ret = devm_spi_register_master(&pdev->dev, master); ret = spi_register_master(master);
if (ret) { if (ret) {
dev_err(&pdev->dev, "spi master registration failed: %d\n", dev_err(&pdev->dev, "spi master registration failed: %d\n",
ret); ret);
...@@ -1956,6 +1956,7 @@ static int stm32_spi_remove(struct platform_device *pdev) ...@@ -1956,6 +1956,7 @@ static int stm32_spi_remove(struct platform_device *pdev)
struct spi_master *master = platform_get_drvdata(pdev); struct spi_master *master = platform_get_drvdata(pdev);
struct stm32_spi *spi = spi_master_get_devdata(master); struct stm32_spi *spi = spi_master_get_devdata(master);
spi_unregister_master(master);
spi->cfg->disable(spi); spi->cfg->disable(spi);
if (master->dma_tx) if (master->dma_tx)
......
...@@ -2487,6 +2487,7 @@ struct spi_controller *__devm_spi_alloc_controller(struct device *dev, ...@@ -2487,6 +2487,7 @@ struct spi_controller *__devm_spi_alloc_controller(struct device *dev,
ctlr = __spi_alloc_controller(dev, size, slave); ctlr = __spi_alloc_controller(dev, size, slave);
if (ctlr) { if (ctlr) {
ctlr->devm_allocated = true;
*ptr = ctlr; *ptr = ctlr;
devres_add(dev, ptr); devres_add(dev, ptr);
} else { } else {
...@@ -2824,11 +2825,6 @@ int devm_spi_register_controller(struct device *dev, ...@@ -2824,11 +2825,6 @@ int devm_spi_register_controller(struct device *dev,
} }
EXPORT_SYMBOL_GPL(devm_spi_register_controller); EXPORT_SYMBOL_GPL(devm_spi_register_controller);
static int devm_spi_match_controller(struct device *dev, void *res, void *ctlr)
{
return *(struct spi_controller **)res == ctlr;
}
static int __unregister(struct device *dev, void *null) static int __unregister(struct device *dev, void *null)
{ {
spi_unregister_device(to_spi_device(dev)); spi_unregister_device(to_spi_device(dev));
...@@ -2875,8 +2871,7 @@ void spi_unregister_controller(struct spi_controller *ctlr) ...@@ -2875,8 +2871,7 @@ void spi_unregister_controller(struct spi_controller *ctlr)
/* Release the last reference on the controller if its driver /* Release the last reference on the controller if its driver
* has not yet been converted to devm_spi_alloc_master/slave(). * has not yet been converted to devm_spi_alloc_master/slave().
*/ */
if (!devres_find(ctlr->dev.parent, devm_spi_release_controller, if (!ctlr->devm_allocated)
devm_spi_match_controller, ctlr))
put_device(&ctlr->dev); put_device(&ctlr->dev);
/* free bus id */ /* free bus id */
......
...@@ -509,6 +509,9 @@ struct spi_controller { ...@@ -509,6 +509,9 @@ struct spi_controller {
#define SPI_MASTER_GPIO_SS BIT(5) /* GPIO CS must select slave */ #define SPI_MASTER_GPIO_SS BIT(5) /* GPIO CS must select slave */
/* flag indicating this is a non-devres managed controller */
bool devm_allocated;
/* flag indicating this is an SPI slave controller */ /* flag indicating this is an SPI slave controller */
bool slave; bool slave;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment