1 // SPDX-License-Identifier: GPL-2.0
3 // Driver for the Texas Instruments TAS2764 CODEC
4 // Copyright (C) 2020 Texas Instruments Inc.
6 #include <linux/module.h>
7 #include <linux/moduleparam.h>
9 #include <linux/init.h>
10 #include <linux/delay.h>
12 #include <linux/i2c.h>
13 #include <linux/gpio/consumer.h>
14 #include <linux/regulator/consumer.h>
15 #include <linux/regmap.h>
17 #include <linux/slab.h>
18 #include <sound/soc.h>
19 #include <sound/pcm.h>
20 #include <sound/pcm_params.h>
21 #include <sound/initval.h>
22 #include <sound/tlv.h>
27 struct snd_soc_component
*component
;
28 struct gpio_desc
*reset_gpio
;
29 struct gpio_desc
*sdz_gpio
;
30 struct regmap
*regmap
;
41 static const char *tas2764_int_ltch0_msgs
[8] = {
42 "fault: over temperature", /* INT_LTCH0 & BIT(0) */
43 "fault: over current",
44 "fault: bad TDM clock",
46 "fault: PVDD below limiter inflection point",
47 "fault: limiter max attenuation",
48 "fault: BOP infinite hold",
49 "fault: BOP mute", /* INT_LTCH0 & BIT(7) */
52 static const unsigned int tas2764_int_readout_regs
[6] = {
61 static irqreturn_t
tas2764_irq(int irq
, void *data
)
63 struct tas2764_priv
*tas2764
= data
;
64 u8 latched
[6] = {0, 0, 0, 0, 0, 0};
68 for (i
= 0; i
< ARRAY_SIZE(latched
); i
++)
69 latched
[i
] = snd_soc_component_read(tas2764
->component
,
70 tas2764_int_readout_regs
[i
]);
72 for (i
= 0; i
< 8; i
++) {
73 if (latched
[0] & BIT(i
)) {
74 dev_crit_ratelimited(tas2764
->dev
, "%s\n",
75 tas2764_int_ltch0_msgs
[i
]);
81 dev_err_ratelimited(tas2764
->dev
, "other context to the fault: %02x,%02x,%02x,%02x,%02x",
82 latched
[1], latched
[2], latched
[3], latched
[4], latched
[5]);
83 snd_soc_component_update_bits(tas2764
->component
,
85 TAS2764_INT_CLK_CFG_IRQZ_CLR
,
86 TAS2764_INT_CLK_CFG_IRQZ_CLR
);
92 static void tas2764_reset(struct tas2764_priv
*tas2764
)
94 if (tas2764
->reset_gpio
) {
95 gpiod_set_value_cansleep(tas2764
->reset_gpio
, 0);
97 gpiod_set_value_cansleep(tas2764
->reset_gpio
, 1);
98 usleep_range(1000, 2000);
101 snd_soc_component_write(tas2764
->component
, TAS2764_SW_RST
,
103 usleep_range(1000, 2000);
106 static int tas2764_update_pwr_ctrl(struct tas2764_priv
*tas2764
)
108 struct snd_soc_component
*component
= tas2764
->component
;
112 if (tas2764
->dac_powered
)
113 val
= tas2764
->unmuted
?
114 TAS2764_PWR_CTRL_ACTIVE
: TAS2764_PWR_CTRL_MUTE
;
116 val
= TAS2764_PWR_CTRL_SHUTDOWN
;
118 ret
= snd_soc_component_update_bits(component
, TAS2764_PWR_CTRL
,
119 TAS2764_PWR_CTRL_MASK
, val
);
127 static int tas2764_codec_suspend(struct snd_soc_component
*component
)
129 struct tas2764_priv
*tas2764
= snd_soc_component_get_drvdata(component
);
132 ret
= snd_soc_component_update_bits(component
, TAS2764_PWR_CTRL
,
133 TAS2764_PWR_CTRL_MASK
,
134 TAS2764_PWR_CTRL_SHUTDOWN
);
139 if (tas2764
->sdz_gpio
)
140 gpiod_set_value_cansleep(tas2764
->sdz_gpio
, 0);
142 regcache_cache_only(tas2764
->regmap
, true);
143 regcache_mark_dirty(tas2764
->regmap
);
148 static int tas2764_codec_resume(struct snd_soc_component
*component
)
150 struct tas2764_priv
*tas2764
= snd_soc_component_get_drvdata(component
);
153 if (tas2764
->sdz_gpio
) {
154 gpiod_set_value_cansleep(tas2764
->sdz_gpio
, 1);
155 usleep_range(1000, 2000);
158 ret
= tas2764_update_pwr_ctrl(tas2764
);
163 regcache_cache_only(tas2764
->regmap
, false);
165 return regcache_sync(tas2764
->regmap
);
168 #define tas2764_codec_suspend NULL
169 #define tas2764_codec_resume NULL
172 static const char * const tas2764_ASI1_src
[] = {
173 "I2C offset", "Left", "Right", "LeftRightDiv2",
176 static SOC_ENUM_SINGLE_DECL(
177 tas2764_ASI1_src_enum
, TAS2764_TDM_CFG2
, TAS2764_TDM_CFG2_SCFG_SHIFT
,
180 static const struct snd_kcontrol_new tas2764_asi1_mux
=
181 SOC_DAPM_ENUM("ASI1 Source", tas2764_ASI1_src_enum
);
183 static int tas2764_dac_event(struct snd_soc_dapm_widget
*w
,
184 struct snd_kcontrol
*kcontrol
, int event
)
186 struct snd_soc_component
*component
= snd_soc_dapm_to_component(w
->dapm
);
187 struct tas2764_priv
*tas2764
= snd_soc_component_get_drvdata(component
);
191 case SND_SOC_DAPM_POST_PMU
:
192 tas2764
->dac_powered
= true;
193 ret
= tas2764_update_pwr_ctrl(tas2764
);
195 case SND_SOC_DAPM_PRE_PMD
:
196 tas2764
->dac_powered
= false;
197 ret
= tas2764_update_pwr_ctrl(tas2764
);
200 dev_err(tas2764
->dev
, "Unsupported event\n");
210 static const struct snd_kcontrol_new isense_switch
=
211 SOC_DAPM_SINGLE("Switch", TAS2764_PWR_CTRL
, TAS2764_ISENSE_POWER_EN
, 1, 1);
212 static const struct snd_kcontrol_new vsense_switch
=
213 SOC_DAPM_SINGLE("Switch", TAS2764_PWR_CTRL
, TAS2764_VSENSE_POWER_EN
, 1, 1);
215 static const struct snd_soc_dapm_widget tas2764_dapm_widgets
[] = {
216 SND_SOC_DAPM_AIF_IN("ASI1", "ASI1 Playback", 0, SND_SOC_NOPM
, 0, 0),
217 SND_SOC_DAPM_MUX("ASI1 Sel", SND_SOC_NOPM
, 0, 0, &tas2764_asi1_mux
),
218 SND_SOC_DAPM_SWITCH("ISENSE", TAS2764_PWR_CTRL
, TAS2764_ISENSE_POWER_EN
,
220 SND_SOC_DAPM_SWITCH("VSENSE", TAS2764_PWR_CTRL
, TAS2764_VSENSE_POWER_EN
,
222 SND_SOC_DAPM_DAC_E("DAC", NULL
, SND_SOC_NOPM
, 0, 0, tas2764_dac_event
,
223 SND_SOC_DAPM_POST_PMU
| SND_SOC_DAPM_PRE_PMD
),
224 SND_SOC_DAPM_OUTPUT("OUT"),
225 SND_SOC_DAPM_SIGGEN("VMON"),
226 SND_SOC_DAPM_SIGGEN("IMON")
229 static const struct snd_soc_dapm_route tas2764_audio_map
[] = {
230 {"ASI1 Sel", "I2C offset", "ASI1"},
231 {"ASI1 Sel", "Left", "ASI1"},
232 {"ASI1 Sel", "Right", "ASI1"},
233 {"ASI1 Sel", "LeftRightDiv2", "ASI1"},
234 {"DAC", NULL
, "ASI1 Sel"},
235 {"OUT", NULL
, "DAC"},
236 {"ISENSE", "Switch", "IMON"},
237 {"VSENSE", "Switch", "VMON"},
240 static int tas2764_mute(struct snd_soc_dai
*dai
, int mute
, int direction
)
242 struct tas2764_priv
*tas2764
=
243 snd_soc_component_get_drvdata(dai
->component
);
245 tas2764
->unmuted
= !mute
;
246 return tas2764_update_pwr_ctrl(tas2764
);
249 static int tas2764_set_bitwidth(struct tas2764_priv
*tas2764
, int bitwidth
)
251 struct snd_soc_component
*component
= tas2764
->component
;
257 case SNDRV_PCM_FORMAT_S16_LE
:
258 ret
= snd_soc_component_update_bits(component
,
260 TAS2764_TDM_CFG2_RXW_MASK
,
261 TAS2764_TDM_CFG2_RXW_16BITS
);
263 case SNDRV_PCM_FORMAT_S24_LE
:
264 ret
= snd_soc_component_update_bits(component
,
266 TAS2764_TDM_CFG2_RXW_MASK
,
267 TAS2764_TDM_CFG2_RXW_24BITS
);
269 case SNDRV_PCM_FORMAT_S32_LE
:
270 ret
= snd_soc_component_update_bits(component
,
272 TAS2764_TDM_CFG2_RXW_MASK
,
273 TAS2764_TDM_CFG2_RXW_32BITS
);
283 val
= snd_soc_component_read(tas2764
->component
, TAS2764_PWR_CTRL
);
287 if (val
& (1 << TAS2764_VSENSE_POWER_EN
))
290 sense_en
= TAS2764_TDM_CFG5_VSNS_ENABLE
;
292 ret
= snd_soc_component_update_bits(tas2764
->component
, TAS2764_TDM_CFG5
,
293 TAS2764_TDM_CFG5_VSNS_ENABLE
,
298 if (val
& (1 << TAS2764_ISENSE_POWER_EN
))
301 sense_en
= TAS2764_TDM_CFG6_ISNS_ENABLE
;
303 ret
= snd_soc_component_update_bits(tas2764
->component
, TAS2764_TDM_CFG6
,
304 TAS2764_TDM_CFG6_ISNS_ENABLE
,
312 static int tas2764_set_samplerate(struct tas2764_priv
*tas2764
, int samplerate
)
314 struct snd_soc_component
*component
= tas2764
->component
;
318 switch (samplerate
) {
320 ramp_rate_val
= TAS2764_TDM_CFG0_SMP_48KHZ
|
321 TAS2764_TDM_CFG0_44_1_48KHZ
;
324 ramp_rate_val
= TAS2764_TDM_CFG0_SMP_44_1KHZ
|
325 TAS2764_TDM_CFG0_44_1_48KHZ
;
328 ramp_rate_val
= TAS2764_TDM_CFG0_SMP_48KHZ
|
329 TAS2764_TDM_CFG0_88_2_96KHZ
;
332 ramp_rate_val
= TAS2764_TDM_CFG0_SMP_44_1KHZ
|
333 TAS2764_TDM_CFG0_88_2_96KHZ
;
339 ret
= snd_soc_component_update_bits(component
, TAS2764_TDM_CFG0
,
340 TAS2764_TDM_CFG0_SMP_MASK
|
341 TAS2764_TDM_CFG0_MASK
,
349 static int tas2764_hw_params(struct snd_pcm_substream
*substream
,
350 struct snd_pcm_hw_params
*params
,
351 struct snd_soc_dai
*dai
)
353 struct snd_soc_component
*component
= dai
->component
;
354 struct tas2764_priv
*tas2764
= snd_soc_component_get_drvdata(component
);
357 ret
= tas2764_set_bitwidth(tas2764
, params_format(params
));
361 return tas2764_set_samplerate(tas2764
, params_rate(params
));
364 static int tas2764_set_fmt(struct snd_soc_dai
*dai
, unsigned int fmt
)
366 struct snd_soc_component
*component
= dai
->component
;
367 struct tas2764_priv
*tas2764
= snd_soc_component_get_drvdata(component
);
368 u8 tdm_rx_start_slot
= 0, asi_cfg_0
= 0, asi_cfg_1
= 0;
371 switch (fmt
& SND_SOC_DAIFMT_INV_MASK
) {
372 case SND_SOC_DAIFMT_NB_IF
:
373 asi_cfg_0
^= TAS2764_TDM_CFG0_FRAME_START
;
375 case SND_SOC_DAIFMT_NB_NF
:
376 asi_cfg_1
= TAS2764_TDM_CFG1_RX_RISING
;
378 case SND_SOC_DAIFMT_IB_IF
:
379 asi_cfg_0
^= TAS2764_TDM_CFG0_FRAME_START
;
381 case SND_SOC_DAIFMT_IB_NF
:
382 asi_cfg_1
= TAS2764_TDM_CFG1_RX_FALLING
;
386 ret
= snd_soc_component_update_bits(component
, TAS2764_TDM_CFG1
,
387 TAS2764_TDM_CFG1_RX_MASK
,
392 switch (fmt
& SND_SOC_DAIFMT_FORMAT_MASK
) {
393 case SND_SOC_DAIFMT_I2S
:
394 asi_cfg_0
^= TAS2764_TDM_CFG0_FRAME_START
;
396 case SND_SOC_DAIFMT_DSP_A
:
397 tdm_rx_start_slot
= 1;
399 case SND_SOC_DAIFMT_DSP_B
:
400 case SND_SOC_DAIFMT_LEFT_J
:
401 tdm_rx_start_slot
= 0;
404 dev_err(tas2764
->dev
,
405 "DAI Format is not found, fmt=0x%x\n", fmt
);
409 ret
= snd_soc_component_update_bits(component
, TAS2764_TDM_CFG0
,
410 TAS2764_TDM_CFG0_FRAME_START
,
415 ret
= snd_soc_component_update_bits(component
, TAS2764_TDM_CFG1
,
416 TAS2764_TDM_CFG1_MASK
,
417 (tdm_rx_start_slot
<< TAS2764_TDM_CFG1_51_SHIFT
));
424 static int tas2764_set_dai_tdm_slot(struct snd_soc_dai
*dai
,
425 unsigned int tx_mask
,
426 unsigned int rx_mask
,
427 int slots
, int slot_width
)
429 struct snd_soc_component
*component
= dai
->component
;
430 struct tas2764_priv
*tas2764
= snd_soc_component_get_drvdata(component
);
431 int left_slot
, right_slot
;
436 if (tx_mask
== 0 || rx_mask
!= 0)
439 left_slot
= __ffs(tx_mask
);
440 tx_mask
&= ~(1 << left_slot
);
442 right_slot
= left_slot
;
444 right_slot
= __ffs(tx_mask
);
445 tx_mask
&= ~(1 << right_slot
);
448 if (tx_mask
!= 0 || left_slot
>= slots
|| right_slot
>= slots
)
451 slots_cfg
= (right_slot
<< TAS2764_TDM_CFG3_RXS_SHIFT
) | left_slot
;
453 ret
= snd_soc_component_write(component
, TAS2764_TDM_CFG3
, slots_cfg
);
457 switch (slot_width
) {
459 slot_size
= TAS2764_TDM_CFG2_RXS_16BITS
;
462 slot_size
= TAS2764_TDM_CFG2_RXS_24BITS
;
465 slot_size
= TAS2764_TDM_CFG2_RXS_32BITS
;
471 ret
= snd_soc_component_update_bits(component
, TAS2764_TDM_CFG2
,
472 TAS2764_TDM_CFG2_RXS_MASK
,
477 ret
= snd_soc_component_update_bits(component
, TAS2764_TDM_CFG5
,
478 TAS2764_TDM_CFG5_50_MASK
,
479 tas2764
->v_sense_slot
);
483 ret
= snd_soc_component_update_bits(component
, TAS2764_TDM_CFG6
,
484 TAS2764_TDM_CFG6_50_MASK
,
485 tas2764
->i_sense_slot
);
492 static const struct snd_soc_dai_ops tas2764_dai_ops
= {
493 .mute_stream
= tas2764_mute
,
494 .hw_params
= tas2764_hw_params
,
495 .set_fmt
= tas2764_set_fmt
,
496 .set_tdm_slot
= tas2764_set_dai_tdm_slot
,
497 .no_capture_mute
= 1,
500 #define TAS2764_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
501 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
503 #define TAS2764_RATES (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |\
504 SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_88200)
506 static struct snd_soc_dai_driver tas2764_dai_driver
[] = {
508 .name
= "tas2764 ASI1",
511 .stream_name
= "ASI1 Playback",
514 .rates
= TAS2764_RATES
,
515 .formats
= TAS2764_FORMATS
,
518 .stream_name
= "ASI1 Capture",
521 .rates
= TAS2764_RATES
,
522 .formats
= TAS2764_FORMATS
,
524 .ops
= &tas2764_dai_ops
,
529 static int tas2764_codec_probe(struct snd_soc_component
*component
)
531 struct tas2764_priv
*tas2764
= snd_soc_component_get_drvdata(component
);
534 tas2764
->component
= component
;
536 if (tas2764
->sdz_gpio
) {
537 gpiod_set_value_cansleep(tas2764
->sdz_gpio
, 1);
538 usleep_range(1000, 2000);
541 tas2764_reset(tas2764
);
544 ret
= snd_soc_component_write(tas2764
->component
, TAS2764_INT_MASK0
, 0xff);
548 ret
= snd_soc_component_write(tas2764
->component
, TAS2764_INT_MASK1
, 0xff);
552 ret
= snd_soc_component_write(tas2764
->component
, TAS2764_INT_MASK2
, 0xff);
556 ret
= snd_soc_component_write(tas2764
->component
, TAS2764_INT_MASK3
, 0xff);
560 ret
= snd_soc_component_write(tas2764
->component
, TAS2764_INT_MASK4
, 0xff);
564 ret
= devm_request_threaded_irq(tas2764
->dev
, tas2764
->irq
, NULL
, tas2764_irq
,
565 IRQF_ONESHOT
| IRQF_SHARED
| IRQF_TRIGGER_LOW
,
568 dev_warn(tas2764
->dev
, "failed to request IRQ: %d\n", ret
);
571 ret
= snd_soc_component_update_bits(tas2764
->component
, TAS2764_TDM_CFG5
,
572 TAS2764_TDM_CFG5_VSNS_ENABLE
, 0);
576 ret
= snd_soc_component_update_bits(tas2764
->component
, TAS2764_TDM_CFG6
,
577 TAS2764_TDM_CFG6_ISNS_ENABLE
, 0);
584 static DECLARE_TLV_DB_SCALE(tas2764_digital_tlv
, 1100, 50, 0);
585 static DECLARE_TLV_DB_SCALE(tas2764_playback_volume
, -10050, 50, 1);
587 static const char * const tas2764_hpf_texts
[] = {
588 "Disabled", "2 Hz", "50 Hz", "100 Hz", "200 Hz",
592 static SOC_ENUM_SINGLE_DECL(
593 tas2764_hpf_enum
, TAS2764_DC_BLK0
,
594 TAS2764_DC_BLK0_HPF_FREQ_PB_SHIFT
, tas2764_hpf_texts
);
596 static const struct snd_kcontrol_new tas2764_snd_controls
[] = {
597 SOC_SINGLE_TLV("Speaker Volume", TAS2764_DVC
, 0,
598 TAS2764_DVC_MAX
, 1, tas2764_playback_volume
),
599 SOC_SINGLE_TLV("Amp Gain Volume", TAS2764_CHNL_0
, 1, 0x14, 0,
600 tas2764_digital_tlv
),
601 SOC_ENUM("HPF Corner Frequency", tas2764_hpf_enum
),
604 static const struct snd_soc_component_driver soc_component_driver_tas2764
= {
605 .probe
= tas2764_codec_probe
,
606 .suspend
= tas2764_codec_suspend
,
607 .resume
= tas2764_codec_resume
,
608 .controls
= tas2764_snd_controls
,
609 .num_controls
= ARRAY_SIZE(tas2764_snd_controls
),
610 .dapm_widgets
= tas2764_dapm_widgets
,
611 .num_dapm_widgets
= ARRAY_SIZE(tas2764_dapm_widgets
),
612 .dapm_routes
= tas2764_audio_map
,
613 .num_dapm_routes
= ARRAY_SIZE(tas2764_audio_map
),
618 static const struct reg_default tas2764_reg_defaults
[] = {
619 { TAS2764_PAGE
, 0x00 },
620 { TAS2764_SW_RST
, 0x00 },
621 { TAS2764_PWR_CTRL
, 0x1a },
622 { TAS2764_DVC
, 0x00 },
623 { TAS2764_CHNL_0
, 0x28 },
624 { TAS2764_TDM_CFG0
, 0x09 },
625 { TAS2764_TDM_CFG1
, 0x02 },
626 { TAS2764_TDM_CFG2
, 0x0a },
627 { TAS2764_TDM_CFG3
, 0x10 },
628 { TAS2764_TDM_CFG5
, 0x42 },
631 static const struct regmap_range_cfg tas2764_regmap_ranges
[] = {
634 .range_max
= 1 * 128,
635 .selector_reg
= TAS2764_PAGE
,
636 .selector_mask
= 0xff,
643 static bool tas2764_volatile_register(struct device
*dev
, unsigned int reg
)
646 case TAS2764_INT_LTCH0
... TAS2764_INT_LTCH4
:
647 case TAS2764_INT_CLK_CFG
:
654 static const struct regmap_config tas2764_i2c_regmap
= {
657 .volatile_reg
= tas2764_volatile_register
,
658 .reg_defaults
= tas2764_reg_defaults
,
659 .num_reg_defaults
= ARRAY_SIZE(tas2764_reg_defaults
),
660 .cache_type
= REGCACHE_RBTREE
,
661 .ranges
= tas2764_regmap_ranges
,
662 .num_ranges
= ARRAY_SIZE(tas2764_regmap_ranges
),
663 .max_register
= 1 * 128,
666 static int tas2764_parse_dt(struct device
*dev
, struct tas2764_priv
*tas2764
)
670 tas2764
->reset_gpio
= devm_gpiod_get_optional(tas2764
->dev
, "reset",
672 if (IS_ERR(tas2764
->reset_gpio
)) {
673 if (PTR_ERR(tas2764
->reset_gpio
) == -EPROBE_DEFER
) {
674 tas2764
->reset_gpio
= NULL
;
675 return -EPROBE_DEFER
;
679 tas2764
->sdz_gpio
= devm_gpiod_get_optional(dev
, "shutdown", GPIOD_OUT_HIGH
);
680 if (IS_ERR(tas2764
->sdz_gpio
)) {
681 if (PTR_ERR(tas2764
->sdz_gpio
) == -EPROBE_DEFER
)
682 return -EPROBE_DEFER
;
684 tas2764
->sdz_gpio
= NULL
;
687 ret
= fwnode_property_read_u32(dev
->fwnode
, "ti,imon-slot-no",
688 &tas2764
->i_sense_slot
);
690 tas2764
->i_sense_slot
= 0;
692 ret
= fwnode_property_read_u32(dev
->fwnode
, "ti,vmon-slot-no",
693 &tas2764
->v_sense_slot
);
695 tas2764
->v_sense_slot
= 2;
700 static int tas2764_i2c_probe(struct i2c_client
*client
)
702 struct tas2764_priv
*tas2764
;
705 tas2764
= devm_kzalloc(&client
->dev
, sizeof(struct tas2764_priv
),
710 tas2764
->dev
= &client
->dev
;
711 tas2764
->irq
= client
->irq
;
712 i2c_set_clientdata(client
, tas2764
);
713 dev_set_drvdata(&client
->dev
, tas2764
);
715 tas2764
->regmap
= devm_regmap_init_i2c(client
, &tas2764_i2c_regmap
);
716 if (IS_ERR(tas2764
->regmap
)) {
717 result
= PTR_ERR(tas2764
->regmap
);
718 dev_err(&client
->dev
, "Failed to allocate register map: %d\n",
723 if (client
->dev
.of_node
) {
724 result
= tas2764_parse_dt(&client
->dev
, tas2764
);
726 dev_err(tas2764
->dev
, "%s: Failed to parse devicetree\n",
732 return devm_snd_soc_register_component(tas2764
->dev
,
733 &soc_component_driver_tas2764
,
735 ARRAY_SIZE(tas2764_dai_driver
));
738 static const struct i2c_device_id tas2764_i2c_id
[] = {
742 MODULE_DEVICE_TABLE(i2c
, tas2764_i2c_id
);
744 #if defined(CONFIG_OF)
745 static const struct of_device_id tas2764_of_match
[] = {
746 { .compatible
= "ti,tas2764" },
749 MODULE_DEVICE_TABLE(of
, tas2764_of_match
);
752 static struct i2c_driver tas2764_i2c_driver
= {
755 .of_match_table
= of_match_ptr(tas2764_of_match
),
757 .probe
= tas2764_i2c_probe
,
758 .id_table
= tas2764_i2c_id
,
760 module_i2c_driver(tas2764_i2c_driver
);
762 MODULE_AUTHOR("Dan Murphy <dmurphy@ti.com>");
763 MODULE_DESCRIPTION("TAS2764 I2C Smart Amplifier driver");
764 MODULE_LICENSE("GPL v2");