From: Lauri Hintsala <lauri.hintsala@bluegiga.com>
To: Matt Sealey <matt@genesi-usa.com>
Cc: Shawn Guo <shawn.guo@linaro.org>,
veli-pekka.peltola@bluegiga.com, cjb@laptop.org,
linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mmc: mxs-mmc: implement broken-cd
Date: Mon, 17 Sep 2012 16:43:35 +0300 [thread overview]
Message-ID: <50572907.6000700@bluegiga.com> (raw)
In-Reply-To: <505096EF.8060208@bluegiga.com>
Hi,
Is it OK to use broken-cd? broken-cd feature is documented as "There is
no card detection available; polling must be used". In this case the
card detect is not broken but it is unrouted so it is unavailable.
Documentation about broken-cd has been added by commit:
https://git.kernel.org/?p=linux/kernel/git/cjb/mmc.git;a=commitdiff;h=abe1e05da365350ac282ba5f6831aae13d97074e
Any tips about power management implementation are welcome if I have to
use PM instead of polling method.
Regards,
Lauri
On 09/12/2012 05:06 PM, Lauri Hintsala wrote:
> Hi,
>
> On 09/10/2012 05:58 PM, Matt Sealey wrote:
>> I think this describes three use cases which are different, as Shawn
>> said we have here;
>>
>> * missing card detect support (card detect is not wired so it's
>> impossible to tell, and the controller doesn't support the SD standard
>> card detection)
>> * non-removable device
>> * broken card detect support
>>
>> The third one is what the property sounds like it describes, but this
>> is not the use case you are describing at all. This kind of property
>> naming is more like describing "card detect doesn't operate reliably"
>> which is true of i.MX devices with certain versions of the eSDHC and
>> uSDHC controllers, where non-GPIO card detection interferes with SDIO
>> interrupts, but in this case a board designer should add a real card
>> detect pin to the board (most more expensive push-push SD card slots
>> come with a pin you can wire for CD). In cases where errata is
>> published after boards are shipped, broken-cd is a meaningful
>> description when described in the absense of a gpio cd description, or
>> presence of some cd-handled-internally style property (forgive me for
>> not cross-referencing the FSL definition for this property, we don't
>> use it here at Genesi since all our boards have GPIO CD)
>>
>> It seems your device is a combination of the top two in the list, it
>> is not down to a broken feature at all, but one that should be
>> possible to not implement for devices which are permanently connected.
>> A non-removable device should be able to be powered down, at least
>> using runtime PM or clock gating (if this works, remember to whitelist
>> the card for clock gating!) but card detect shouldn't be used in this
>> case to detect if the card is powered or not (this is a problem for
>> your card controller and card driver state tracker. The MMC subsystem
>> already tracks this state fairly well for power management).
>
> Do you mean the polling mode shouldn't been used to detect if the device
> is powered?
>
> Is there any examples how PM support could be implemented? I'm not
> familiar with PM subsystem. How is it done in practice? Should I play
> with fixed regulators?
>
> BR,
> Lauri
>
>
>> I would refrain from calling a feature "broken card detect" if there
>> is actually no breakage involved especially if it would be more
>> prudent instead look into how to figure out how to track power
>> management state properly without cluttering the device tree.
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: lauri.hintsala@bluegiga.com (Lauri Hintsala)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmc: mxs-mmc: implement broken-cd
Date: Mon, 17 Sep 2012 16:43:35 +0300 [thread overview]
Message-ID: <50572907.6000700@bluegiga.com> (raw)
In-Reply-To: <505096EF.8060208@bluegiga.com>
Hi,
Is it OK to use broken-cd? broken-cd feature is documented as "There is
no card detection available; polling must be used". In this case the
card detect is not broken but it is unrouted so it is unavailable.
Documentation about broken-cd has been added by commit:
https://git.kernel.org/?p=linux/kernel/git/cjb/mmc.git;a=commitdiff;h=abe1e05da365350ac282ba5f6831aae13d97074e
Any tips about power management implementation are welcome if I have to
use PM instead of polling method.
Regards,
Lauri
On 09/12/2012 05:06 PM, Lauri Hintsala wrote:
> Hi,
>
> On 09/10/2012 05:58 PM, Matt Sealey wrote:
>> I think this describes three use cases which are different, as Shawn
>> said we have here;
>>
>> * missing card detect support (card detect is not wired so it's
>> impossible to tell, and the controller doesn't support the SD standard
>> card detection)
>> * non-removable device
>> * broken card detect support
>>
>> The third one is what the property sounds like it describes, but this
>> is not the use case you are describing at all. This kind of property
>> naming is more like describing "card detect doesn't operate reliably"
>> which is true of i.MX devices with certain versions of the eSDHC and
>> uSDHC controllers, where non-GPIO card detection interferes with SDIO
>> interrupts, but in this case a board designer should add a real card
>> detect pin to the board (most more expensive push-push SD card slots
>> come with a pin you can wire for CD). In cases where errata is
>> published after boards are shipped, broken-cd is a meaningful
>> description when described in the absense of a gpio cd description, or
>> presence of some cd-handled-internally style property (forgive me for
>> not cross-referencing the FSL definition for this property, we don't
>> use it here at Genesi since all our boards have GPIO CD)
>>
>> It seems your device is a combination of the top two in the list, it
>> is not down to a broken feature at all, but one that should be
>> possible to not implement for devices which are permanently connected.
>> A non-removable device should be able to be powered down, at least
>> using runtime PM or clock gating (if this works, remember to whitelist
>> the card for clock gating!) but card detect shouldn't be used in this
>> case to detect if the card is powered or not (this is a problem for
>> your card controller and card driver state tracker. The MMC subsystem
>> already tracks this state fairly well for power management).
>
> Do you mean the polling mode shouldn't been used to detect if the device
> is powered?
>
> Is there any examples how PM support could be implemented? I'm not
> familiar with PM subsystem. How is it done in practice? Should I play
> with fixed regulators?
>
> BR,
> Lauri
>
>
>> I would refrain from calling a feature "broken card detect" if there
>> is actually no breakage involved especially if it would be more
>> prudent instead look into how to figure out how to track power
>> management state properly without cluttering the device tree.
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-09-17 13:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-07 11:45 [PATCH] mmc: mxs-mmc: implement broken-cd Lauri Hintsala
2012-09-07 11:45 ` Lauri Hintsala
2012-09-10 6:08 ` Shawn Guo
2012-09-10 6:08 ` Shawn Guo
2012-09-10 10:04 ` Lauri Hintsala
2012-09-10 10:04 ` Lauri Hintsala
2012-09-10 13:50 ` Shawn Guo
2012-09-10 13:50 ` Shawn Guo
2012-09-20 4:45 ` Lauri Hintsala
2012-09-20 4:45 ` Lauri Hintsala
2012-09-10 14:58 ` Matt Sealey
2012-09-10 14:58 ` Matt Sealey
2012-09-12 14:06 ` Lauri Hintsala
2012-09-12 14:06 ` Lauri Hintsala
2012-09-17 13:43 ` Lauri Hintsala [this message]
2012-09-17 13:43 ` Lauri Hintsala
2012-09-17 14:01 ` Chris Ball
2012-09-17 14:01 ` Chris Ball
2012-09-17 14:40 ` Lauri Hintsala
2012-09-17 14:40 ` Lauri Hintsala
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=50572907.6000700@bluegiga.com \
--to=lauri.hintsala@bluegiga.com \
--cc=cjb@laptop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=matt@genesi-usa.com \
--cc=shawn.guo@linaro.org \
--cc=veli-pekka.peltola@bluegiga.com \
/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.