From: Shawn Lin <shawn.lin@rock-chips.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>,
"Michal Simek" <michal.simek@xilinx.com>,
linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc: sdhci-of-arasan: Get quirks from device tree
Date: Tue, 28 Jul 2015 08:51:45 +0800 [thread overview]
Message-ID: <55B6D221.8090600@rock-chips.com> (raw)
In-Reply-To: <55B64BFF.8030909@metafoo.de>
On 2015/7/27 23:19, Lars-Peter Clausen wrote:
> On 07/27/2015 10:04 AM, Shawn Lin wrote:
>> This patch adds the interface to get quirks from dts, and
>> there is no need to assign different quirks by condition statement
>> of arasan IP version.
>>
>> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
>> ---
>>
>> drivers/mmc/host/sdhci-of-arasan.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci-of-arasan.c
>> b/drivers/mmc/host/sdhci-of-arasan.c
>> index ef5a7d2..db07788 100644
>> --- a/drivers/mmc/host/sdhci-of-arasan.c
>> +++ b/drivers/mmc/host/sdhci-of-arasan.c
>> @@ -132,6 +132,7 @@ static SIMPLE_DEV_PM_OPS(sdhci_arasan_dev_pm_ops,
>> sdhci_arasan_suspend,
>> static int sdhci_arasan_probe(struct platform_device *pdev)
>> {
>> int ret;
>> + u32 quirktab[2];
>> struct clk *clk_xin;
>> struct sdhci_host *host;
>> struct sdhci_pltfm_host *pltfm_host;
>> @@ -172,6 +173,12 @@ static int sdhci_arasan_probe(struct
>> platform_device *pdev)
>> goto clk_disable_all;
>> }
>>
>> + if (of_property_read_u32_array(pdev->dev.of_node,
>> + "arasan,quirks", &quirktab[0], 2)) {
>> + host->quirks |= quirktab[0];
>> + host->quirks2 |= quirktab[1];
>> + }
>
> The quirks are part of the Linux internal API, making them part of the
> public ABI is not necessarily the best idea. It means they become
> fixed, you can't remove any quirk types, can't change any quirk type,
> nor can add new quirk types.
>
Thank for your kindly reply, Lars. It seems I have lots to learn if I
want to get involved in upstream :)
So this patch is inappropriate for kernel.
> - Lars
>
>
>
>
WARNING: multiple messages have this Message-ID (diff)
From: shawn.lin@rock-chips.com (Shawn Lin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmc: sdhci-of-arasan: Get quirks from device tree
Date: Tue, 28 Jul 2015 08:51:45 +0800 [thread overview]
Message-ID: <55B6D221.8090600@rock-chips.com> (raw)
In-Reply-To: <55B64BFF.8030909@metafoo.de>
On 2015/7/27 23:19, Lars-Peter Clausen wrote:
> On 07/27/2015 10:04 AM, Shawn Lin wrote:
>> This patch adds the interface to get quirks from dts, and
>> there is no need to assign different quirks by condition statement
>> of arasan IP version.
>>
>> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
>> ---
>>
>> drivers/mmc/host/sdhci-of-arasan.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci-of-arasan.c
>> b/drivers/mmc/host/sdhci-of-arasan.c
>> index ef5a7d2..db07788 100644
>> --- a/drivers/mmc/host/sdhci-of-arasan.c
>> +++ b/drivers/mmc/host/sdhci-of-arasan.c
>> @@ -132,6 +132,7 @@ static SIMPLE_DEV_PM_OPS(sdhci_arasan_dev_pm_ops,
>> sdhci_arasan_suspend,
>> static int sdhci_arasan_probe(struct platform_device *pdev)
>> {
>> int ret;
>> + u32 quirktab[2];
>> struct clk *clk_xin;
>> struct sdhci_host *host;
>> struct sdhci_pltfm_host *pltfm_host;
>> @@ -172,6 +173,12 @@ static int sdhci_arasan_probe(struct
>> platform_device *pdev)
>> goto clk_disable_all;
>> }
>>
>> + if (of_property_read_u32_array(pdev->dev.of_node,
>> + "arasan,quirks", &quirktab[0], 2)) {
>> + host->quirks |= quirktab[0];
>> + host->quirks2 |= quirktab[1];
>> + }
>
> The quirks are part of the Linux internal API, making them part of the
> public ABI is not necessarily the best idea. It means they become
> fixed, you can't remove any quirk types, can't change any quirk type,
> nor can add new quirk types.
>
Thank for your kindly reply, Lars. It seems I have lots to learn if I
want to get involved in upstream :)
So this patch is inappropriate for kernel.
> - Lars
>
>
>
>
next prev parent reply other threads:[~2015-07-28 0:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 8:04 [PATCH] mmc: sdhci-of-arasan: Get quirks from device tree Shawn Lin
2015-07-27 8:04 ` Shawn Lin
2015-07-27 8:23 ` Michal Simek
2015-07-27 8:23 ` Michal Simek
2015-07-28 1:07 ` Shawn Lin
2015-07-28 1:07 ` Shawn Lin
2015-07-28 5:46 ` Michal Simek
2015-07-28 5:46 ` Michal Simek
2015-07-27 15:19 ` Lars-Peter Clausen
2015-07-27 15:19 ` Lars-Peter Clausen
2015-07-28 0:51 ` Shawn Lin [this message]
2015-07-28 0:51 ` Shawn Lin
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=55B6D221.8090600@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=soren.brinkmann@xilinx.com \
--cc=ulf.hansson@linaro.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.