All of lore.kernel.org
 help / color / mirror / Atom feed
* Add driver for MCP45HV51 (digital potentiometer)
@ 2018-01-03 16:08 Gaëtan Carlier
  2018-01-03 17:56 ` Pavel Machek
  0 siblings, 1 reply; 7+ messages in thread
From: Gaëtan Carlier @ 2018-01-03 16:08 UTC (permalink / raw)
  To: linux-leds

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Add driver for MCP45HV51 (digital potentiometer)
  2018-01-03 16:08 Add driver for MCP45HV51 (digital potentiometer) Gaëtan Carlier
@ 2018-01-03 17:56 ` Pavel Machek
  2018-01-03 18:38   ` Gaëtan Carlier
  0 siblings, 1 reply; 7+ messages in thread
From: Pavel Machek @ 2018-01-03 17:56 UTC (permalink / raw)
  To: Gaëtan Carlier; +Cc: linux-leds

[-- Attachment #1: Type: text/plain, Size: 620 bytes --]

Hi!

> 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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Add driver for MCP45HV51 (digital potentiometer)
  2018-01-03 17:56 ` Pavel Machek
@ 2018-01-03 18:38   ` Gaëtan Carlier
  2018-01-03 19:00     ` Pavel Machek
  0 siblings, 1 reply; 7+ messages in thread
From: Gaëtan Carlier @ 2018-01-03 18:38 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-leds

Hi Pavel,
On 01/03/2018 06:56 PM, Pavel Machek wrote:
> Hi!
> 
>> 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
> 

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Add driver for MCP45HV51 (digital potentiometer)
  2018-01-03 18:38   ` Gaëtan Carlier
@ 2018-01-03 19:00     ` Pavel Machek
  2018-01-03 19:25       ` Gaëtan Carlier
  0 siblings, 1 reply; 7+ messages in thread
From: Pavel Machek @ 2018-01-03 19:00 UTC (permalink / raw)
  To: Gaëtan Carlier; +Cc: linux-leds

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]

On Wed 2018-01-03 19:38:31, Gaëtan Carlier wrote:
> Hi Pavel,
> On 01/03/2018 06:56 PM, Pavel Machek wrote:
> >Hi!
> >
> >>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...
> 
> 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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Add driver for MCP45HV51 (digital potentiometer)
  2018-01-03 19:00     ` Pavel Machek
@ 2018-01-03 19:25       ` Gaëtan Carlier
  2018-01-03 19:37         ` Gaëtan Carlier
  0 siblings, 1 reply; 7+ messages in thread
From: Gaëtan Carlier @ 2018-01-03 19:25 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-leds

On 01/03/2018 08:00 PM, Pavel Machek wrote:
> On Wed 2018-01-03 19:38:31, Gaëtan Carlier wrote:
>> Hi Pavel,
>> On 01/03/2018 06:56 PM, Pavel Machek wrote:
>>> Hi!
>>>
>>>> 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...
>>
>> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Add driver for MCP45HV51 (digital potentiometer)
  2018-01-03 19:25       ` Gaëtan Carlier
@ 2018-01-03 19:37         ` Gaëtan Carlier
  2018-01-03 20:02           ` Pavel Machek
  0 siblings, 1 reply; 7+ messages in thread
From: Gaëtan Carlier @ 2018-01-03 19:37 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-leds

On 01/03/2018 08:25 PM, Gaëtan Carlier wrote:
> On 01/03/2018 08:00 PM, Pavel Machek wrote:
>> On Wed 2018-01-03 19:38:31, Gaëtan Carlier wrote:
>>> Hi Pavel,
>>> On 01/03/2018 06:56 PM, Pavel Machek wrote:
>>>> Hi!
>>>>
>>>>> 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...
>>>
>>> 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
After a deeper search on a recent branch, potentiometer are already 
handled in IIO layer :D

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Add driver for MCP45HV51 (digital potentiometer)
  2018-01-03 19:37         ` Gaëtan Carlier
@ 2018-01-03 20:02           ` Pavel Machek
  0 siblings, 0 replies; 7+ messages in thread
From: Pavel Machek @ 2018-01-03 20:02 UTC (permalink / raw)
  To: Gaëtan Carlier; +Cc: linux-leds

[-- Attachment #1: Type: text/plain, Size: 903 bytes --]

Hi!

> >>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.


> >[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

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-01-03 20:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-03 16:08 Add driver for MCP45HV51 (digital potentiometer) Gaëtan Carlier
2018-01-03 17:56 ` Pavel Machek
2018-01-03 18:38   ` Gaëtan Carlier
2018-01-03 19:00     ` Pavel Machek
2018-01-03 19:25       ` Gaëtan Carlier
2018-01-03 19:37         ` Gaëtan Carlier
2018-01-03 20:02           ` Pavel Machek

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.