diff options
Diffstat (limited to 'drivers/spi')
| -rw-r--r-- | drivers/spi/spi-xlp.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/spi/spi-xlp.c b/drivers/spi/spi-xlp.c index 8f04feca6ee3..4071a729eb2f 100644 --- a/drivers/spi/spi-xlp.c +++ b/drivers/spi/spi-xlp.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
| 13 | */ | 13 | */ |
| 14 | #include <linux/acpi.h> | ||
| 14 | #include <linux/clk.h> | 15 | #include <linux/clk.h> |
| 15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
| 16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
| @@ -405,8 +406,9 @@ static int xlp_spi_probe(struct platform_device *pdev) | |||
| 405 | clk = devm_clk_get(&pdev->dev, NULL); | 406 | clk = devm_clk_get(&pdev->dev, NULL); |
| 406 | if (IS_ERR(clk)) { | 407 | if (IS_ERR(clk)) { |
| 407 | dev_err(&pdev->dev, "could not get spi clock\n"); | 408 | dev_err(&pdev->dev, "could not get spi clock\n"); |
| 408 | return -ENODEV; | 409 | return PTR_ERR(clk); |
| 409 | } | 410 | } |
| 411 | |||
| 410 | xspi->spi_clk = clk_get_rate(clk); | 412 | xspi->spi_clk = clk_get_rate(clk); |
| 411 | 413 | ||
| 412 | master = spi_alloc_master(&pdev->dev, 0); | 414 | master = spi_alloc_master(&pdev->dev, 0); |
| @@ -437,6 +439,14 @@ static int xlp_spi_probe(struct platform_device *pdev) | |||
| 437 | return 0; | 439 | return 0; |
| 438 | } | 440 | } |
| 439 | 441 | ||
| 442 | #ifdef CONFIG_ACPI | ||
| 443 | static const struct acpi_device_id xlp_spi_acpi_match[] = { | ||
| 444 | { "BRCM900D", 0 }, | ||
| 445 | { }, | ||
| 446 | }; | ||
| 447 | MODULE_DEVICE_TABLE(acpi, xlp_spi_acpi_match); | ||
| 448 | #endif | ||
| 449 | |||
| 440 | static const struct of_device_id xlp_spi_dt_id[] = { | 450 | static const struct of_device_id xlp_spi_dt_id[] = { |
| 441 | { .compatible = "netlogic,xlp832-spi" }, | 451 | { .compatible = "netlogic,xlp832-spi" }, |
| 442 | { }, | 452 | { }, |
| @@ -447,6 +457,7 @@ static struct platform_driver xlp_spi_driver = { | |||
| 447 | .driver = { | 457 | .driver = { |
| 448 | .name = "xlp-spi", | 458 | .name = "xlp-spi", |
| 449 | .of_match_table = xlp_spi_dt_id, | 459 | .of_match_table = xlp_spi_dt_id, |
| 460 | .acpi_match_table = ACPI_PTR(xlp_spi_acpi_match), | ||
| 450 | }, | 461 | }, |
| 451 | }; | 462 | }; |
| 452 | module_platform_driver(xlp_spi_driver); | 463 | module_platform_driver(xlp_spi_driver); |
