public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Petr Cvek <petr.cvek@tul.cz>
Subject: Re: [PATCH v2] mmc: pxamci: fix card detect with slot-gpio API
Date: Thu, 17 Sep 2015 19:05:32 +0200	[thread overview]
Message-ID: <871tdxrn6r.fsf@belgarion.home> (raw)
In-Reply-To: <CAPDyKFrWxabCY4639qzg0vzpAcARTdnr+D9511ZjYd=_0ZaqpQ@mail.gmail.com> (Ulf Hansson's message of "Thu, 17 Sep 2015 10:20:10 +0200")

Ulf Hansson <ulf.hansson@linaro.org> writes:

>> +       if (gpio_is_valid(gpio_ro))
>> +               ret = mmc_gpio_request_ro(mmc, gpio_ro);
>
> Would it be possible for you to use the mmc_gpiod_request_ro() instead?
I don't think so.
Most of pxamci users are old platform data based machine code, which passes an
integer for the gpio. A full conversion to gpio_desc is another work.

>> -               gpio_direction_input(gpio_cd);
>>
>> -               ret = request_irq(gpio_to_irq(gpio_cd), pxamci_detect_irq,
>
> I guess the pxamci_detect_irq() function can be removed within this
> patch as well!?
Euh no. The reason is on this line :
		host->pdata->init(&pdev->dev, pxamci_detect_irq, mmc);
Machine code is passed this callback to signal a card detection change for
esoteric cases, using this function as a IRQ handler. For example we have
trizeps4_mci_init() in arch/arm/mach-pxa/trizeps4.c.

>> +       if (gpio_is_valid(gpio_cd))
>> +               ret = mmc_gpio_request_cd(mmc, gpio_cd, 0);
>
> Would it be possible for you to use the mmc_gpiod_request_cd() instead?
Same reason as before I'm afraid.

> I believe you have some additional code to remove in pxamci_remove().
> Some gpio_free() and free_irq() shouldn't be needed there after this
> change.
Yes, good catch. This will be for v3.

Cheers.

-- 
Robert

      reply	other threads:[~2015-09-17 17:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-16 19:16 [PATCH v2] mmc: pxamci: fix card detect with slot-gpio API Robert Jarzmik
2015-09-17  8:20 ` Ulf Hansson
2015-09-17 17:05   ` Robert Jarzmik [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=871tdxrn6r.fsf@belgarion.home \
    --to=robert.jarzmik@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=petr.cvek@tul.cz \
    --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