[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120726115055.GD3099@opensource.wolfsonmicro.com>
Date: Thu, 26 Jul 2012 12:50:55 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Lee Jones <lee.jones@...aro.org>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
STEricsson_nomadik_linux@...t.st.com, linus.walleij@...ricsson.com,
arnd@...db.de, sameo@...ux.intel.com, olalilja@...oo.se,
ola.o.lilja@...ricsson.com, alsa-devel@...a-project.org, lrg@...com
Subject: Re: [PATCH 20/21] ASoC: codecs: Enable AB8500 CODEC for Device Tree
On Thu, Jul 26, 2012 at 11:28:53AM +0100, Lee Jones wrote:
> drivers/mfd/ab8500-core.c | 1 +
> include/linux/mfd/abx500/ab8500-codec.h | 6 ++-
> sound/soc/codecs/ab8500-codec.c | 79 +++++++++++++++++++++++++++++++
> 3 files changed, 84 insertions(+), 2 deletions(-)
Yet again no binding documentation....
> {
> .name = "ab8500-codec",
> + .of_compatible = "stericsson,ab8500-codec",
> },
Why are we doing this? The MFD cells are a totally Linux specific
thing, there's no reason to represent them in the device tree unless
they're in some way reusable and the "ab8500-codec" name suggests that's
unlikely. Just put the properties on the parent node and instantiate
the MFD cell as normal.
> + /* Has a non-standard Vamic been requested? */
> + if(of_get_property(np, "stericsson,amic1a-bias-vamic2", NULL))
Coding style.
> + if (!of_property_read_u32(np, "stericsson,earpeice-cmv", &value)) {
> + switch (value) {
> + case 950 :
> + codec->ear_cmv = EAR_CMV_0_95V;
> + break;
> + case 1100 :
> + codec->ear_cmv = EAR_CMV_1_10V;
> + break;
> + case 1270 :
> + codec->ear_cmv = EAR_CMV_1_27V;
> + break;
> + case 1580 :
> + codec->ear_cmv = EAR_CMV_1_58V;
> + break;
> + default :
> + codec->ear_cmv = EAR_CMV_UNKNOWN;
> + dev_err(dev, "Unsuitable earpiece voltage found in DT\n");
The platform data code picks a default, can't the DT code do the same?
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists