Re: [PATCH] USB driver for Meywa-Denki & Kayac YUREX

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

 



On Thu, Sep 30, 2010 at 06:33:10AM +0900, Tomoki Sekiyama wrote:
> 2010/9/29 Greg KH <gregkh@xxxxxxx>:
> > On Wed, Sep 29, 2010 at 12:16:50PM +0900, Tomoki Sekiyama wrote:
> >> This is the driver code for YUREX (leg-shakes sensosr) I showed you
> >> at the party after LinuxCon Japan.
> >
> > Heh, thanks for posting the patch, I like it a lot.
> 
> Thanks for your review of the patch!
> 
> >> Meywa-Denki/Kayac YUREX is a leg-shakes sensor device.
> >> See http://bbu.kayac.com/en/about/ for further information.
> >> This driver support read/write the leg-shakes counter in the device
> >> via a device file /dev/yurex[0-9]*.
> >
> > Is there any reason this has to be a character device?
> 
> It is a character device to use fasync operation to enable a userland daemon
> to know the counter update without polling.
> But yes, it might be over-spec.

Heh, possibly :)

Actually, that makes a lot of sense.  For stuff like this it makes sense
to keep your character device node.  Mind if I take your original patch
instead?

> >?The way you use
> > the device seems to be just like a sysfs file. ?Could it be done as a
> > sysfs instead? ?If so, it would reduce the ammount of code here.
> >
> > Are there userspace tools that are expecting the /dev/ node, or is it
> > just used as you showed me at the meeting by running 'cat' and 'echo' on
> > the device node?
> 
> I've tried the sysfs version, attached below (tested with 2.6.36-rc5).
> We can do the same thing I've showed at the party with echo or cat, like below;
> 
> $ cat /sys/bus/usb/drivers/yurex/2-2.1:1.0/bbu
> 5827
> 
> ("bbu" is the unit of legs-shake displayed on the device.)
> 
> I hope you like this version more. :)

Thank you very much for the changed patch, but I think you got the
design right the first time, sorry for making you do more work.

I'll go queue the original patch up.

thanks,

greg k-h
--
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