linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lars@metafoo.de (Lars-Peter Clausen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/15] mfd: add new driver for Sharp LoCoMo
Date: Wed, 05 Nov 2014 21:32:37 +0100	[thread overview]
Message-ID: <545A8965.2010406@metafoo.de> (raw)
In-Reply-To: <CALT56yM8B3ffYb0=EZVbRRGDZSxMci2sRp9XVtjQuLa5abN+cg@mail.gmail.com>

On 11/05/2014 09:02 PM, Dmitry Eremin-Solenikov wrote:
> 2014-11-03 16:41 GMT+03:00 Linus Walleij <linus.walleij@linaro.org>:
>> On Fri, Oct 31, 2014 at 10:54 AM, Dmitry Eremin-Solenikov
>> <dbaryshkov@gmail.com> wrote:
>>> 2014-10-31 10:42 GMT+03:00 Linus Walleij <linus.walleij@linaro.org>:
>>
>>>> It seems some DAC handling is part of the MFD driver, and we recently
>>>> discussed that MFD should not be doing misc stuff but mainly act as
>>>> arbiter and switching station.
>>>>
>>>> Can you please move the DAC parts of the driver to
>>>> drivers/iio/dac?
>>>>
>>>> The IIO DAC subsystem will likely add other goodies to
>>>> the driver for free and give a nice API to consumers.
>>>
>>> I wanted this part to be as simple as possible. I will look into IIO
>>> DAC subsystem.
>>> The DAC is as simple 2 channel 8-bit i2c device connected to a separate i2c bus
>>> controlled through a register in LoCoMo device. One channel is used
>>> for backlight,
>>> other will be used for volume control. So (in theory) I can add the
>>> following device
>>> chain:  locomo -> i2c-locomo -> m62332 -> IIO DAC client.  However isn't that
>>> quite an overkill for just backlight & volume control? Please advice me on this.
>>
>> The point is still the same: no unrelated code in drivers/mfd,
>> then either use IIO DAC as a middle layer or sink the DAC handling
>> into respective subdriver, i.e. push it into the backlight or
>> volume directly then.
>
> The problem is that the DAC is equally used by backlight and by sound
> device (WIP).

That shouldn't be a problem. The IIO API allows different consumers to 
request different channels of a converter. You can write a generic IIO based 
backlight driver and a generic IIO based volume control driver. This makes 
it possible to re-use them in other circuits with other DACs but the same 
application.

> What about true i2c device driver sitting in drivers/misc and exporting a regmap
> of 2 8-bit registers?

If it is a generic DAC it should go into drivers/iio/, this will allow code 
sharing and code re-usability. Given the simplicity of the DAC there might 
even be other existing drivers that can be used to control it.

- Lars

  parent reply	other threads:[~2014-11-05 20:32 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-28  0:01 [PATCH 00/15] new locomo driver Dmitry Eremin-Solenikov
2014-10-28  0:01 ` [PATCH 01/15] mfd: add new driver for Sharp LoCoMo Dmitry Eremin-Solenikov
2014-10-31  7:42   ` Linus Walleij
2014-10-31  9:54     ` Dmitry Eremin-Solenikov
2014-11-03 13:41       ` Linus Walleij
2014-11-05 20:02         ` Dmitry Eremin-Solenikov
2014-11-05 20:24           ` Mark Brown
2014-11-14 12:47             ` Dmitry Eremin-Solenikov
2014-11-14 15:10               ` Mark Brown
2014-11-14 15:30                 ` Dmitry Eremin-Solenikov
2014-11-05 20:32           ` Lars-Peter Clausen [this message]
2014-11-05 20:42             ` Lars-Peter Clausen
2014-10-28  0:01 ` [PATCH 02/15] GPIO: port LoCoMo gpio support from old driver Dmitry Eremin-Solenikov
2014-10-31  7:48   ` Linus Walleij
2014-10-31  9:39     ` Dmitry Eremin-Solenikov
2014-11-03 13:43       ` Linus Walleij
2014-11-05 21:33         ` Dmitry Eremin-Solenikov
2014-11-06  6:03           ` Mark Brown
2014-11-11 13:16             ` Dmitry Eremin-Solenikov
2014-11-11 13:23               ` Mark Brown
2014-11-14 10:11               ` Linus Walleij
2014-11-14 12:48                 ` Dmitry Eremin-Solenikov
2014-10-28  0:01 ` [PATCH 03/15] leds: port locomo leds driver to new locomo core Dmitry Eremin-Solenikov
2014-10-28  0:01 ` [PATCH 04/15] input: convert LoCoMo keyboard driver to use " Dmitry Eremin-Solenikov
2014-10-28  0:09   ` Dmitry Torokhov
2014-10-28  0:01 ` [PATCH 05/15] video: backlight: add new locomo backlight driver Dmitry Eremin-Solenikov
2014-10-28  0:24   ` Jingoo Han
2014-10-28  0:01 ` [PATCH 06/15] video: lcd: add LoCoMo LCD driver Dmitry Eremin-Solenikov
2014-10-28  0:30   ` Jingoo Han
2014-10-28 16:47     ` Dmitry Eremin-Solenikov
2014-10-28  0:02 ` [PATCH 07/15] video: backlight: drop old locomo bl/lcd driver Dmitry Eremin-Solenikov
2014-10-28  0:02 ` [PATCH 08/15] ARM: sa1100: make collie use new locomo drivers Dmitry Eremin-Solenikov
2014-10-28  0:02 ` [PATCH 09/15] ARM: sa1100: don't preallocate IRQ space for locomo Dmitry Eremin-Solenikov
2014-10-31  7:50   ` Linus Walleij
2014-10-31  9:33     ` Dmitry Eremin-Solenikov
2014-10-28  0:02 ` [PATCH 10/15] ARM: pxa: poodle: use new LoCoMo driver Dmitry Eremin-Solenikov
2014-10-28  0:02 ` [PATCH 11/15] sound: soc: poodle: make use of new locomo GPIO interface Dmitry Eremin-Solenikov
2014-10-28 14:58   ` Mark Brown
2014-10-28 16:45     ` Dmitry Eremin-Solenikov
2014-10-29  3:03     ` Alexandre Courbot
2014-10-31  9:52       ` Linus Walleij
2014-10-31  9:58         ` Dmitry Eremin-Solenikov
2014-11-01  5:42           ` Alexandre Courbot
2014-10-28  0:02 ` [PATCH 12/15] ARM: pxa: poodle: don't preallocate IRQ space for locomo Dmitry Eremin-Solenikov
2014-10-28 19:13   ` Robert Jarzmik
2014-10-28  0:02 ` [PATCH 13/15] ARM: drop old LoCoMo driver Dmitry Eremin-Solenikov
2014-10-28  0:02 ` [PATCH 14/15] gpio: locomo: implement per-pin irq handling Dmitry Eremin-Solenikov
2014-10-31  8:00   ` Linus Walleij
2014-10-31  9:35     ` Dmitry Eremin-Solenikov
2014-10-28  0:02 ` [PATCH 15/15] spi: add locomo SPI driver Dmitry Eremin-Solenikov
2014-10-28 11:03   ` Mark Brown
2014-10-28  0:13 ` [PATCH 00/15] new locomo driver Russell King - ARM Linux
2014-10-28  0:28   ` Dmitry Eremin-Solenikov
2014-10-28  0:29   ` Mark Brown
2014-10-29 18:56   ` Dmitry Eremin-Solenikov
2014-10-29 22:32     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=545A8965.2010406@metafoo.de \
    --to=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).