All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH v3 1/1] Add Microchip MCP3422/3/4 High resolution ADC
Date: Thu, 15 Aug 2013 11:29:44 +0100	[thread overview]
Message-ID: <520CAD98.6090405@kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.01.1308151104040.29956@pmeerw.net>

On 08/15/13 10:09, Peter Meerwald wrote:
> Hi,
> 
>> This revision solves various problems of the previous one.
>> Most important is locking of the chip configuration during updates
>> and the use of devm_* API.
>> For each channel there are now two sysfs attributes, so you can read
>> the raw value or the scaled one.
>>
>> To Peter: Chip versions differs in address assignment (MCP3422 has a fixed address)
>> and channel number (MCP3423 has 2 channels, MCP3424 has 4) but the chip manages
>> internally the lack of channels (it remaps non exixtent channels to the existent ones)
>> so I opted to keep the driver clean and implemented all the four channels.
> 
> looks a whole lot better!
> 
> regarding chip ids and channels: many ADC drivers create the number of 
> channels dynamically, I'd rather implement this
> 
> having different chips in mcp3422_id but not using it is confusing to me
> 
Given there are only 3 options, I'd do this as picking between 3 different static
arrays rather than actually allocating them dynamically. That way it is obvious
what is going on and only costs a tiny bit of static const data.

> regards, p.
> 

  reply	other threads:[~2013-08-15  9:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14 17:08 [PATCH v3 1/1] Add Microchip MCP3422/3/4 High resolution ADC Angelo Compagnucci
2013-08-15  9:09 ` Peter Meerwald
2013-08-15 10:29   ` Jonathan Cameron [this message]
2013-08-15 10:53 ` 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=520CAD98.6090405@kernel.org \
    --to=jic23@kernel.org \
    --cc=angelo.compagnucci@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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.