Re: PATCH [1/3] drivers/input/xpad.c: Improve Xbox 360 wireless support and add sysfs interface

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

 



On Mon, Mar 02, 2009 at 06:04:00PM -0500, Mike Murphy wrote:
> On Mon, Mar 2, 2009 at 5:39 PM, Greg KH <greg@xxxxxxxxx> wrote:
> >
> > I tried to create such an interface years ago, and the macro tricks
> > involved ended up being horrible, and in the end, it didn't work.  But
> > if you can come up with something, I'd love to see it.
> >
> > thanks,
> >
> > greg k-h
> >
> 
> I could probably give it a shot, but possibly not until May... once
> the current semester ends. I really need to understand the kernel type
> system -- or at least the types that "should" be exposed to userspace
> -- before thinking about the design too much. Maybe that's the
> question that needs to be asked first: in general, what does a sysfs
> interface into a driver look like? It's certainly flexible enough to
> do a lot, and the existing interfaces allow it to do a lot, but is
> there a simplification that covers some large percentage of cases?

Look at some of the easy things, like integers.  If you could get those
working, the hwmon drivers could be simplified a lot more.

The problem I ran into was that the attribute show/store functions deals
with a "struct device" which you need to cast into some other structure
type, and then determine the offset of the integer you are needing to
access.

Hm, maybe that wouldn't be that hard with 2 offset_of() values, I think
I was only trying to do one, but that was a long time ago...

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