mxc_mmc_force_detect usage

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

mxc_mmc_force_detect usage

749件の閲覧回数
bdp42
Contributor IV

Hi,

We have an IMX53 based platform running Android Gingerbread, Linux kernel 2.6.35.

I'm trying to force the mmc stack to detect and process the removal and insertion of an SDIO card via a software mechanism as opposed to a hardware mechanism.

It looked like the function mxc_mmc_force_detect was doing just that and would forcing the card detect handler to run and detect the presence/absence of the card. It does not appear to work as I expected.

void mxc_mmc_force_detect(int id)

{

    struct sdhci_host *host;

    if ((id < 0) || (id >= MXC_SDHCI_NUM))

        return;

    if (!mxc_fix_chips[id])

        return;

    host = mxc_fix_chips[id]->hosts[0];

    if (host->detect_irq)

        return;

    schedule_work(&host->cd_wq);

    return;

}

When the function is called, mxc_fix_chips[id] is zero and so it simply returns at this point. Secondly host->detect_irq is non zero and so it would also return here.

So it looks like this only schedules the handler when in a certain state. Can anyone explain what this function does and when it should be called? Is this the appropriate function to achieve what I want or is there another way to do this?

Thanks,

Bruno

ラベル(3)
0 件の賞賛
返信
0 返答(返信)