Add driver for MCP45HV51 (digital potentiometer)
Dear,
I want to integrate MCP45HV51 I2C device to Linux kernel. It is a digital potentiometer. I have several questions:
- Is "leds driver" the correct section ?
- On which existing I2C leds driver should I base my code to use the most recent API/pratice ?
- Maybe it is not needed to write a C driver and everything can be done via devicetree ?
Thank you for your help.
Best regards,
Gaëtan.
Hi!
Quoted 8 lines
I want to integrate MCP45HV51 I2C device to Linux kernel. It is a digital potentiometer.
I have several questions:
- Is "leds driver" the correct section ?
- On which existing I2C leds driver should I base my code to use the most recent API/pratice ?
- Maybe it is not needed to write a C driver and everything can be done via devicetree ?
Umm. What makes you think that LED driver is correct section? LEDs are little lights...
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi Pavel,
Quoted 11 lines · Pavel Machek
Hi!
Quoted 8 lines
I want to integrate MCP45HV51 I2C device to Linux kernel. It is a digital potentiometer.
I have several questions:
- Is "leds driver" the correct section ?
- On which existing I2C leds driver should I base my code to use the most recent API/pratice ?
- Maybe it is not needed to write a C driver and everything can be done via devicetree ?
Quoted 5 lines
Umm. What makes you think that LED driver is correct section? LEDs are little lights...
Pavel
I know that, but like Led and Backlight, digital potentiometers are just a device that needs a 0 to 255 value... So I don't know where to put it maybe in IIO driver ?
Best regards,
Gaëtan.
Quoted 13 lines · Gaëtan Carlier
Hi Pavel,
Quoted 11 lines · Pavel Machek
Hi!
Quoted 8 lines
I want to integrate MCP45HV51 I2C device to Linux kernel. It is a digital potentiometer.
I have several questions:
- Is "leds driver" the correct section ?
- On which existing I2C leds driver should I base my code to use the most recent API/pratice ?
- Maybe it is not needed to write a C driver and everything can be done via devicetree ?
Quoted 6 lines
Quoted 2 lines
Umm. What makes you think that LED driver is correct section? LEDs are little lights...
I know that, but like Led and Backlight, digital potentiometers are just a device that needs a 0 to 255 value...
So I don't know where to put it maybe in IIO driver ?
Is that _output_ device? What does it control?
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 17 lines · Pavel Machek
Quoted 16 lines · Gaëtan Carlier
Hi Pavel,
Quoted 13 lines · Pavel Machek
Hi!
Quoted 8 lines
I want to integrate MCP45HV51 I2C device to Linux kernel. It is a digital potentiometer.
I have several questions:
- Is "leds driver" the correct section ?
- On which existing I2C leds driver should I base my code to use the most recent API/pratice ?
- Maybe it is not needed to write a C driver and everything can be done via devicetree ?Umm. What makes you think that LED driver is correct section? LEDs are little lights...
Quoted 8 lines
Quoted 3 lines
I know that, but like Led and Backlight, digital potentiometers are just a device that needs a 0 to 255 value...
So I don't know where to put it maybe in IIO driver ?Is that _output_ device? What does it control?
Pavel
It is an output with a variable resistance (like DAC is an output with a variable voltage).[1] So regarding the webpage of IIO[2], digital potentiometer must be coded on IIO API.
Thank you taking time to answer me,
Gaëtan.
[1] https://en.wikipedia.org/wiki/Digital_potentiometer
[2] https://wiki.analog.com/software/linux/docs/iio/iio
Quoted 32 lines · Gaëtan Carlier
Quoted 19 lines · Pavel Machek
Quoted 18 lines · Gaëtan Carlier
Hi Pavel,
Quoted 15 lines · Pavel Machek
Hi!
Quoted 10 lines
I want to integrate MCP45HV51 I2C device to Linux kernel. It is a digital potentiometer.
I have several questions:
- Is "leds driver" the correct section ?
- On which existing I2C leds driver should I base my code to use the most
recent API/pratice ?
- Maybe it is not needed to write a C driver and everything can be done via
devicetree ?Umm. What makes you think that LED driver is correct section? LEDs are little lights...
Quoted 8 lines
Quoted 3 lines
I know that, but like Led and Backlight, digital potentiometers are just a device that needs a 0 to 255 value...
So I don't know where to put it maybe in IIO driver ?Is that _output_ device? What does it control?
Pavel
It is an output with a variable resistance (like DAC is an output with a variable voltage).[1] So regarding the webpage of IIO[2], digital potentiometer must be coded on IIO API.
Quoted 6 lines
Thank you taking time to answer me,
Gaëtan.[1] https://en.wikipedia.org/wiki/Digital_potentiometer
[2] https://wiki.analog.com/software/linux/docs/iio/iio
After a deeper search on a recent branch, potentiometer are already handled in IIO layer :D
Hi!
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Is that _output_ device? What does it control?
Pavel
It is an output with a variable resistance (like DAC is an output with a variable voltage).[1]
So regarding the webpage of IIO[2], digital potentiometer must be coded on IIO API.
Well.. you could argue soundcard is DAC with variable output voltage, too.
In kernel, we group devices according to the function, not hw implementation.
Anyway, go for IIO, its likely good match.
Quoted 4 lines
Quoted 2 lines
[1] https://en.wikipedia.org/wiki/Digital_potentiometer
[2] https://wiki.analog.com/software/linux/docs/iio/iioAfter a deeper search on a recent branch, potentiometer are already handled in IIO layer :D
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html