Re: [PATCH 1/1] usb: chipidea: debug: add low power mode check before print registers

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

 



On Thu, Mar 26, 2015 at 04:19:52PM +0800, Li Jun wrote:
> Since the required clock to access registers is gated off in low power mode,
> add ci->in_lpm check before try to dump registers value.
> 
> Signed-off-by: Li Jun <jun.li@xxxxxxxxxxxxx>
> ---
>  drivers/usb/chipidea/debug.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c
> index 268e423..905e4da 100644
> --- a/drivers/usb/chipidea/debug.c
> +++ b/drivers/usb/chipidea/debug.c
> @@ -336,7 +336,7 @@ static int ci_registers_show(struct seq_file *s, void *unused)
>  	struct ci_hdrc *ci = s->private;
>  	u32 tmp_reg;
>  
> -	if (!ci)
> +	if (!ci || ci->in_lpm)
>  		return 0;
>  
>  	/* ------ Registers ----- */
> -- 
> 1.9.1
> 

Would you show an warning message if this operation is not allowed,
Eg, return -EPERM?

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux