Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1229759 > unrolled thread
| Started by | Peter Rosin <peda@lysator.liu.se> |
|---|---|
| First post | 2015-09-21 23:30 +0200 |
| Last post | 2015-09-22 10:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
Driver for Microchip digital potentiometers, v2 Peter Rosin <peda@lysator.liu.se> - 2015-09-21 23:30 +0200
Re: Driver for Microchip digital potentiometers, v2 Lars-Peter Clausen <lars@metafoo.de> - 2015-09-22 10:20 +0200
| From | Peter Rosin <peda@lysator.liu.se> |
|---|---|
| Date | 2015-09-21 23:30 +0200 |
| Subject | Driver for Microchip digital potentiometers, v2 |
| Message-ID | <qbgOS-1Me-39@gated-at.bofh.it> |
From: Peter Rosin <peda@axentia.se> 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. 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? On the other hand, all of that could in theory be handled later. Was it right to add the drivers/iio/pot directory? Should it have been drivers/iio/potentiometer? What about rheostats which are very similar? Anyway, I just wanted to say that I'm not attached to the naming. This is my first interaction with IIO, please bear with me. I have admittedly only tested the driver with a MCP4651 chip, but that one is the biggest in the family... Changes since v1: - Make it an IIO driver instead - Don't convolute the code with big obscure macros - Inline the bits from mcp4xxx_dpot.h that are actually used and drop that file - Better Changelog Cheers, Peter Peter Rosin (1): iio: mcp4xxx_dpot: Driver for Microchip digital potentiometers MAINTAINERS | 5 + drivers/iio/Kconfig | 1 + drivers/iio/Makefile | 1 + drivers/iio/pot/Kconfig | 20 ++++ drivers/iio/pot/Makefile | 6 ++ drivers/iio/pot/mcp4xxx_dpot.c | 218 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 251 insertions(+) create mode 100644 drivers/iio/pot/Kconfig create mode 100644 drivers/iio/pot/Makefile create mode 100644 drivers/iio/pot/mcp4xxx_dpot.c -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Lars-Peter Clausen <lars@metafoo.de> |
|---|---|
| Date | 2015-09-22 10:20 +0200 |
| Message-ID | <qbqXV-89s-27@gated-at.bofh.it> |
| In reply to | #1229759 |
On 09/21/2015 11:18 PM, Peter Rosin wrote: > From: Peter Rosin <peda@axentia.se> > > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web