[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56A8BF22.8010509@intel.com>
Date: Wed, 27 Jan 2016 14:59:14 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: Shawn Lin <shawn.lin@...k-chips.com>,
Ulf Hansson <ulf.hansson@...aro.org>
Cc: bcm-kernel-feedback-list@...adcom.com,
linux-rpi-kernel@...ts.infradead.org, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org,
Russell King <rmk+kernel@....linux.org.uk>
Subject: Re: [RFC PATCH 0/21] Totally remove SDHCI_QUIRK_BROKEN_CARD_DETECTION
quirk
On 27/01/16 07:05, Shawn Lin wrote:
> Ulf wants to make sdhci into a library, but it's a huge task
> since any improvemts may touch too much platforms. But at least
> we should make some effort to push things torwards to this target.
>
> This patchset remove SDHCI_QUIRK_BROKEN_CARD_DETECTION from sdhci
> to gradually reduce quirk of sdhci.
>
> Firstly, SDHCI_QUIRK_BROKEN_CARD_DETECTION aims at claiming the slot is
> a "broken-cd" one, but "broken-cd" is not a quirk from my view.
> In addition, mmc core stack had already obtain "broken-cd" from dts via
> mmc_of_parse and pass MMC_CAP_NEEDS_POLL to mmc->caps. So we can reuse it
> instead of SDHCI_QUIRK_BROKEN_CARD_DETECTION.
That assumes there is no driver that wants to disable the card detect
interrupts and disable the use of the Present State register, but still use
a Card Detect GPIO and therefore not have MMC_CAP_NEEDS_POLL.
A way forward should provide for drivers do to things like that.
One way is to make selected existing functions into library functions and
provide callbacks for them. In this case do with sdhci_set_card_detection()
what Russell King did with sdhci_reset(). However Ulf is against new callbacks.
I would much prefer the structure for a SDHCI library be put in place, or at
least agreed to, before individual quirks are tackled.
In my view Ulf needs to explain how the SDHCI library is going to work,
particularly in the absence of new callbacks.
Powered by blists - more mailing lists