Re: [PATCH v3 1/1] Add Microchip MCP3422/3/4 High resolution ADC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux