From: Greg KH <greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
To: Mike Murphy <mamurph-ZCNwHF9ErpZ2icitjWtXSw@public.gmane.org>
Cc: Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org,
fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org
Subject: Re: PATCH [1/3] drivers/input/xpad.c: Improve Xbox 360 wireless support and add sysfs interface
Date: Mon, 2 Mar 2009 15:13:43 -0800 [thread overview]
Message-ID: <20090302231343.GA31663@kroah.com> (raw)
In-Reply-To: <5aa163d00903021504l1965ecdi3423a43134de10d0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <greg@kroah.com>
To: Mike Murphy <mamurph@cs.clemson.edu>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
linux-usb@vger.kernel.org, oliver@neukum.org, fweisbec@gmail.com,
torvalds@linux-foundation.org
Subject: Re: PATCH [1/3] drivers/input/xpad.c: Improve Xbox 360 wireless support and add sysfs interface
Date: Mon, 2 Mar 2009 15:13:43 -0800 [thread overview]
Message-ID: <20090302231343.GA31663@kroah.com> (raw)
In-Reply-To: <5aa163d00903021504l1965ecdi3423a43134de10d0@mail.gmail.com>
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
next prev parent reply other threads:[~2009-03-02 23:13 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-01 4:53 PATCH [1/3] drivers/input/xpad.c: Improve Xbox 360 wireless support and add sysfs interface Mike Murphy
2009-03-01 4:53 ` Mike Murphy
[not found] ` <5aa163d00902282053h38b0febbyb37fc30855fdc985-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-02 21:04 ` Andrew Morton
2009-03-02 21:04 ` Andrew Morton
2009-03-02 21:18 ` Greg KH
[not found] ` <20090302211820.GA21489-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2009-03-02 21:35 ` Andrew Morton
2009-03-02 21:35 ` Andrew Morton
[not found] ` <20090302133551.1266f725.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2009-03-02 21:59 ` Greg KH
2009-03-02 21:59 ` Greg KH
2009-03-02 21:59 ` Mike Murphy
2009-03-02 21:59 ` Mike Murphy
[not found] ` <5aa163d00903021359x3a4693f5tbb7f1e3fec4d88b8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-02 22:39 ` Greg KH
2009-03-02 22:39 ` Greg KH
2009-03-02 23:04 ` Mike Murphy
2009-03-02 23:04 ` Mike Murphy
[not found] ` <5aa163d00903021504l1965ecdi3423a43134de10d0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-02 23:13 ` Greg KH [this message]
2009-03-02 23:13 ` Greg KH
2009-03-02 21:46 ` Mike Murphy
2009-03-02 21:46 ` Mike Murphy
2009-03-02 22:00 ` Andrew Morton
2009-03-02 22:00 ` Andrew Morton
2009-03-02 22:27 ` Mike Murphy
2009-03-02 22:27 ` Mike Murphy
2009-03-03 2:47 ` Mike Murphy
2009-03-03 2:47 ` Mike Murphy
2009-03-03 3:09 ` Mike Murphy
2009-03-03 3:09 ` Mike Murphy
[not found] ` <5aa163d00903021847n525e8704jd332610c45e4675a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-03 3:12 ` Linus Torvalds
2009-03-03 3:12 ` Linus Torvalds
[not found] ` <alpine.LFD.2.00.0903021902460.3111-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-03-03 4:16 ` Mike Murphy
2009-03-03 4:16 ` Mike Murphy
[not found] ` <5aa163d00903022016s14b7ad32qfbaf82a07b9e0921-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-03 4:20 ` Mike Murphy
2009-03-03 4:20 ` Mike Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090302231343.GA31663@kroah.com \
--to=greg-u8xffu+wg4eavxtiumwx3w@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mamurph-ZCNwHF9ErpZ2icitjWtXSw@public.gmane.org \
--cc=oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.