blob: 81bf5848b7432672e3d935341e66581fc7a46bde [file] [log] [blame]
Peter Ujfalusi493b67e2009-10-09 15:55:41 +03001/*
2 * ALSA SoC Texas Instruments TPA6130A2 headset stereo amplifier driver
3 *
4 * Copyright (C) Nokia Corporation
5 *
Peter Ujfalusib4079ef2011-05-03 18:12:41 +03006 * Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
Peter Ujfalusi493b67e2009-10-09 15:55:41 +03007 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 */
22
23#include <linux/module.h>
24#include <linux/errno.h>
25#include <linux/device.h>
26#include <linux/i2c.h>
27#include <linux/gpio.h>
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +020028#include <linux/regulator/consumer.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090029#include <linux/slab.h>
Peter Ujfalusi493b67e2009-10-09 15:55:41 +030030#include <sound/tpa6130a2-plat.h>
31#include <sound/soc.h>
Peter Ujfalusi493b67e2009-10-09 15:55:41 +030032#include <sound/tlv.h>
Sachin Kamatee5e4532014-04-04 11:29:13 +053033#include <linux/of.h>
Sebastian Reichelf95a4882013-10-23 14:03:28 +020034#include <linux/of_gpio.h>
Helen Koikea0d5ff42016-06-20 14:12:30 -030035#include <linux/regmap.h>
Peter Ujfalusi493b67e2009-10-09 15:55:41 +030036
37#include "tpa6130a2.h"
38
Peter Ujfalusi0722d052011-08-30 14:39:54 +030039enum tpa_model {
40 TPA6130A2,
41 TPA6140A2,
42};
43
Mark Brownebab1b12009-10-09 19:13:47 +010044static struct i2c_client *tpa6130a2_client;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +030045
46/* This struct is used to save the context */
47struct tpa6130a2_data {
48 struct mutex mutex;
Helen Koikea0d5ff42016-06-20 14:12:30 -030049 struct regmap *regmap;
Jarkko Nikulaad8332c2010-05-19 10:52:28 +030050 struct regulator *supply;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +030051 int power_gpio;
Peter Ujfalusid5876ce2010-11-30 16:00:00 +020052 u8 power_state:1;
Peter Ujfalusie5e5b312010-05-04 11:08:18 +030053 enum tpa_model id;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +030054};
55
Peter Ujfalusid5876ce2010-11-30 16:00:00 +020056static int tpa6130a2_power(u8 power)
Peter Ujfalusi493b67e2009-10-09 15:55:41 +030057{
58 struct tpa6130a2_data *data;
Jarkko Nikula75e3f312010-11-03 16:39:00 +020059 int ret = 0;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +030060
Takashi Iwai773392b2013-11-05 18:39:51 +010061 if (WARN_ON(!tpa6130a2_client))
62 return -EINVAL;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +030063 data = i2c_get_clientdata(tpa6130a2_client);
64
65 mutex_lock(&data->mutex);
Peter Ujfalusid5876ce2010-11-30 16:00:00 +020066 if (power == data->power_state)
67 goto exit;
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +020068
Peter Ujfalusid5876ce2010-11-30 16:00:00 +020069 if (power) {
Jarkko Nikulaad8332c2010-05-19 10:52:28 +030070 ret = regulator_enable(data->supply);
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +020071 if (ret != 0) {
72 dev_err(&tpa6130a2_client->dev,
Jarkko Nikulaad8332c2010-05-19 10:52:28 +030073 "Failed to enable supply: %d\n", ret);
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +020074 goto exit;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +030075 }
Jarkko Nikula0656f6c2010-11-08 10:57:57 +020076 /* Power on */
77 if (data->power_gpio >= 0)
78 gpio_set_value(data->power_gpio, 1);
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +020079
80 data->power_state = 1;
Helen Koikea0d5ff42016-06-20 14:12:30 -030081 ret = regcache_sync(data->regmap);
Peter Ujfalusi872a64d2010-10-21 15:03:03 +030082 if (ret < 0) {
83 dev_err(&tpa6130a2_client->dev,
84 "Failed to initialize chip\n");
85 if (data->power_gpio >= 0)
86 gpio_set_value(data->power_gpio, 0);
87 regulator_disable(data->supply);
88 data->power_state = 0;
89 goto exit;
90 }
Peter Ujfalusid5876ce2010-11-30 16:00:00 +020091 } else {
Peter Ujfalusi493b67e2009-10-09 15:55:41 +030092 /* set SWS */
Helen Koikea0d5ff42016-06-20 14:12:30 -030093 regmap_update_bits(data->regmap, TPA6130A2_REG_CONTROL,
94 TPA6130A2_SWS, TPA6130A2_SWS);
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +020095
Peter Ujfalusi493b67e2009-10-09 15:55:41 +030096 /* Power off */
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +020097 if (data->power_gpio >= 0)
Peter Ujfalusi493b67e2009-10-09 15:55:41 +030098 gpio_set_value(data->power_gpio, 0);
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +020099
Jarkko Nikulaad8332c2010-05-19 10:52:28 +0300100 ret = regulator_disable(data->supply);
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200101 if (ret != 0) {
102 dev_err(&tpa6130a2_client->dev,
Jarkko Nikulaad8332c2010-05-19 10:52:28 +0300103 "Failed to disable supply: %d\n", ret);
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200104 goto exit;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300105 }
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200106
107 data->power_state = 0;
Helen Koikea0d5ff42016-06-20 14:12:30 -0300108 /* device regs does not match the cache state anymore */
109 regcache_mark_dirty(data->regmap);
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300110 }
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200111
112exit:
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300113 mutex_unlock(&data->mutex);
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200114 return ret;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300115}
116
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300117/*
118 * TPA6130 volume. From -59.5 to 4 dB with increasing step size when going
119 * down in gain.
120 */
Lars-Peter Clausen4e0e5f82015-08-02 17:19:55 +0200121static const DECLARE_TLV_DB_RANGE(tpa6130_tlv,
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300122 0, 1, TLV_DB_SCALE_ITEM(-5950, 600, 0),
123 2, 3, TLV_DB_SCALE_ITEM(-5000, 250, 0),
124 4, 5, TLV_DB_SCALE_ITEM(-4550, 160, 0),
125 6, 7, TLV_DB_SCALE_ITEM(-4140, 190, 0),
126 8, 9, TLV_DB_SCALE_ITEM(-3650, 120, 0),
127 10, 11, TLV_DB_SCALE_ITEM(-3330, 160, 0),
128 12, 13, TLV_DB_SCALE_ITEM(-3040, 180, 0),
129 14, 20, TLV_DB_SCALE_ITEM(-2710, 110, 0),
130 21, 37, TLV_DB_SCALE_ITEM(-1960, 74, 0),
Lars-Peter Clausen4e0e5f82015-08-02 17:19:55 +0200131 38, 63, TLV_DB_SCALE_ITEM(-720, 45, 0)
132);
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300133
134static const struct snd_kcontrol_new tpa6130a2_controls[] = {
Helen Koikee01d7002016-06-20 14:12:31 -0300135 SOC_SINGLE_TLV("Headphone Playback Volume",
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300136 TPA6130A2_REG_VOL_MUTE, 0, 0x3f, 0,
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300137 tpa6130_tlv),
138};
139
Lars-Peter Clausen4e0e5f82015-08-02 17:19:55 +0200140static const DECLARE_TLV_DB_RANGE(tpa6140_tlv,
Peter Ujfalusie5e5b312010-05-04 11:08:18 +0300141 0, 8, TLV_DB_SCALE_ITEM(-5900, 400, 0),
142 9, 16, TLV_DB_SCALE_ITEM(-2500, 200, 0),
Lars-Peter Clausen4e0e5f82015-08-02 17:19:55 +0200143 17, 31, TLV_DB_SCALE_ITEM(-1000, 100, 0)
144);
Peter Ujfalusie5e5b312010-05-04 11:08:18 +0300145
146static const struct snd_kcontrol_new tpa6140a2_controls[] = {
Helen Koikee01d7002016-06-20 14:12:31 -0300147 SOC_SINGLE_TLV("Headphone Playback Volume",
Peter Ujfalusi826e9622010-05-07 14:24:10 +0300148 TPA6130A2_REG_VOL_MUTE, 1, 0x1f, 0,
Peter Ujfalusi826e9622010-05-07 14:24:10 +0300149 tpa6140_tlv),
Peter Ujfalusie5e5b312010-05-04 11:08:18 +0300150};
151
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300152/*
153 * Enable or disable channel (left or right)
154 * The bit number for mute and amplifier are the same per channel:
155 * bit 6: Right channel
156 * bit 7: Left channel
157 * in both registers.
158 */
159static void tpa6130a2_channel_enable(u8 channel, int enable)
160{
Helen Koikea0d5ff42016-06-20 14:12:30 -0300161 struct tpa6130a2_data *data = i2c_get_clientdata(tpa6130a2_client);
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300162
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300163 if (enable) {
164 /* Enable channel */
165 /* Enable amplifier */
Helen Koikea0d5ff42016-06-20 14:12:30 -0300166 regmap_update_bits(data->regmap, TPA6130A2_REG_CONTROL,
167 channel | TPA6130A2_SWS, channel & ~TPA6130A2_SWS);
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300168
169 /* Unmute channel */
Helen Koikea0d5ff42016-06-20 14:12:30 -0300170 regmap_update_bits(data->regmap, TPA6130A2_REG_VOL_MUTE,
171 channel, 0);
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300172 } else {
173 /* Disable channel */
174 /* Mute channel */
Helen Koikea0d5ff42016-06-20 14:12:30 -0300175 regmap_update_bits(data->regmap, TPA6130A2_REG_VOL_MUTE,
176 channel, channel);
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300177
178 /* Disable amplifier */
Helen Koikea0d5ff42016-06-20 14:12:30 -0300179 regmap_update_bits(data->regmap, TPA6130A2_REG_CONTROL,
180 channel, 0);
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300181 }
182}
183
Peter Ujfalusi39646872010-12-02 09:29:56 +0200184int tpa6130a2_stereo_enable(struct snd_soc_codec *codec, int enable)
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300185{
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200186 int ret = 0;
Peter Ujfalusi39646872010-12-02 09:29:56 +0200187 if (enable) {
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200188 ret = tpa6130a2_power(1);
Peter Ujfalusi39646872010-12-02 09:29:56 +0200189 if (ret < 0)
190 return ret;
191 tpa6130a2_channel_enable(TPA6130A2_HP_EN_R | TPA6130A2_HP_EN_L,
192 1);
193 } else {
194 tpa6130a2_channel_enable(TPA6130A2_HP_EN_R | TPA6130A2_HP_EN_L,
195 0);
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200196 ret = tpa6130a2_power(0);
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300197 }
Peter Ujfalusi39646872010-12-02 09:29:56 +0200198
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200199 return ret;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300200}
Peter Ujfalusi39646872010-12-02 09:29:56 +0200201EXPORT_SYMBOL_GPL(tpa6130a2_stereo_enable);
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300202
Helen Koikecb7e6222016-06-20 14:12:29 -0300203static int tpa6130a2_component_probe(struct snd_soc_component *component)
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300204{
Helen Koikecb7e6222016-06-20 14:12:29 -0300205 struct tpa6130a2_data *data = snd_soc_component_get_drvdata(component);
Peter Ujfalusie5e5b312010-05-04 11:08:18 +0300206
Peter Ujfalusie5e5b312010-05-04 11:08:18 +0300207 if (data->id == TPA6140A2)
Helen Koikecb7e6222016-06-20 14:12:29 -0300208 return snd_soc_add_component_controls(component,
209 tpa6140a2_controls, ARRAY_SIZE(tpa6140a2_controls));
Peter Ujfalusie5e5b312010-05-04 11:08:18 +0300210 else
Helen Koikecb7e6222016-06-20 14:12:29 -0300211 return snd_soc_add_component_controls(component,
212 tpa6130a2_controls, ARRAY_SIZE(tpa6130a2_controls));
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300213}
Helen Koikecb7e6222016-06-20 14:12:29 -0300214
215struct snd_soc_component_driver tpa6130a2_component_driver = {
216 .name = "tpa6130a2",
217 .probe = tpa6130a2_component_probe,
218};
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300219
Helen Koikea0d5ff42016-06-20 14:12:30 -0300220static const struct reg_default tpa6130a2_reg_defaults[] = {
221 { TPA6130A2_REG_CONTROL, TPA6130A2_SWS },
222 { TPA6130A2_REG_VOL_MUTE, TPA6130A2_MUTE_R | TPA6130A2_MUTE_L },
223};
224
225static const struct regmap_config tpa6130a2_regmap_config = {
226 .reg_bits = 8,
227 .val_bits = 8,
228 .max_register = TPA6130A2_REG_VERSION,
229 .reg_defaults = tpa6130a2_reg_defaults,
230 .num_reg_defaults = ARRAY_SIZE(tpa6130a2_reg_defaults),
231 .cache_type = REGCACHE_RBTREE,
232};
233
Bill Pemberton7a79e942012-12-07 09:26:37 -0500234static int tpa6130a2_probe(struct i2c_client *client,
235 const struct i2c_device_id *id)
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300236{
237 struct device *dev;
238 struct tpa6130a2_data *data;
Sebastian Reichelf95a4882013-10-23 14:03:28 +0200239 struct tpa6130a2_platform_data *pdata = client->dev.platform_data;
240 struct device_node *np = client->dev.of_node;
Jarkko Nikulaad8332c2010-05-19 10:52:28 +0300241 const char *regulator;
Helen Koikea0d5ff42016-06-20 14:12:30 -0300242 unsigned int version;
Jarkko Nikulaad8332c2010-05-19 10:52:28 +0300243 int ret;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300244
245 dev = &client->dev;
246
Axel Lin6945e9f2011-12-29 12:12:29 +0800247 data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
Sachin Kamat656e3432014-06-20 15:29:02 +0530248 if (!data)
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300249 return -ENOMEM;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300250
Helen Koikea0d5ff42016-06-20 14:12:30 -0300251 data->regmap = devm_regmap_init_i2c(client, &tpa6130a2_regmap_config);
252 if (IS_ERR(data->regmap))
253 return PTR_ERR(data->regmap);
254
Sebastian Reichelf95a4882013-10-23 14:03:28 +0200255 if (pdata) {
256 data->power_gpio = pdata->power_gpio;
257 } else if (np) {
258 data->power_gpio = of_get_named_gpio(np, "power-gpio", 0);
259 } else {
260 dev_err(dev, "Platform data not set\n");
261 dump_stack();
262 return -ENODEV;
263 }
264
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300265 tpa6130a2_client = client;
266
267 i2c_set_clientdata(tpa6130a2_client, data);
268
Peter Ujfalusi07441002011-08-30 14:39:52 +0300269 data->id = id->driver_data;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300270
271 mutex_init(&data->mutex);
272
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300273 if (data->power_gpio >= 0) {
Sachin Kamatd06080c2012-12-07 16:32:26 +0530274 ret = devm_gpio_request(dev, data->power_gpio,
275 "tpa6130a2 enable");
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300276 if (ret < 0) {
277 dev_err(dev, "Failed to request power GPIO (%d)\n",
278 data->power_gpio);
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200279 goto err_gpio;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300280 }
281 gpio_direction_output(data->power_gpio, 0);
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300282 }
283
Peter Ujfalusie5e5b312010-05-04 11:08:18 +0300284 switch (data->id) {
Ilkka Koskinen21383012010-01-08 17:48:31 +0200285 default:
286 dev_warn(dev, "Unknown TPA model (%d). Assuming 6130A2\n",
Peter Ujfalusi07441002011-08-30 14:39:52 +0300287 data->id);
Jarkko Nikulaad8332c2010-05-19 10:52:28 +0300288 case TPA6130A2:
289 regulator = "Vdd";
290 break;
291 case TPA6140A2:
292 regulator = "AVdd";
293 break;
Ilkka Koskinen21383012010-01-08 17:48:31 +0200294 }
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200295
Sachin Kamatd06080c2012-12-07 16:32:26 +0530296 data->supply = devm_regulator_get(dev, regulator);
Jarkko Nikulaad8332c2010-05-19 10:52:28 +0300297 if (IS_ERR(data->supply)) {
298 ret = PTR_ERR(data->supply);
299 dev_err(dev, "Failed to request supply: %d\n", ret);
Sachin Kamatd06080c2012-12-07 16:32:26 +0530300 goto err_gpio;
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200301 }
302
303 ret = tpa6130a2_power(1);
304 if (ret != 0)
Sachin Kamatd06080c2012-12-07 16:32:26 +0530305 goto err_gpio;
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200306
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300307
308 /* Read version */
Helen Koikea0d5ff42016-06-20 14:12:30 -0300309 regmap_read(data->regmap, TPA6130A2_REG_VERSION, &version);
310 version &= TPA6130A2_VERSION_MASK;
311 if ((version != 1) && (version != 2))
312 dev_warn(dev, "UNTESTED version detected (%d)\n", version);
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300313
314 /* Disable the chip */
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200315 ret = tpa6130a2_power(0);
316 if (ret != 0)
Sachin Kamatd06080c2012-12-07 16:32:26 +0530317 goto err_gpio;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300318
Helen Koikecb7e6222016-06-20 14:12:29 -0300319 return devm_snd_soc_register_component(&client->dev,
320 &tpa6130a2_component_driver, NULL, 0);
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200321
Ilkka Koskinen7c4e6492009-12-09 12:05:50 +0200322err_gpio:
Mark Brownebab1b12009-10-09 19:13:47 +0100323 tpa6130a2_client = NULL;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300324
325 return ret;
326}
327
Bill Pemberton7a79e942012-12-07 09:26:37 -0500328static int tpa6130a2_remove(struct i2c_client *client)
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300329{
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300330 tpa6130a2_power(0);
Mark Brownebab1b12009-10-09 19:13:47 +0100331 tpa6130a2_client = NULL;
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300332
333 return 0;
334}
335
336static const struct i2c_device_id tpa6130a2_id[] = {
Peter Ujfalusi07441002011-08-30 14:39:52 +0300337 { "tpa6130a2", TPA6130A2 },
338 { "tpa6140a2", TPA6140A2 },
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300339 { }
340};
341MODULE_DEVICE_TABLE(i2c, tpa6130a2_id);
342
Sebastian Reichelf95a4882013-10-23 14:03:28 +0200343#if IS_ENABLED(CONFIG_OF)
344static const struct of_device_id tpa6130a2_of_match[] = {
345 { .compatible = "ti,tpa6130a2", },
346 { .compatible = "ti,tpa6140a2" },
347 {},
348};
349MODULE_DEVICE_TABLE(of, tpa6130a2_of_match);
350#endif
351
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300352static struct i2c_driver tpa6130a2_i2c_driver = {
353 .driver = {
354 .name = "tpa6130a2",
Sebastian Reichelf95a4882013-10-23 14:03:28 +0200355 .of_match_table = of_match_ptr(tpa6130a2_of_match),
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300356 },
357 .probe = tpa6130a2_probe,
Bill Pemberton7a79e942012-12-07 09:26:37 -0500358 .remove = tpa6130a2_remove,
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300359 .id_table = tpa6130a2_id,
360};
361
Sachin Kamatf062e2b2012-08-06 17:25:38 +0530362module_i2c_driver(tpa6130a2_i2c_driver);
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300363
Peter Ujfalusib4079ef2011-05-03 18:12:41 +0300364MODULE_AUTHOR("Peter Ujfalusi <peter.ujfalusi@ti.com>");
Peter Ujfalusi493b67e2009-10-09 15:55:41 +0300365MODULE_DESCRIPTION("TPA6130A2 Headphone amplifier driver");
366MODULE_LICENSE("GPL");