lkml.org 
[lkml]   [2017]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/3] mmc: tmio: support IP-builtin card detection logic
2017-11-20 4:45 GMT+09:00 Wolfram Sang <wsa@the-dreams.de>:
> On Wed, Nov 08, 2017 at 07:17:00PM +0900, Masahiro Yamada wrote:
>> A card detect GPIO is set up only for platforms with "cd-gpios"
>> DT property or TMIO_MMC_USE_GPIO_CD flag. However, the driver
>> core always uses mmc_gpio_get_cd, which just fails with -ENOSYS
>> if ctx->cd_gpio is unset.
>>
>> The bit 5 of the status register provides the current signal level
>> of the CD line. Allow to use it if the GPIO is unused.
>
> I might be missing something: Why do we need to report something
> sensible in this case? The card insert/eject interrupts calling
> mmc_detect_change is not enough?
>

Not enough.

mmc_detect_change() just schedules mmc_rescan().

Without correct ->get_cd(), how can mmc_rescan()
know whether a card is inserted or not?




--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2017-11-20 09:04    [W:0.062 / U:2.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site