Linux-Amlogic Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: neil.armstrong@linaro.org, Ulf Hansson <ulf.hansson@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"open list:ARM/Amlogic Meson..."
	<linux-amlogic@lists.infradead.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/2] mmc: meson-gx: support platform interrupt as card detect interrupt
Date: Mon, 30 Jan 2023 20:04:06 +0100	[thread overview]
Message-ID: <34cd9312-67da-b069-4e61-5763a7460c38@gmail.com> (raw)
In-Reply-To: <7789e36f-f13a-9837-5432-c16754922fa3@linaro.org>

On 30.01.2023 12:06, Neil Armstrong wrote:
> On 30/01/2023 00:10, Heiner Kallweit wrote:
>> Use a new mmc core feature and support specifying the card detect
>> gpio interrupt in device tree.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>> ---
>>   drivers/mmc/host/meson-gx-mmc.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
>> index be1a972c2..c87bc31d0 100644
>> --- a/drivers/mmc/host/meson-gx-mmc.c
>> +++ b/drivers/mmc/host/meson-gx-mmc.c
>> @@ -1236,6 +1236,9 @@ static int meson_mmc_probe(struct platform_device *pdev)
>>           goto free_host;
>>       }
>>   +    /* gpio card detect interrupt */
>> +    mmc->cd_irq = platform_get_irq_optional(pdev, 1);
> 
> Ok it's fine but beware GXBB/GXL/AXG doesn't support Rising + Falling GPIO IRQ,
> so this should only be used on G12A/B/SM1 and later.
> 
Thanks for the hint. I'm aware of the constraint for older versions.
There the mmc core would silently fall back to polling.
At the time when the gpio irqchip code was developed Jerome and me had
intense discussions on whether there's an acceptable workaround to
support edge-both on these chip versions.

I tested on SC2, there the proposed way to support the gpio cd irq
works fine.

> Neil
> 
>> +
>>       host->pinctrl = devm_pinctrl_get(&pdev->dev);
>>       if (IS_ERR(host->pinctrl)) {
>>           ret = PTR_ERR(host->pinctrl);
> 


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2023-01-30 19:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-29 23:02 [PATCH 0/2] mmc: meson-gx: support platform interrupt as card detect interrupt Heiner Kallweit
2023-01-29 23:04 ` [PATCH 1/2] mmc: core: " Heiner Kallweit
2023-02-13 22:46   ` Ulf Hansson
2023-02-14  7:45     ` Heiner Kallweit
2023-01-29 23:10 ` [PATCH 2/2] mmc: meson-gx: " Heiner Kallweit
2023-01-30 11:06   ` Neil Armstrong
2023-01-30 19:04     ` Heiner Kallweit [this message]
2023-02-13 22:47   ` Ulf Hansson
2023-02-14  6:39     ` Heiner Kallweit

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=34cd9312-67da-b069-4e61-5763a7460c38@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=narmstrong@baylibre.com \
    --cc=neil.armstrong@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox