Check if usb device is suspended

2014-03-13 Thread Jagdish Gedia
Hi, I want to check in my driver if usb device is suspended or not? currently i am doing it like if(udev->state==USB_STATE_SUSPENDED) Is this the proper way? Is this enough? Thanks, Jagdish Gediya -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a m

Re: Check if usb device is suspended

2014-03-13 Thread Oliver Neukum
On Thu, 2014-03-13 at 17:13 +0530, Jagdish Gedia wrote: > Hi, > I want to check in my driver if usb device is suspended or not? > currently i am doing it like > > if(udev->state==USB_STATE_SUSPENDED) > > Is this the proper way? Is this enough? This question is near meaningless. Assuming that you

Re: Check if usb device is suspended

2014-03-13 Thread Alan Stern
On Thu, 13 Mar 2014, Jagdish Gedia wrote: > Hi, > I want to check in my driver if usb device is suspended or not? Why do you need to check? Your driver gets told every time the device suspends and every time it resumes. Therefore it should already know the answer. > currently i am doing it l

Re: Check if usb device is suspended

2014-03-21 Thread Jagdish Gedia
I want to resume the usb device on some event, so i want to check if it is suspended. I think by above method i can check if the device is already suspended, but may be i will miss to resume the device if it is suspending. Is there any way through which i can check if device is suspending? On Thu,

Re: Check if usb device is suspended

2014-03-21 Thread Oliver Neukum
On Fri, 2014-03-21 at 17:17 +0530, Jagdish Gedia wrote: > I want to resume the usb device on some event, so i want to check if > it is suspended. I think by above method i can check if the device is > already suspended, but may be i will miss to resume the device if it > is suspending. Is there any