From: Jiang Qiu <qiujiang@huawei.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
linux-spi <linux-spi@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
<linuxarm@huawei.com>, <haifeng.wei@huawei.com>,
<charles.chenxin@huawei.com>
Subject: Re: [RFC PATCH] SPI/ACPI: DesignWare: Add ACPI support for Designware SPI driver
Date: Sun, 14 Feb 2016 17:47:47 +0800 [thread overview]
Message-ID: <56C04D43.1040604@huawei.com> (raw)
In-Reply-To: <CAHp75VeSkUvHSd_JC-qPzwDjBWM8oxJP8jt3UD91uq1=fvEEqw@mail.gmail.com>
Hi Andy,
Sorry for late relpy because Chinese new year holiday. See my replies below.
Best Regards
Jiang
在 2016/2/5 23:55, Andy Shevchenko 写道:
> 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.
As Mark mentioned, I want to ask you how to use this spi-dw-mmio driver for
ACPI binding? Dose it need any other extra patchset?
>
>> @@ -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.
of_spi_register_master() will be executed in the spi_register_master(),
but it just saved the
cs_gpios to the spi_master and not used it any more.
>> @@ -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?
As a spi master driver, it seems that multi-chip select must be
supported, so this check is
necessary, I think.
>
prev parent reply other threads:[~2016-02-14 9:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 7:11 [RFC PATCH] SPI/ACPI: DesignWare: Add ACPI support for Designware SPI driver qiujiang
2016-02-05 11:09 ` Mark Brown
2016-02-14 9:31 ` Jiang Qiu
2016-02-15 17:44 ` Mark Brown
2016-02-15 8:27 ` Hanjun Guo
2016-02-15 17:45 ` Mark Brown
2016-02-15 18:09 ` One Thousand Gnomes
2016-02-05 15:55 ` Andy Shevchenko
2016-02-05 16:11 ` Mark Brown
2016-02-14 9:47 ` Jiang Qiu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C04D43.1040604@huawei.com \
--to=qiujiang@huawei.com \
--cc=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=charles.chenxin@huawei.com \
--cc=haifeng.wei@huawei.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linuxarm@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).