mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
spi: xlp: Add ACPI support for Vulcan SPI controller
Add ACPI support for SPI controller on Broadcom Vulcan ARM64. Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
29b4817d40
commit
097d06192c
1 changed files with 12 additions and 1 deletions
|
@ -11,6 +11,7 @@
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
#include <linux/acpi.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
@ -405,8 +406,9 @@ static int xlp_spi_probe(struct platform_device *pdev)
|
||||||
clk = devm_clk_get(&pdev->dev, NULL);
|
clk = devm_clk_get(&pdev->dev, NULL);
|
||||||
if (IS_ERR(clk)) {
|
if (IS_ERR(clk)) {
|
||||||
dev_err(&pdev->dev, "could not get spi clock\n");
|
dev_err(&pdev->dev, "could not get spi clock\n");
|
||||||
return -ENODEV;
|
return PTR_ERR(clk);
|
||||||
}
|
}
|
||||||
|
|
||||||
xspi->spi_clk = clk_get_rate(clk);
|
xspi->spi_clk = clk_get_rate(clk);
|
||||||
|
|
||||||
master = spi_alloc_master(&pdev->dev, 0);
|
master = spi_alloc_master(&pdev->dev, 0);
|
||||||
|
@ -437,6 +439,14 @@ static int xlp_spi_probe(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_ACPI
|
||||||
|
static const struct acpi_device_id xlp_spi_acpi_match[] = {
|
||||||
|
{ "BRCM900D", 0 },
|
||||||
|
{ },
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(acpi, xlp_spi_acpi_match);
|
||||||
|
#endif
|
||||||
|
|
||||||
static const struct of_device_id xlp_spi_dt_id[] = {
|
static const struct of_device_id xlp_spi_dt_id[] = {
|
||||||
{ .compatible = "netlogic,xlp832-spi" },
|
{ .compatible = "netlogic,xlp832-spi" },
|
||||||
{ },
|
{ },
|
||||||
|
@ -447,6 +457,7 @@ static struct platform_driver xlp_spi_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "xlp-spi",
|
.name = "xlp-spi",
|
||||||
.of_match_table = xlp_spi_dt_id,
|
.of_match_table = xlp_spi_dt_id,
|
||||||
|
.acpi_match_table = ACPI_PTR(xlp_spi_acpi_match),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
module_platform_driver(xlp_spi_driver);
|
module_platform_driver(xlp_spi_driver);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue