From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Eremin-Solenikov Subject: Re: [PATCH 01/15] mfd: add new driver for Sharp LoCoMo Date: Fri, 14 Nov 2014 16:47:00 +0400 Message-ID: References: <1414454528-24240-1-git-send-email-dbaryshkov@gmail.com> <1414454528-24240-2-git-send-email-dbaryshkov@gmail.com> <20141105202405.GJ8509@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Linus Walleij , "linux-arm-kernel@lists.infradead.org" , "linux-gpio@vger.kernel.org" , Linux Input , "linux-leds@vger.kernel.org" , "linux-spi@vger.kernel.org" , "linux-fbdev@vger.kernel.org" , "alsa-devel@alsa-project.org" , Andrea Adami , Russell King , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Alexandre Courbot , Dmitry Torokhov , Bryan Wu , Richard Purdie , Samuel Ortiz , Lee Jones To: Mark Brown Return-path: In-Reply-To: <20141105202405.GJ8509@sirena.org.uk> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-spi.vger.kernel.org Hello, 2014-11-05 23:24 GMT+03:00 Mark Brown : > On Thu, Nov 06, 2014 at 12:02:49AM +0400, Dmitry Eremin-Solenikov wrote: >> 2014-11-03 16:41 GMT+03:00 Linus Walleij : > >> > 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). >> What about true i2c device driver sitting in drivers/misc and exporting a regmap >> of 2 8-bit registers? > > If it can just export registers that sounds like a MFD. If it needs to > export functionality then like Linus says the IIO subsystem abstracts > DACs. I took a look at IIO subsystem. Thanks for the pointer. Indeed max517 driver can drive m62332 DAC with minimal modifications. However write support of the consumer interface is non-existing yet (which would be required to support DACs in unified manner). I'm actually looking at the regulator interface. Since this DAC serves mostly like a (semi-)constant voltage interface, would it be rather logical to use regulator subsystem to drive it? -- With best wishes Dmitry