ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier
Subsystems (3)
PATCH v2 1/2 ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier
Add driver support for Cirrus Logic CS35L36 boosted speaker amplifier
--- include/sound/cs35l36.h | 43 + sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/cs35l36.c | 1960 ++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/cs35l36.h | 446 ++++++++++ 5 files changed, 2456 insertions(+) create mode 100644 include/sound/cs35l36.h create mode 100644 sound/soc/codecs/cs35l36.c create mode 100644 sound/soc/codecs/cs35l36.h
include/sound/cs35l36.h new file +43 -0
@@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* linux/sound/cs35l36.h -- Platform data for CS35L36 +* +* Copyright 2018 Cirrus Logic, Inc. +* +* Author: James Schulman <[email protected]> +* +*/ + +#ifndef __CS35L36_H +#define __CS35L36_H + +struct cs35l36_vpbr_cfg { +bool is_present; +bool vpbr_en; +int vpbr_thld; +int vpbr_atk_rate; +int vpbr_atk_vol; +int vpbr_max_attn; +int vpbr_wait; +int vpbr_rel_rate; +int vpbr_mute_en; +}; + +struct cs35l36_platform_data { +bool multi_amp_mode; +bool dcm_mode; +bool amp_pcm_inv; +bool imon_pol_inv; +bool vmon_pol_inv; +int boost_ind; +int bst_vctl; +int bst_vctl_sel; +int bst_ipk; +bool extern_boost; +int temp_warn_thld; +int irq_drv_sel; +int irq_gpio_sel; +struct cs35l36_vpbr_cfg vpbr_config; +}; + +#endif /* __CS35L36_H */
sound/soc/codecs/Kconfig +5 -0
@@ -55,6 +55,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_CS35L33 if I2C select SND_SOC_CS35L34 if I2C select SND_SOC_CS35L35 if I2C + select SND_SOC_CS35L36 if I2C select SND_SOC_CS42L42 if I2C select SND_SOC_CS42L51_I2C if I2C select SND_SOC_CS42L52 if I2C && INPUT
@@ -483,6 +484,10 @@ config SND_SOC_CS35L35 tristate "Cirrus Logic CS35L35 CODEC" depends on I2C +config SND_SOC_CS35L36 + tristate "Cirrus Logic CS35L36 CODEC" + depends on I2C + config SND_SOC_CS42L42 tristate "Cirrus Logic CS42L42 CODEC" depends on I2C
sound/soc/codecs/Makefile +2 -0
@@ -47,6 +47,7 @@ snd-soc-cs35l32-objs := cs35l32.o snd-soc-cs35l33-objs := cs35l33.o snd-soc-cs35l34-objs := cs35l34.o snd-soc-cs35l35-objs := cs35l35.o +snd-soc-cs35l36-objs := cs35l36.o snd-soc-cs42l42-objs := cs42l42.o snd-soc-cs42l51-objs := cs42l51.o snd-soc-cs42l51-i2c-objs := cs42l51-i2c.o
@@ -318,6 +319,7 @@ obj-$(CONFIG_SND_SOC_CS35L32) += snd-soc-cs35l32.o obj-$(CONFIG_SND_SOC_CS35L33) += snd-soc-cs35l33.o obj-$(CONFIG_SND_SOC_CS35L34) += snd-soc-cs35l34.o obj-$(CONFIG_SND_SOC_CS35L35) += snd-soc-cs35l35.o +obj-$(CONFIG_SND_SOC_CS35L36) += snd-soc-cs35l36.o obj-$(CONFIG_SND_SOC_CS42L42) += snd-soc-cs42l42.o obj-$(CONFIG_SND_SOC_CS42L51) += snd-soc-cs42l51.o obj-$(CONFIG_SND_SOC_CS42L51_I2C) += snd-soc-cs42l51-i2c.o
sound/soc/codecs/cs35l36.c new file +1960 -0
1,960 lines not on this page · raw message
sound/soc/codecs/cs35l36.h new file +446 -0
446 lines not on this page · raw message
Signature · 1 line
1.9.1
Quoted 23 lines · James Schulman
Add driver support for Cirrus Logic CS35L36 boosted speaker amplifier
Signed-off-by James Schulman <[email protected]>Reviewed-by Charles Keepax <[email protected]>Acked-by Brian Austin <[email protected]>--- include/sound/cs35l36.h | 43 + sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/cs35l36.c | 1960 ++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/cs35l36.h | 446 ++++++++++ 5 files changed, 2456 insertions(+) create mode 100644 include/sound/cs35l36.h create mode 100644 sound/soc/codecs/cs35l36.c create mode 100644 sound/soc/codecs/cs35l36.hinclude/sound/cs35l36.h new file +0
-0
include/sound/cs35l36.h line 9
Quoted 9 lines
include/sound/cs35l36.h new file +9
-0@@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* linux/sound/cs35l36.h -- Platform data for CS35L36 +* +* Copyright 2018 Cirrus Logic, Inc. +* +* Author: James Schulman <[email protected]> +* +*/
This isn't quite right you should still be using /* */ for the SPDX in header files.
Quoted 6 lines
sound/soc/codecs/cs35l36.c new file +0
-0
sound/soc/codecs/cs35l36.c line 9
Quoted 9 lines
sound/soc/codecs/cs35l36.c new file +9
-0@@ -0,0 +1,1960 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* cs35l36.c -- CS35L36 ALSA SoC audio driver +* +* Copyright 2018 Cirrus Logic, Inc. +* +* Author: James Schulman <[email protected]> +* +*/
And Mark will have wanted all of this as a C++ comment.
See this patch for a good example of the advised style:
commit ba34f253711a8427d2ef29475afe406b2d6e5118
ASoC: nau8822: convert to SPDX identifiers
Thanks,
Charles
Quoted 28 lines · Charles Keepax
Quoted 27 lines · James Schulman
Add driver support for Cirrus Logic CS35L36 boosted speaker amplifier
Signed-off-by James Schulman <[email protected]>Reviewed-by Charles Keepax <[email protected]>Acked-by Brian Austin <[email protected]>--- include/sound/cs35l36.h | 43 + sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/cs35l36.c | 1960 ++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/cs35l36.h | 446 ++++++++++ 5 files changed, 2456 insertions(+) create mode 100644 include/sound/cs35l36.h create mode 100644 sound/soc/codecs/cs35l36.c create mode 100644 sound/soc/codecs/cs35l36.hinclude/sound/cs35l36.h new file +4
-0@@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* linux/sound/cs35l36.h -- Platform data for CS35L36 +*
Quoted 9 lines
include/sound/cs35l36.h line 9
Quoted 5 lines
include/sound/cs35l36.h new file +5
-0+* Copyright 2018 Cirrus Logic, Inc. +* +* Author: James Schulman <[email protected]> +* +*/ This isn't quite right you should still be using /* */ for the SPDX in header files.
Ok I see. Apologies for the confusion. I misread Mark's feedback.
Quoted 18 lines
Quoted 6 lines
sound/soc/codecs/cs35l36.c new file +0
-0sound/soc/codecs/cs35l36.c line 9
Quoted 9 lines
sound/soc/codecs/cs35l36.c new file +9
-0@@ -0,0 +1,1960 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* cs35l36.c -- CS35L36 ALSA SoC audio driver +* +* Copyright 2018 Cirrus Logic, Inc. +* +* Author: James Schulman <[email protected]> +* +*/ And Mark will have wanted all of this as a C++ comment.
Quoted 8 lines
See this patch for a good example of the advised style:
commit
ba34f253711a8427d2ef29475afe406b2d6e5118
ASoC: nau8822: convert to SPDX identifiersThanks,
Charles
Thanks Charles I'll get this cleared up.
Regards,
James