Pete Zaitcev (zaitcev) wrote,
Pete Zaitcev

sysfs is the new ioctl

I just received a (cc:) of a patch submission with the following description:
This patch against is a driver for the PlayStation 2 specific Trance Vibrator device. The only thing that device can do is vibrate at various speeds.

Applications of this device are obvious, and I suspect that plastic or silicone adaptors of various shapes can be bought for it.

The driver does not plug into character device framework, input framework, and any place of such nature. Instead, it creates a sysfs attribute "speed". Desired level of personal comfort N is achieved by running "echo -n N >/sys/class/usb_device/usbdev1.3/device/speed", or "echo -n N /sys/bus/usb/devices/1-3:1.0/speed" (if you prefer geographical addressing), or any other equivalent: sysfs provides innumerable ways to accomplish the same thing.

I am not quite sure if this is progress, but at least the hacker does not need to think about ioctl number conflicts anymore. Actually... naming an attribute "speed" is asking for trouble, because this is what hub driver uses.

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded