ASoC: TSCS42xx: Add support for Tempo Semiconductor's TSCS42xx audio CODEC
Subsystems (4)
Steven Eckhoff
maintainerPATCH v3 1/1 ASoC: TSCS42xx: Add support for Tempo Semiconductor's TSCS42xx audio CODEC
Currently there is no support for the TSCS42xx audio CODEC.
Add support for it.
Below is the link to the v2 patch in case the threading is broken. This
patch addressed each issue raised in the last review.
https://patchwork.kernel.org/patch/10058117/
--- .../devicetree/bindings/sound/tscs42xx.txt | 15 + .../devicetree/bindings/vendor-prefixes.txt | 1 + MAINTAINERS | 5 + sound/soc/codecs/Kconfig | 8 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/tscs42xx.c | 1571 ++++++++++++ sound/soc/codecs/tscs42xx.h | 2693 ++++++++++++++++++++ 7 files changed, 4295 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/tscs42xx.txt create mode 100644 sound/soc/codecs/tscs42xx.c create mode 100644 sound/soc/codecs/tscs42xx.h
Documentation/devicetree/bindings/sound/tscs42xx.txt new file +15 -0
@@ -0,0 +1,15 @@ +TSCS42XX Audio CODEC + +Required Properties: + + - compatible : "tscs:tscs42xx" + + - reg : The I2C address of the device + +Example: + +codec: tscs42xx@69 { + compatible = "tscs,tscs42xx"; + reg = <0x69>; + status = "okay"; +};
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -363,6 +363,7 @@ tpo TPO tronfy Tronfy tronsmart Tronsmart truly Truly Semiconductors Limited +tscs Tempo Semiconductor tsd Theobroma Systems Design und Consulting GmbH tyan Tyan Computer Corporation ucrobotics uCRobotics
MAINTAINERS +5 -0
@@ -13850,6 +13850,11 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git S: Maintained K: ^Subject:.*(?i)trivial +TEMPO SEMICONDUCTOR DRIVERS +M: Steven Eckhoff <[email protected]> +S: Maintained +F: sound/soc/codecs/tscs42xx.* + TTY LAYER M: Greg Kroah-Hartman <[email protected]> M: Jiri Slaby <[email protected]>
sound/soc/codecs/Kconfig +8 -0
@@ -158,6 +158,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_TLV320AIC3X if I2C select SND_SOC_TPA6130A2 if I2C select SND_SOC_TLV320DAC33 if I2C + select SND_SOC_TSCS42XX if I2C select SND_SOC_TS3A227E if I2C select SND_SOC_TWL4030 if TWL4030_CORE select SND_SOC_TWL6040 if TWL6040_CORE
@@ -929,6 +930,13 @@ config SND_SOC_TLV320AIC3X config SND_SOC_TLV320DAC33 tristate +config SND_SOC_TSCS42XX + tristate "Tempo Semiconductor TSCS42xx CODEC" + depends on I2C + select REGMAP_I2C + help + Add support for Tempo Semiconductor's TSCS42xx audio CODEC. + config SND_SOC_TS3A227E tristate "TI Headset/Mic detect and keypress chip" depends on I2C
sound/soc/codecs/Makefile +2 -0
@@ -167,6 +167,7 @@ snd-soc-tlv320aic32x4-i2c-objs := tlv320aic32x4-i2c.o snd-soc-tlv320aic32x4-spi-objs := tlv320aic32x4-spi.o snd-soc-tlv320aic3x-objs := tlv320aic3x.o snd-soc-tlv320dac33-objs := tlv320dac33.o +snd-soc-tscs42xx-objs := tscs42xx.o snd-soc-ts3a227e-objs := ts3a227e.o snd-soc-twl4030-objs := twl4030.o snd-soc-twl6040-objs := twl6040.o
@@ -406,6 +407,7 @@ obj-$(CONFIG_SND_SOC_TLV320AIC32X4_I2C) += snd-soc-tlv320aic32x4-i2c.o obj-$(CONFIG_SND_SOC_TLV320AIC32X4_SPI) += snd-soc-tlv320aic32x4-spi.o obj-$(CONFIG_SND_SOC_TLV320AIC3X) += snd-soc-tlv320aic3x.o obj-$(CONFIG_SND_SOC_TLV320DAC33) += snd-soc-tlv320dac33.o +obj-$(CONFIG_SND_SOC_TSCS42XX) += snd-soc-tscs42xx.o obj-$(CONFIG_SND_SOC_TS3A227E) += snd-soc-ts3a227e.o obj-$(CONFIG_SND_SOC_TWL4030) += snd-soc-twl4030.o obj-$(CONFIG_SND_SOC_TWL6040) += snd-soc-twl6040.o
sound/soc/codecs/tscs42xx.c new file +1571 -0
1,571 lines not on this page · raw message
sound/soc/codecs/tscs42xx.h new file +2693 -0
1,362 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.11.0
Part of the diff is not shown here. View the raw message.
Steven,
Quoted 17 lines · Steven Eckhoff
Currently there is no support for the TSCS42xx audio CODEC.
Add support for it.
Below is the link to the v2 patch in case the threading is broken. This
patch addressed each issue raised in the last review.https://patchwork.kernel.org/patch/10058117/
Signed-off-by Steven Eckhoff <[email protected]>Cc Steven Eckhoff <[email protected]>Cc Liam Girdwood <[email protected]>Cc Mark Brown <[email protected]>Cc Jaroslav Kysela <[email protected]>Cc Takashi Iwai <[email protected]>
[...]
Quoted 4 lines
sound/soc/codecs/tscs42xx.c new file +1
-0@@ -0,0 +1,1571 @@ +/*
sound/soc/codecs/tscs42xx.c line 11
Quoted 10 lines
sound/soc/codecs/tscs42xx.c new file +10
-0+* tscs42xx.c -- TSCS42xx ALSA SoC Audio driver +* +* Copyright 2017 Tempo Semiconductor, Inc. +* +* Author: Steven Eckhoff <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/
Have you considered using the new SPDX ids? This would come out as:
sound/soc/codecs/tscs42xx.c line 11
Quoted 8 lines
sound/soc/codecs/tscs42xx.c new file +8
-0+// SPDX-License-Identifier: GPL-2.0 +/* +* tscs42xx.c -- TSCS42xx ALSA SoC Audio driver +* +* Copyright 2017 Tempo Semiconductor, Inc. +* +* Author: Steven Eckhoff <[email protected]> +*/
... and is shorter and greppable: there is nothing not to like in this, unless you love legalese of course!
Check also Thomas doc patches and Linus rationale of why he wants this as the top line using C++-style comments.
And if you agree like me with Linus take on C++ comments, you could even go with less boilerplate with this:
sound/soc/codecs/tscs42xx.c line 23
Quoted 4 lines
sound/soc/codecs/tscs42xx.c new file +4
-0+// SPDX-License-Identifier: GPL-2.0 +// tscs42xx.c -- TSCS42xx ALSA SoC Audio driver +// Copyright 2017 Tempo Semiconductor, Inc. +// Author: Steven Eckhoff <[email protected]>
This would make 12 lines of comment be just 4 .... with the same effect, but less distraction from your fine code.
Thank you for your kind consideration!
Signature · 2 lines
Cordially Philippe Ombredanne
Steven Eckhoff
maintainerQuoted 1 line · Philippe Ombredanne
Have you considered using the new SPDX ids?
I was unaware of this. Thank you for bringing it to my attention. I have added it to v4. You can see it here:
https://patchwork.kernel.org/patch/10104003/
Thanks for the review!
Philippe Ombredanne
Acked-bySteven,
Quoted 10 lines · Steven Eckhoff
Quoted 1 line · Philippe Ombredanne
Have you considered using the new SPDX ids?
I was unaware of this. Thank you for bringing it to my attention. I have added it to v4. You can see it here:
https://patchwork.kernel.org/patch/10104003/
Thanks for the review!
For the SPDX ids usage: thank you!