On Fri, Aug 17, 2007 at 04:37:48PM -0400, Martin Owens wrote:
> > If you are running a kernel with CONFIG_USB_SUSPEND enabled, then
> > your system will have a /sys/bus/usb/devices/usb.../.../power
> > directory that contains two files: state and wakeup.
> 
> Can you do this with udev/dbus configuration?

I wrote a script that took the udev %p argument on the command line, like
this:

BUS=="usb", SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", 
SYSFS{idProduct}=="0001", SYMLINK+="bb-%k", GROUP="plugdev", MODE="0660", 
RUN="/tmp/cap.sh %p"


Then in the script, you could run:

bcharge
sleep 5s                # seems to be needed... you can play with this
echo -n 0 > "/sys/$1/device/power/state"

- Chris


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Barry-devel mailing list
Barry-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/barry-devel

Reply via email to