tas5086.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. /*
  2. * TAS5086 ASoC codec driver
  3. *
  4. * Copyright (c) 2013 Daniel Mack <zonque@gmail.com>
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version 2
  9. * of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * TODO:
  17. * - implement DAPM and input muxing
  18. * - implement modulation limit
  19. * - implement non-default PWM start
  20. *
  21. * Note that this chip has a very unusual register layout, specifically
  22. * because the registers are of unequal size, and multi-byte registers
  23. * require bulk writes to take effect. Regmap does not support that kind
  24. * of devices.
  25. *
  26. * Currently, the driver does not touch any of the registers >= 0x20, so
  27. * it doesn't matter because the entire map can be accessed as 8-bit
  28. * array. In case more features will be added in the future
  29. * that require access to higher registers, the entire regmap H/W I/O
  30. * routines have to be open-coded.
  31. */
  32. #include <linux/module.h>
  33. #include <linux/slab.h>
  34. #include <linux/delay.h>
  35. #include <linux/gpio.h>
  36. #include <linux/i2c.h>
  37. #include <linux/regmap.h>
  38. #include <linux/spi/spi.h>
  39. #include <linux/of_device.h>
  40. #include <linux/of_gpio.h>
  41. #include <sound/pcm.h>
  42. #include <sound/pcm_params.h>
  43. #include <sound/soc.h>
  44. #include <sound/tlv.h>
  45. #include <sound/tas5086.h>
  46. #define TAS5086_PCM_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
  47. SNDRV_PCM_FMTBIT_S20_3LE | \
  48. SNDRV_PCM_FMTBIT_S24_3LE)
  49. #define TAS5086_PCM_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
  50. SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | \
  51. SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 | \
  52. SNDRV_PCM_RATE_192000)
  53. /*
  54. * TAS5086 registers
  55. */
  56. #define TAS5086_CLOCK_CONTROL 0x00 /* Clock control register */
  57. #define TAS5086_CLOCK_RATE(val) (val << 5)
  58. #define TAS5086_CLOCK_RATE_MASK (0x7 << 5)
  59. #define TAS5086_CLOCK_RATIO(val) (val << 2)
  60. #define TAS5086_CLOCK_RATIO_MASK (0x7 << 2)
  61. #define TAS5086_CLOCK_SCLK_RATIO_48 (1 << 1)
  62. #define TAS5086_CLOCK_VALID (1 << 0)
  63. #define TAS5086_DEEMPH_MASK 0x03
  64. #define TAS5086_SOFT_MUTE_ALL 0x3f
  65. #define TAS5086_DEV_ID 0x01 /* Device ID register */
  66. #define TAS5086_ERROR_STATUS 0x02 /* Error status register */
  67. #define TAS5086_SYS_CONTROL_1 0x03 /* System control register 1 */
  68. #define TAS5086_SERIAL_DATA_IF 0x04 /* Serial data interface register */
  69. #define TAS5086_SYS_CONTROL_2 0x05 /* System control register 2 */
  70. #define TAS5086_SOFT_MUTE 0x06 /* Soft mute register */
  71. #define TAS5086_MASTER_VOL 0x07 /* Master volume */
  72. #define TAS5086_CHANNEL_VOL(X) (0x08 + (X)) /* Channel 1-6 volume */
  73. #define TAS5086_VOLUME_CONTROL 0x09 /* Volume control register */
  74. #define TAS5086_MOD_LIMIT 0x10 /* Modulation limit register */
  75. #define TAS5086_PWM_START 0x18 /* PWM start register */
  76. #define TAS5086_SURROUND 0x19 /* Surround register */
  77. #define TAS5086_SPLIT_CAP_CHARGE 0x1a /* Split cap charge period register */
  78. #define TAS5086_OSC_TRIM 0x1b /* Oscillator trim register */
  79. #define TAS5086_BKNDERR 0x1c
  80. /*
  81. * Default TAS5086 power-up configuration
  82. */
  83. static const struct reg_default tas5086_reg_defaults[] = {
  84. { 0x00, 0x6c },
  85. { 0x01, 0x03 },
  86. { 0x02, 0x00 },
  87. { 0x03, 0xa0 },
  88. { 0x04, 0x05 },
  89. { 0x05, 0x60 },
  90. { 0x06, 0x00 },
  91. { 0x07, 0xff },
  92. { 0x08, 0x30 },
  93. { 0x09, 0x30 },
  94. { 0x0a, 0x30 },
  95. { 0x0b, 0x30 },
  96. { 0x0c, 0x30 },
  97. { 0x0d, 0x30 },
  98. { 0x0e, 0xb1 },
  99. { 0x0f, 0x00 },
  100. { 0x10, 0x02 },
  101. { 0x11, 0x00 },
  102. { 0x12, 0x00 },
  103. { 0x13, 0x00 },
  104. { 0x14, 0x00 },
  105. { 0x15, 0x00 },
  106. { 0x16, 0x00 },
  107. { 0x17, 0x00 },
  108. { 0x18, 0x3f },
  109. { 0x19, 0x00 },
  110. { 0x1a, 0x18 },
  111. { 0x1b, 0x82 },
  112. { 0x1c, 0x05 },
  113. };
  114. static bool tas5086_accessible_reg(struct device *dev, unsigned int reg)
  115. {
  116. return !((reg == 0x0f) || (reg >= 0x11 && reg <= 0x17));
  117. }
  118. static bool tas5086_volatile_reg(struct device *dev, unsigned int reg)
  119. {
  120. switch (reg) {
  121. case TAS5086_DEV_ID:
  122. case TAS5086_ERROR_STATUS:
  123. return true;
  124. }
  125. return false;
  126. }
  127. static bool tas5086_writeable_reg(struct device *dev, unsigned int reg)
  128. {
  129. return tas5086_accessible_reg(dev, reg) && (reg != TAS5086_DEV_ID);
  130. }
  131. struct tas5086_private {
  132. struct regmap *regmap;
  133. unsigned int mclk, sclk;
  134. unsigned int format;
  135. bool deemph;
  136. /* Current sample rate for de-emphasis control */
  137. int rate;
  138. /* GPIO driving Reset pin, if any */
  139. int gpio_nreset;
  140. };
  141. static int tas5086_deemph[] = { 0, 32000, 44100, 48000 };
  142. static int tas5086_set_deemph(struct snd_soc_codec *codec)
  143. {
  144. struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
  145. int i, val = 0;
  146. if (priv->deemph)
  147. for (i = 0; i < ARRAY_SIZE(tas5086_deemph); i++)
  148. if (tas5086_deemph[i] == priv->rate)
  149. val = i;
  150. return regmap_update_bits(priv->regmap, TAS5086_SYS_CONTROL_1,
  151. TAS5086_DEEMPH_MASK, val);
  152. }
  153. static int tas5086_get_deemph(struct snd_kcontrol *kcontrol,
  154. struct snd_ctl_elem_value *ucontrol)
  155. {
  156. struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
  157. struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
  158. ucontrol->value.enumerated.item[0] = priv->deemph;
  159. return 0;
  160. }
  161. static int tas5086_put_deemph(struct snd_kcontrol *kcontrol,
  162. struct snd_ctl_elem_value *ucontrol)
  163. {
  164. struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
  165. struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
  166. priv->deemph = ucontrol->value.enumerated.item[0];
  167. return tas5086_set_deemph(codec);
  168. }
  169. static int tas5086_set_dai_sysclk(struct snd_soc_dai *codec_dai,
  170. int clk_id, unsigned int freq, int dir)
  171. {
  172. struct snd_soc_codec *codec = codec_dai->codec;
  173. struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
  174. switch (clk_id) {
  175. case TAS5086_CLK_IDX_MCLK:
  176. priv->mclk = freq;
  177. break;
  178. case TAS5086_CLK_IDX_SCLK:
  179. priv->sclk = freq;
  180. break;
  181. }
  182. return 0;
  183. }
  184. static int tas5086_set_dai_fmt(struct snd_soc_dai *codec_dai,
  185. unsigned int format)
  186. {
  187. struct snd_soc_codec *codec = codec_dai->codec;
  188. struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
  189. /* The TAS5086 can only be slave to all clocks */
  190. if ((format & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS) {
  191. dev_err(codec->dev, "Invalid clocking mode\n");
  192. return -EINVAL;
  193. }
  194. /* we need to refer to the data format from hw_params() */
  195. priv->format = format;
  196. return 0;
  197. }
  198. static const int tas5086_sample_rates[] = {
  199. 32000, 38000, 44100, 48000, 88200, 96000, 176400, 192000
  200. };
  201. static const int tas5086_ratios[] = {
  202. 64, 128, 192, 256, 384, 512
  203. };
  204. static int index_in_array(const int *array, int len, int needle)
  205. {
  206. int i;
  207. for (i = 0; i < len; i++)
  208. if (array[i] == needle)
  209. return i;
  210. return -ENOENT;
  211. }
  212. static int tas5086_hw_params(struct snd_pcm_substream *substream,
  213. struct snd_pcm_hw_params *params,
  214. struct snd_soc_dai *dai)
  215. {
  216. struct snd_soc_codec *codec = dai->codec;
  217. struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
  218. int val;
  219. int ret;
  220. priv->rate = params_rate(params);
  221. /* Look up the sample rate and refer to the offset in the list */
  222. val = index_in_array(tas5086_sample_rates,
  223. ARRAY_SIZE(tas5086_sample_rates), priv->rate);
  224. if (val < 0) {
  225. dev_err(codec->dev, "Invalid sample rate\n");
  226. return -EINVAL;
  227. }
  228. ret = regmap_update_bits(priv->regmap, TAS5086_CLOCK_CONTROL,
  229. TAS5086_CLOCK_RATE_MASK,
  230. TAS5086_CLOCK_RATE(val));
  231. if (ret < 0)
  232. return ret;
  233. /* MCLK / Fs ratio */
  234. val = index_in_array(tas5086_ratios, ARRAY_SIZE(tas5086_ratios),
  235. priv->mclk / priv->rate);
  236. if (val < 0) {
  237. dev_err(codec->dev, "Inavlid MCLK / Fs ratio\n");
  238. return -EINVAL;
  239. }
  240. ret = regmap_update_bits(priv->regmap, TAS5086_CLOCK_CONTROL,
  241. TAS5086_CLOCK_RATIO_MASK,
  242. TAS5086_CLOCK_RATIO(val));
  243. if (ret < 0)
  244. return ret;
  245. ret = regmap_update_bits(priv->regmap, TAS5086_CLOCK_CONTROL,
  246. TAS5086_CLOCK_SCLK_RATIO_48,
  247. (priv->sclk == 48 * priv->rate) ?
  248. TAS5086_CLOCK_SCLK_RATIO_48 : 0);
  249. if (ret < 0)
  250. return ret;
  251. /*
  252. * The chip has a very unituitive register mapping and muxes information
  253. * about data format and sample depth into the same register, but not on
  254. * a logical bit-boundary. Hence, we have to refer to the format passed
  255. * in the set_dai_fmt() callback and set up everything from here.
  256. *
  257. * First, determine the 'base' value, using the format ...
  258. */
  259. switch (priv->format & SND_SOC_DAIFMT_FORMAT_MASK) {
  260. case SND_SOC_DAIFMT_RIGHT_J:
  261. val = 0x00;
  262. break;
  263. case SND_SOC_DAIFMT_I2S:
  264. val = 0x03;
  265. break;
  266. case SND_SOC_DAIFMT_LEFT_J:
  267. val = 0x06;
  268. break;
  269. default:
  270. dev_err(codec->dev, "Invalid DAI format\n");
  271. return -EINVAL;
  272. }
  273. /* ... then add the offset for the sample bit depth. */
  274. switch (params_format(params)) {
  275. case SNDRV_PCM_FORMAT_S16_LE:
  276. val += 0;
  277. break;
  278. case SNDRV_PCM_FORMAT_S20_3LE:
  279. val += 1;
  280. break;
  281. case SNDRV_PCM_FORMAT_S24_3LE:
  282. val += 2;
  283. break;
  284. default:
  285. dev_err(codec->dev, "Invalid bit width\n");
  286. return -EINVAL;
  287. };
  288. ret = regmap_write(priv->regmap, TAS5086_SERIAL_DATA_IF, val);
  289. if (ret < 0)
  290. return ret;
  291. /* clock is considered valid now */
  292. ret = regmap_update_bits(priv->regmap, TAS5086_CLOCK_CONTROL,
  293. TAS5086_CLOCK_VALID, TAS5086_CLOCK_VALID);
  294. if (ret < 0)
  295. return ret;
  296. return tas5086_set_deemph(codec);
  297. }
  298. static int tas5086_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
  299. {
  300. struct snd_soc_codec *codec = dai->codec;
  301. struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
  302. unsigned int val = 0;
  303. if (mute)
  304. val = TAS5086_SOFT_MUTE_ALL;
  305. return regmap_write(priv->regmap, TAS5086_SOFT_MUTE, val);
  306. }
  307. /* TAS5086 controls */
  308. static const DECLARE_TLV_DB_SCALE(tas5086_dac_tlv, -10350, 50, 1);
  309. static const struct snd_kcontrol_new tas5086_controls[] = {
  310. SOC_SINGLE_TLV("Master Playback Volume", TAS5086_MASTER_VOL,
  311. 0, 0xff, 1, tas5086_dac_tlv),
  312. SOC_DOUBLE_R_TLV("Channel 1/2 Playback Volume",
  313. TAS5086_CHANNEL_VOL(0), TAS5086_CHANNEL_VOL(1),
  314. 0, 0xff, 1, tas5086_dac_tlv),
  315. SOC_DOUBLE_R_TLV("Channel 3/4 Playback Volume",
  316. TAS5086_CHANNEL_VOL(2), TAS5086_CHANNEL_VOL(3),
  317. 0, 0xff, 1, tas5086_dac_tlv),
  318. SOC_DOUBLE_R_TLV("Channel 5/6 Playback Volume",
  319. TAS5086_CHANNEL_VOL(4), TAS5086_CHANNEL_VOL(5),
  320. 0, 0xff, 1, tas5086_dac_tlv),
  321. SOC_SINGLE_BOOL_EXT("De-emphasis Switch", 0,
  322. tas5086_get_deemph, tas5086_put_deemph),
  323. };
  324. static const struct snd_soc_dai_ops tas5086_dai_ops = {
  325. .hw_params = tas5086_hw_params,
  326. .set_sysclk = tas5086_set_dai_sysclk,
  327. .set_fmt = tas5086_set_dai_fmt,
  328. .mute_stream = tas5086_mute_stream,
  329. };
  330. static struct snd_soc_dai_driver tas5086_dai = {
  331. .name = "tas5086-hifi",
  332. .playback = {
  333. .stream_name = "Playback",
  334. .channels_min = 2,
  335. .channels_max = 6,
  336. .rates = TAS5086_PCM_RATES,
  337. .formats = TAS5086_PCM_FORMATS,
  338. },
  339. .ops = &tas5086_dai_ops,
  340. };
  341. #ifdef CONFIG_PM
  342. static int tas5086_soc_resume(struct snd_soc_codec *codec)
  343. {
  344. struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
  345. /* Restore codec state */
  346. return regcache_sync(priv->regmap);
  347. }
  348. #else
  349. #define tas5086_soc_resume NULL
  350. #endif /* CONFIG_PM */
  351. #ifdef CONFIG_OF
  352. static const struct of_device_id tas5086_dt_ids[] = {
  353. { .compatible = "ti,tas5086", },
  354. { }
  355. };
  356. MODULE_DEVICE_TABLE(of, tas5086_dt_ids);
  357. #endif
  358. /* charge period values in microseconds */
  359. static const int tas5086_charge_period[] = {
  360. 13000, 16900, 23400, 31200, 41600, 54600, 72800, 96200,
  361. 130000, 156000, 234000, 312000, 416000, 546000, 728000, 962000,
  362. 1300000, 169000, 2340000, 3120000, 4160000, 5460000, 7280000, 9620000,
  363. };
  364. static int tas5086_probe(struct snd_soc_codec *codec)
  365. {
  366. struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
  367. int charge_period = 1300000; /* hardware default is 1300 ms */
  368. int i, ret;
  369. if (of_match_device(of_match_ptr(tas5086_dt_ids), codec->dev)) {
  370. struct device_node *of_node = codec->dev->of_node;
  371. of_property_read_u32(of_node, "ti,charge-period", &charge_period);
  372. }
  373. /* lookup and set split-capacitor charge period */
  374. if (charge_period == 0) {
  375. regmap_write(priv->regmap, TAS5086_SPLIT_CAP_CHARGE, 0);
  376. } else {
  377. i = index_in_array(tas5086_charge_period,
  378. ARRAY_SIZE(tas5086_charge_period),
  379. charge_period);
  380. if (i >= 0)
  381. regmap_write(priv->regmap, TAS5086_SPLIT_CAP_CHARGE,
  382. i + 0x08);
  383. else
  384. dev_warn(codec->dev,
  385. "Invalid split-cap charge period of %d ns.\n",
  386. charge_period);
  387. }
  388. /* enable factory trim */
  389. ret = regmap_write(priv->regmap, TAS5086_OSC_TRIM, 0x00);
  390. if (ret < 0)
  391. return ret;
  392. /* start all channels */
  393. ret = regmap_write(priv->regmap, TAS5086_SYS_CONTROL_2, 0x20);
  394. if (ret < 0)
  395. return ret;
  396. /* set master volume to 0 dB */
  397. ret = regmap_write(priv->regmap, TAS5086_MASTER_VOL, 0x30);
  398. if (ret < 0)
  399. return ret;
  400. /* mute all channels for now */
  401. ret = regmap_write(priv->regmap, TAS5086_SOFT_MUTE,
  402. TAS5086_SOFT_MUTE_ALL);
  403. if (ret < 0)
  404. return ret;
  405. return 0;
  406. }
  407. static int tas5086_remove(struct snd_soc_codec *codec)
  408. {
  409. struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
  410. if (gpio_is_valid(priv->gpio_nreset))
  411. /* Set codec to the reset state */
  412. gpio_set_value(priv->gpio_nreset, 0);
  413. return 0;
  414. };
  415. static struct snd_soc_codec_driver soc_codec_dev_tas5086 = {
  416. .probe = tas5086_probe,
  417. .remove = tas5086_remove,
  418. .resume = tas5086_soc_resume,
  419. .controls = tas5086_controls,
  420. .num_controls = ARRAY_SIZE(tas5086_controls),
  421. };
  422. static const struct i2c_device_id tas5086_i2c_id[] = {
  423. { "tas5086", 0 },
  424. { }
  425. };
  426. MODULE_DEVICE_TABLE(i2c, tas5086_i2c_id);
  427. static const struct regmap_config tas5086_regmap = {
  428. .reg_bits = 8,
  429. .val_bits = 8,
  430. .max_register = ARRAY_SIZE(tas5086_reg_defaults),
  431. .reg_defaults = tas5086_reg_defaults,
  432. .num_reg_defaults = ARRAY_SIZE(tas5086_reg_defaults),
  433. .cache_type = REGCACHE_RBTREE,
  434. .volatile_reg = tas5086_volatile_reg,
  435. .writeable_reg = tas5086_writeable_reg,
  436. .readable_reg = tas5086_accessible_reg,
  437. };
  438. static int tas5086_i2c_probe(struct i2c_client *i2c,
  439. const struct i2c_device_id *id)
  440. {
  441. struct tas5086_private *priv;
  442. struct device *dev = &i2c->dev;
  443. int gpio_nreset = -EINVAL;
  444. int i, ret;
  445. priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
  446. if (!priv)
  447. return -ENOMEM;
  448. priv->regmap = devm_regmap_init_i2c(i2c, &tas5086_regmap);
  449. if (IS_ERR(priv->regmap)) {
  450. ret = PTR_ERR(priv->regmap);
  451. dev_err(&i2c->dev, "Failed to create regmap: %d\n", ret);
  452. return ret;
  453. }
  454. i2c_set_clientdata(i2c, priv);
  455. if (of_match_device(of_match_ptr(tas5086_dt_ids), dev)) {
  456. struct device_node *of_node = dev->of_node;
  457. gpio_nreset = of_get_named_gpio(of_node, "reset-gpio", 0);
  458. }
  459. if (gpio_is_valid(gpio_nreset))
  460. if (devm_gpio_request(dev, gpio_nreset, "TAS5086 Reset"))
  461. gpio_nreset = -EINVAL;
  462. if (gpio_is_valid(gpio_nreset)) {
  463. /* Reset codec - minimum assertion time is 400ns */
  464. gpio_direction_output(gpio_nreset, 0);
  465. udelay(1);
  466. gpio_set_value(gpio_nreset, 1);
  467. /* Codec needs ~15ms to wake up */
  468. msleep(15);
  469. }
  470. priv->gpio_nreset = gpio_nreset;
  471. /* The TAS5086 always returns 0x03 in its TAS5086_DEV_ID register */
  472. ret = regmap_read(priv->regmap, TAS5086_DEV_ID, &i);
  473. if (ret < 0)
  474. return ret;
  475. if (i != 0x3) {
  476. dev_err(dev,
  477. "Failed to identify TAS5086 codec (got %02x)\n", i);
  478. return -ENODEV;
  479. }
  480. return snd_soc_register_codec(&i2c->dev, &soc_codec_dev_tas5086,
  481. &tas5086_dai, 1);
  482. }
  483. static int tas5086_i2c_remove(struct i2c_client *i2c)
  484. {
  485. snd_soc_unregister_codec(&i2c->dev);
  486. return 0;
  487. }
  488. static struct i2c_driver tas5086_i2c_driver = {
  489. .driver = {
  490. .name = "tas5086",
  491. .owner = THIS_MODULE,
  492. .of_match_table = of_match_ptr(tas5086_dt_ids),
  493. },
  494. .id_table = tas5086_i2c_id,
  495. .probe = tas5086_i2c_probe,
  496. .remove = tas5086_i2c_remove,
  497. };
  498. module_i2c_driver(tas5086_i2c_driver);
  499. MODULE_AUTHOR("Daniel Mack <zonque@gmail.com>");
  500. MODULE_DESCRIPTION("Texas Instruments TAS5086 ALSA SoC Codec Driver");
  501. MODULE_LICENSE("GPL");