Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754099AbbG0PTc (ORCPT ); Mon, 27 Jul 2015 11:19:32 -0400 Received: from smtp-out-193.synserver.de ([212.40.185.193]:1062 "EHLO smtp-out-193.synserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753339AbbG0PTb (ORCPT ); Mon, 27 Jul 2015 11:19:31 -0400 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 31964 Message-ID: <55B64BFF.8030909@metafoo.de> Date: Mon, 27 Jul 2015 17:19:27 +0200 From: Lars-Peter Clausen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Shawn Lin , Ulf Hansson CC: =?windows-1252?Q?S=F6ren_Brinkmann?= , Michal Simek , 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 References: <1437984249-18332-1-git-send-email-shawn.lin@rock-chips.com> In-Reply-To: <1437984249-18332-1-git-send-email-shawn.lin@rock-chips.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1643 Lines: 45 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 > --- > > 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. - Lars -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/