diff options
author | Mark Brown <broonie@kernel.org> | 2021-06-23 17:31:14 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-23 17:31:14 +0200 |
commit | 8cc802bd75fbf840635e7d4d48050bbcab4d938d (patch) | |
tree | 4d7983db2b66d416dcf2deb7b4c53f6ceb5b7f0d /sound/soc/codecs/cs43130.c | |
parent | Merge series "ASoC: tegra: Use devm_platform_get_and_ioremap_resource()" from... (diff) | |
parent | ASoC: tlv320aic32x4: dt-bindings: add TAS2505 to compatible (diff) | |
download | linux-8cc802bd75fbf840635e7d4d48050bbcab4d938d.tar.xz linux-8cc802bd75fbf840635e7d4d48050bbcab4d938d.zip |
Merge series "ASoC: tlv320aic32x4: Add support for TAS2505" from Claudius Heine <ch@denx.de>:
Hi,
this is v2 from my patchset that add support for the TAS2505 to the tlv320aic32x4 driver.
kind regards,
Claudius
Changes from v1:
- clarified commit message of first patch, which add the type value to the struct
- removed unnecessary code to put and get speaker volume
- removed 'Gain' from 'HP Driver Playback Volume' control
- fixed rebase issues
Claudius Heine (3):
ASoC: tlv320aic32x4: add type to device private data struct
ASoC: tlv320aic32x4: add support for TAS2505
ASoC: tlv320aic32x4: dt-bindings: add TAS2505 to compatible
.../bindings/sound/tlv320aic32x4.txt | 1 +
sound/soc/codecs/tlv320aic32x4-i2c.c | 22 ++-
sound/soc/codecs/tlv320aic32x4-spi.c | 23 ++-
sound/soc/codecs/tlv320aic32x4.c | 139 +++++++++++++++++-
sound/soc/codecs/tlv320aic32x4.h | 10 ++
5 files changed, 186 insertions(+), 9 deletions(-)
base-commit: 70585216fe7730d9fb5453d3e2804e149d0fe201
--
2.32.0
Diffstat (limited to 'sound/soc/codecs/cs43130.c')
-rw-r--r-- | sound/soc/codecs/cs43130.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/sound/soc/codecs/cs43130.c b/sound/soc/codecs/cs43130.c index 7c521bd6b040..44b20c1ef851 100644 --- a/sound/soc/codecs/cs43130.c +++ b/sound/soc/codecs/cs43130.c @@ -1736,6 +1736,14 @@ static DEVICE_ATTR_RO(hpload_dc_r); static DEVICE_ATTR_RO(hpload_ac_l); static DEVICE_ATTR_RO(hpload_ac_r); +static struct attribute *hpload_attrs[] = { + &dev_attr_hpload_dc_l.attr, + &dev_attr_hpload_dc_r.attr, + &dev_attr_hpload_ac_l.attr, + &dev_attr_hpload_ac_r.attr, +}; +ATTRIBUTE_GROUPS(hpload); + static struct reg_sequence hp_en_cal_seq[] = { {CS43130_INT_MASK_4, CS43130_INT_MASK_ALL}, {CS43130_HP_MEAS_LOAD_1, 0}, @@ -2303,25 +2311,15 @@ static int cs43130_probe(struct snd_soc_component *component) cs43130->hpload_done = false; if (cs43130->dc_meas) { - ret = device_create_file(component->dev, &dev_attr_hpload_dc_l); - if (ret < 0) - return ret; - - ret = device_create_file(component->dev, &dev_attr_hpload_dc_r); - if (ret < 0) - return ret; - - ret = device_create_file(component->dev, &dev_attr_hpload_ac_l); - if (ret < 0) - return ret; - - ret = device_create_file(component->dev, &dev_attr_hpload_ac_r); - if (ret < 0) + ret = sysfs_create_groups(&component->dev->kobj, hpload_groups); + if (ret) return ret; cs43130->wq = create_singlethread_workqueue("cs43130_hp"); - if (!cs43130->wq) + if (!cs43130->wq) { + sysfs_remove_groups(&component->dev->kobj, hpload_groups); return -ENOMEM; + } INIT_WORK(&cs43130->work, cs43130_imp_meas); } |