lkml.org 
[lkml]   [2009]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH [1/3] drivers/input/xpad.c: Improve Xbox 360 wireless support and add sysfs interface
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@kroah.com> 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-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-03-03 00:19    [W:0.036 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site