All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: linux-iio@vger.kernel.org
Subject: Re: [RFC PATCH 0/3] Experimenting with channel specification structures.
Date: Fri, 25 Mar 2011 16:03:57 +0100	[thread overview]
Message-ID: <201103251603.58220.arnd@arndb.de> (raw)
In-Reply-To: <1300997125-2896-1-git-send-email-jic23@cam.ac.uk>

On Thursday 24 March 2011, Jonathan Cameron wrote:
> Advantages I can see from this experiement
> 
> 1) Simple drivers are more consise.
> 2) It is infact possible to do this for a lot of cases (I had
> my doubts ;)
> 3) It gives us many of the rigid constraints that the many
>    attribute macros now handle in a nice clean form.

Very nice!

> Disadvantages:
> 
> 1) The core code is rather more complex than I'd like.

Yes, but I think not overly so. Moving complexity from the drivers
into the core should almost always be worth it in the long run.

Remember that people who write the drivers should not need to
worry about many of the complexities of kernel hacking, such
as sysfs attributes or character devices. The more of that you
can do in the core, the less work you have helping your downstream
developers.

> 2) There are cases I haven't yet worked out how to handle properly
>    - for example, our lis3l02dq used to output accel_mag_value
>    as the threshold value is shared across all high and low threshold
>    interrupts.  Right now I have no way of specifying this level
>    of control for the events lines.
>    Also the use of shared event handlers is clunky to say the least.
>    This may go away when we rethink the event system though.

I think reworking the way that event buffers work is quite
central here, although mostly orthogonal to the rework of the
internal API.

> 3) Putting hard requirements on numeric formatting of some
>    parameters is a pain. If nothing else I need to write a fixed point
>    input function.

Yes, but at least you only need to write it once ;-)

> p.s. Despite Arnd's original thread going to lkml I've kept this
> on list for now (+ Arnd of course!) because I want to pin it down
> a bit more before throwing it out more generally. 

Fair enough.

	Arnd

  parent reply	other threads:[~2011-03-25 15:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-24 20:05 [RFC PATCH 0/3] Experimenting with channel specification structures Jonathan Cameron
2011-03-24 20:05 ` [PATCH 1/3] staging:iio: allow channels to be set up using a table of iio_channel_spec structures Jonathan Cameron
2011-03-25 14:37   ` Arnd Bergmann
2011-03-25 15:15     ` Jonathan Cameron
2011-03-25 15:26       ` Arnd Bergmann
2011-03-24 20:05 ` [PATCH 2/3] staging:iio:lis3l02dq - experimental move to new channel_spec approach Jonathan Cameron
2011-03-25 14:26   ` Arnd Bergmann
2011-03-25 15:38     ` Jonathan Cameron
2011-03-25 16:02       ` Arnd Bergmann
2011-03-24 20:05 ` [PATCH 3/3] staging:iio:max1363 - experimental move to channel_spec registration Jonathan Cameron
2011-03-25 15:03 ` Arnd Bergmann [this message]
2011-03-25 15:19   ` [RFC PATCH 0/3] Experimenting with channel specification structures Jonathan Cameron

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=201103251603.58220.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=jic23@cam.ac.uk \
    --cc=linux-iio@vger.kernel.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.