Re: [PATCH 1/3] mmc: replacing hardcoded value for runtime PM suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Shawn,

On 9/2/16, 10:39 AM, "Shawn Lin" <shawn.lin@xxxxxxxxxxxxxx> wrote:

>Hi
>
>On 2016/9/1 22:24, alex lemberg wrote:
>> Add MMC_AUTOSUSPEND_DELAY_MS define
>
>I'm thinking should we expose it to userspace
>via sysfs, since I don't know why it should be 3ms, not 4ms, 5ms, etc.

Agree, we can consider exposing it to the user space.
The exposure to the user space is less critical to the current
patchset, but we can do it as a “follow-up change” once its approved.

>
>
>>
>> Signed-off-by: alex lemberg <alex.lemberg@xxxxxxxxxxx>
>> ---
>>  drivers/mmc/card/block.c | 3 ++-
>>  include/linux/mmc/host.h | 2 ++
>>  2 files changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
>> index 48a5dd7..f4386ed 100644
>> --- a/drivers/mmc/card/block.c
>> +++ b/drivers/mmc/card/block.c
>> @@ -2610,7 +2610,8 @@ static int mmc_blk_probe(struct mmc_card *card)
>>  			goto out;
>>  	}
>>
>> -	pm_runtime_set_autosuspend_delay(&card->dev, 3000);
>> +	pm_runtime_set_autosuspend_delay(&card->dev,
>> +		MMC_RUNTIME_SUSPEND_DELAY_MS);
>>  	pm_runtime_use_autosuspend(&card->dev);
>>
>>  	/*
>> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
>> index aa4bfbf..8cb8218 100644
>> --- a/include/linux/mmc/host.h
>> +++ b/include/linux/mmc/host.h
>> @@ -22,6 +22,8 @@
>>  #include <linux/mmc/mmc.h>
>>  #include <linux/mmc/pm.h>
>>
>> +#define MMC_RUNTIME_SUSPEND_DELAY_MS	3000
>> +
>>  struct mmc_ios {
>>  	unsigned int	clock;			/* clock rate */
>>  	unsigned short	vdd;
>>
>
>
>-- 
>Best Regards
>Shawn Lin
>

��.n��������+%������w��{.n�����{��i��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux