From: Thierry Reding <thierry.reding@avionic-design.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] mmc: Change board_mmc_getcd() signature.
Date: Mon, 5 Dec 2011 11:00:51 +0100 [thread overview]
Message-ID: <20111205100051.GA4935@avionic-0098.mockup.avionic-design.de> (raw)
In-Reply-To: <201112051053.49109.marek.vasut@gmail.com>
* Marek Vasut wrote:
> > The new API no longer uses the extra cd parameter that was used to store
> > the card presence state. Instead, this information is returned via the
> > function's return value. board_mmc_getcd() returns -1 to indicate that
> > no card-detection mechanism is implemented; 0 indicates that no card is
> > present and 1 is returned if it was detected that a card is present.
> >
> > Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
>
> A silly question -- why do we need this change ? Can you explain it in the
> changelog of V2 too?
It's the first step in implementing card-detection. I discussed this with
Andy and he came up with the idea that board_mmc_getcd() should really have
had the mmc parameter as first argument in the first place instead of the cd
parameter. Furthermore, the cd parameter is used inconsistently in individual
implementations. After some discussion we came to the conclusion that the cd
parameter wasn't required at all and the same information can be represented
in the return value. The whole discussion is in this thread:
http://lists.denx.de/pipermail/u-boot/2011-November/110180.html
It's not really a necessary change, but it makes board_mmc_getcd() much more
consistent with other MMC-related functions.
Perhaps this last sentence would be a good explanation to put in the v2
commit message?
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111205/eff267f6/attachment.pgp>
next prev parent reply other threads:[~2011-12-05 10:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-05 8:23 [U-Boot] [PATCH 1/4] mmc: Change board_mmc_getcd() signature Thierry Reding
2011-12-05 8:23 ` [U-Boot] [PATCH 2/4] mmc: Implement card detection Thierry Reding
2011-12-05 8:23 ` [U-Boot] [PATCH 3/4] mmc: fsl_esdhc: Implement card-detect hook Thierry Reding
2011-12-05 10:47 ` Stefano Babic
2011-12-05 12:49 ` Thierry Reding
2011-12-05 8:23 ` [U-Boot] [PATCH 4/4] mmc: tegra2: " Thierry Reding
2011-12-05 9:53 ` [U-Boot] [PATCH 1/4] mmc: Change board_mmc_getcd() signature Marek Vasut
2011-12-05 10:00 ` Thierry Reding [this message]
2011-12-05 10:54 ` Stefano Babic
2011-12-05 11:02 ` Marek Vasut
2011-12-05 10:40 ` Stefano Babic
2011-12-05 12:53 ` Thierry Reding
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=20111205100051.GA4935@avionic-0098.mockup.avionic-design.de \
--to=thierry.reding@avionic-design.de \
--cc=u-boot@lists.denx.de \
/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