Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1327859
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH] SPI/ACPI: DesignWare: Add ACPI support for Designware SPI driver |
| Date | 2016-02-05 17:00 +0100 |
| Message-ID | <qYQXE-2cP-13@gated-at.bofh.it> (permalink) |
| References | <qYIGK-5pB-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Feb 5, 2016 at 9:11 AM, qiujiang <qiujiang@huawei.com> wrote:
> This patch added ACPI support for DesignWare SPI mmio driver. It
> was based the corresponding DT driver and compatible for this two
> way. This patch has been tested on Hisilicon D02 board. It relies
> on the GPIO patchset.
My comments below.
> @@ -84,8 +87,6 @@ static int dw_spi_mmio_probe(struct platform_device *pdev)
> dws->num_cs = num_cs;
>
> if (pdev->dev.of_node) {
> - int i;
> -
> for (i = 0; i < dws->num_cs; i++) {
> int cs_gpio = of_get_named_gpio(pdev->dev.of_node,
> "cs-gpios", i);
It seems the driver was never validated with more than one chip select.
Perhaps someone has to switch to use of_spi_register_master() here.
> @@ -104,6 +105,18 @@ static int dw_spi_mmio_probe(struct platform_device *pdev)
> }
> }
>
> + if (ACPI_COMPANION(&pdev->dev)) {
> + for (i = 0; i < dws->num_cs; i++) {
> + snprintf(propname, sizeof(propname), "cs%d", i);
> + gpiod = devm_gpiod_get(&pdev->dev,
> + propname, GPIOD_ASIS);
> + if (IS_ERR(gpiod)) {
> + dev_err(&pdev->dev, "Get gpio desc failed!\n");
> + return PTR_ERR(gpiod);
> + }
> + }
> + }
Like Mark noticed there is also same issue. Do you indeed check the
configuration with different chip select signals?
--
With Best Regards,
Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH] SPI/ACPI: DesignWare: Add ACPI support for Designware SPI driver qiujiang <qiujiang@huawei.com> - 2016-02-05 08:10 +0100
Re: [RFC PATCH] SPI/ACPI: DesignWare: Add ACPI support for Designware SPI driver Mark Brown <broonie@kernel.org> - 2016-02-05 12:20 +0100
Re: [RFC PATCH] SPI/ACPI: DesignWare: Add ACPI support for Designware SPI driver Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-02-05 17:00 +0100
Re: [RFC PATCH] SPI/ACPI: DesignWare: Add ACPI support for Designware SPI driver Mark Brown <broonie@kernel.org> - 2016-02-05 17:20 +0100
csiph-web