Re: Driver for Microchip digital potentiometers, v2

From: Lars-Peter Clausen
Date: Tue Sep 22 2015 - 04:16:22 EST


On 09/21/2015 11:18 PM, Peter Rosin wrote:
> From: Peter Rosin <peda@xxxxxxxxxx>
>
> Hi!
>
> This is a new attempt for a driver for these chips. It is a
> complete rewrite since the first version which was a dirty
> misc driver (plagiarized from another misc driver) that got
> shredded in review.

Yeah, we need to move the ad_dpot driver over to IIO at some point. The main
issue is that we need to retain the old ABI (at least optionally).

> I don't know if I should have added a new unit "ohms", or if
> it is ok to only provide "steps"? One could also imagine that
> a digital pot can be used to implement a DAC, or something
> else, so maybe the actual unit should be somehow configurable?

Steps are the steps you make with your feet, so that wouldn't be the right
thing here. The right channel type is resistance and the unit is Ohm. You
can use a dpot for a lot of things, e.g. a LED, that doesn't mean we should
have the option to expose this device as a LED device. If something uses the
rdac to implement another function that should be a separate driver being
registered to the rdac.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/