On Fri, Feb 05, 2016 at 03:11:20PM +0800, qiujiang wrote:I'm going to ask Andy to get some ideas that how to use this spi-dw-mmio
This patch added ACPI support for DesignWare SPI mmio driver. ItIntel are heavy users of this driver on their systems which also use
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.
ACPI. Have you discussed this binding with them? I've copied Andy and
Jarkko who've worked on the driver recently.
Thanks for the reminder, I will fix it in the next version.
Please use subject lines matching the style for the subsystem. This
makes it easier for people to identify relevant patches.
I'm sorry for here without any comments. This number define is come from
+ char propname[32];That's a magic number, where did it come from and why is it a magic
nummber?
In DT binding, of_get_named_gpio and devm_gpio_request were used to parse gpio+ if (ACPI_COMPANION(&pdev->dev)) {I'm not seeing anywhere where we store the GPIO in this loop. It is
+ 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);
+ }
+ }
+ }
therefore unclear to me how the chip select is going to work?
This is really a question, I will do this feedback to ACPI maintainers.+static const struct acpi_device_id dw_spi_mmio_acpi_match[] = {I really do wish ACPI had some more sensible system for allocating
+ {"HISI0171", 0},
+ { }
+};
+MODULE_DEVICE_TABLE(acpi, dw_spi_mmio_acpi_match);
device IDs so the tables were a little more legible. :(