summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tpa6130a2.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-08-30 14:39:52 +0300
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-21 16:07:40 +0100
commit07441006b2a1df0478bb7bdafd9dcd578898f2d4 (patch)
tree9e4ecc1d410e0d7b6d49aec023598a4e430895aa /sound/soc/codecs/tpa6130a2.c
parent17841020e9d3dbd4e8114c2142c2bc6d45c01da1 (diff)
downloadtalos-obmc-linux-07441006b2a1df0478bb7bdafd9dcd578898f2d4.tar.gz
talos-obmc-linux-07441006b2a1df0478bb7bdafd9dcd578898f2d4.zip
ASoC: tpa6130a2: Model support cleanup
Use the device name and driver_data to identify the TPA model supported by the driver. Board files should use either "tpa6130a2" or "tpa6140a2" as device name to specify the model in used on the specific board. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/tpa6130a2.c')
-rw-r--r--sound/soc/codecs/tpa6130a2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c
index b2572c451c35..a14689be700a 100644
--- a/sound/soc/codecs/tpa6130a2.c
+++ b/sound/soc/codecs/tpa6130a2.c
@@ -383,7 +383,7 @@ static int __devinit tpa6130a2_probe(struct i2c_client *client,
pdata = client->dev.platform_data;
data->power_gpio = pdata->power_gpio;
- data->id = pdata->id;
+ data->id = id->driver_data;
mutex_init(&data->mutex);
@@ -405,7 +405,7 @@ static int __devinit tpa6130a2_probe(struct i2c_client *client,
switch (data->id) {
default:
dev_warn(dev, "Unknown TPA model (%d). Assuming 6130A2\n",
- pdata->id);
+ data->id);
case TPA6130A2:
regulator = "Vdd";
break;
@@ -469,7 +469,8 @@ static int __devexit tpa6130a2_remove(struct i2c_client *client)
}
static const struct i2c_device_id tpa6130a2_id[] = {
- { "tpa6130a2", 0 },
+ { "tpa6130a2", TPA6130A2 },
+ { "tpa6140a2", TPA6140A2 },
{ }
};
MODULE_DEVICE_TABLE(i2c, tpa6130a2_id);
OpenPOWER on IntegriCloud