All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Paul Thomas <pthomas8589@gmail.com>
Cc: lm-sensors@lm-sensors.org,
	"device-drivers-devel@blackfin.uclinux.org"
	<device-drivers-devel@blackfin.uclinux.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH] iio: add support for Analog Devices ad7194 a/d converter
Date: Mon, 18 Jul 2011 17:11:53 +0100	[thread overview]
Message-ID: <4E245B49.90004@cam.ac.uk> (raw)
In-Reply-To: <CAD56B7d+rixhKSoHJ4zcKhT6xMUUZZPERoOzSO74q6ZrHS7-Sg@mail.gmail.com>

On 07/18/11 17:03, Paul Thomas wrote:
> On Mon, Jul 18, 2011 at 5:24 AM, Jonathan Cameron <jic23@cam.ac.uk> wrote:
>> On 07/18/11 12:01, Jonathan Cameron wrote:
>>> cc'ing linux-iio and AD's driver list.
>>>
>>> Any particular reason for posting to lm-sensors? Now it's there we'll
>>> keep them in the list though as someone might be interested.
>>>
>>> On 07/18/11 08:46, Paul Thomas wrote:
>>>> This uses the iio sysfs interface, and inculdes gain and differential settings
>>
>> Hi Paul,
>>
>> This driver is lagging somewhat in interface terms. Having said that, it applies
>> and compiles fine which will make catching up to current point much easier.
>>
>> If you are short on time I'm happy to do the conversion (as it is a nice simple
>> driver), but obviously I'll need to test it to find out what I messed up this
>> time.
>>
>> Big issues:
>>
>> 1) iio_dev->dev_data is going away, so please use the iio_priv stuff.
>> 2) interface is not terribly close the abi spec.
>> 3) use chan_spec based registration. Actually that'll clean up the abi
>> issues as well and give you much shorter code.
>> 4) differential channels are treated as separate channels (with appropriate
>> numbering).  This is easy here as there are no nasty constraints on channel
>> combinations (it only reads one at a time anyway!).
>>
>> Various nitpicks inline.  Though the above seems like a lot, you have done
>> all the fiddly stuff about actually talking the the chips. Cleaning up
>> interfaces is relatively straight forward!  Lots of fun stuff to add to this
>> chip at a later date, but in the spirit of your driver, lets keep it simple
>> for now!
>>
>> As long as you are happy to do a couple of rounds of testing, we could merge
>> this as is and do the abi work as a series of small steps on top of it?
>>
>> Thanks,
>>
>> Jonathan
> 
> Hi Jonathan, I'd be happy to do the fixing. Is there an existing
> multi-channel driver that might be helpful to reference here?
> 
Cool.

Lots of suitable drivers to copy.  Max1363 is my standard adc and that
driver is reasonably fully featured. I think most of the ADI drivers
are mostly unipolar only, but a quick grep tells me the ad7793 has
a mixture of differential an unipolar.

max1363 is probably the closest to what you have here in that it supports
the same range of combinations of inputs.

Jonathan

WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Paul Thomas <pthomas8589@gmail.com>
Cc: lm-sensors@lm-sensors.org,
	"device-drivers-devel@blackfin.uclinux.org"
	<device-drivers-devel@blackfin.uclinux.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [lm-sensors] [PATCH] iio: add support for Analog Devices ad7194
Date: Mon, 18 Jul 2011 16:11:53 +0000	[thread overview]
Message-ID: <4E245B49.90004@cam.ac.uk> (raw)
In-Reply-To: <CAD56B7d+rixhKSoHJ4zcKhT6xMUUZZPERoOzSO74q6ZrHS7-Sg@mail.gmail.com>

On 07/18/11 17:03, Paul Thomas wrote:
> On Mon, Jul 18, 2011 at 5:24 AM, Jonathan Cameron <jic23@cam.ac.uk> wrote:
>> On 07/18/11 12:01, Jonathan Cameron wrote:
>>> cc'ing linux-iio and AD's driver list.
>>>
>>> Any particular reason for posting to lm-sensors? Now it's there we'll
>>> keep them in the list though as someone might be interested.
>>>
>>> On 07/18/11 08:46, Paul Thomas wrote:
>>>> This uses the iio sysfs interface, and inculdes gain and differential settings
>>
>> Hi Paul,
>>
>> This driver is lagging somewhat in interface terms. Having said that, it applies
>> and compiles fine which will make catching up to current point much easier.
>>
>> If you are short on time I'm happy to do the conversion (as it is a nice simple
>> driver), but obviously I'll need to test it to find out what I messed up this
>> time.
>>
>> Big issues:
>>
>> 1) iio_dev->dev_data is going away, so please use the iio_priv stuff.
>> 2) interface is not terribly close the abi spec.
>> 3) use chan_spec based registration. Actually that'll clean up the abi
>> issues as well and give you much shorter code.
>> 4) differential channels are treated as separate channels (with appropriate
>> numbering).  This is easy here as there are no nasty constraints on channel
>> combinations (it only reads one at a time anyway!).
>>
>> Various nitpicks inline.  Though the above seems like a lot, you have done
>> all the fiddly stuff about actually talking the the chips. Cleaning up
>> interfaces is relatively straight forward!  Lots of fun stuff to add to this
>> chip at a later date, but in the spirit of your driver, lets keep it simple
>> for now!
>>
>> As long as you are happy to do a couple of rounds of testing, we could merge
>> this as is and do the abi work as a series of small steps on top of it?
>>
>> Thanks,
>>
>> Jonathan
> 
> Hi Jonathan, I'd be happy to do the fixing. Is there an existing
> multi-channel driver that might be helpful to reference here?
> 
Cool.

Lots of suitable drivers to copy.  Max1363 is my standard adc and that
driver is reasonably fully featured. I think most of the ADI drivers
are mostly unipolar only, but a quick grep tells me the ad7793 has
a mixture of differential an unipolar.

max1363 is probably the closest to what you have here in that it supports
the same range of combinations of inputs.

Jonathan

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  reply	other threads:[~2011-07-18 16:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18  7:46 [lm-sensors] [PATCH] iio: add support for Analog Devices ad7194 a/d Paul Thomas
2011-07-18 11:01 ` [PATCH] iio: add support for Analog Devices ad7194 a/d converter Jonathan Cameron
2011-07-18 11:01   ` [lm-sensors] [PATCH] iio: add support for Analog Devices ad7194 Jonathan Cameron
2011-07-18 12:24   ` [PATCH] iio: add support for Analog Devices ad7194 a/d converter Jonathan Cameron
2011-07-18 12:24     ` [lm-sensors] [PATCH] iio: add support for Analog Devices ad7194 Jonathan Cameron
2011-07-18 16:03     ` [PATCH] iio: add support for Analog Devices ad7194 a/d converter Paul Thomas
2011-07-18 16:03       ` [lm-sensors] [PATCH] iio: add support for Analog Devices ad7194 Paul Thomas
2011-07-18 16:11       ` Jonathan Cameron [this message]
2011-07-18 16:11         ` Jonathan Cameron
2011-07-18 17:11     ` [PATCH] iio: add support for Analog Devices ad7194 a/d converter Paul Thomas
2011-07-18 17:11       ` [lm-sensors] [PATCH] iio: add support for Analog Devices ad7194 Paul Thomas
2011-07-18 21:45 ` 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=4E245B49.90004@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=pthomas8589@gmail.com \
    /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.