Cirrus Logic Family of ADCs
Subsystems (4)
v6 cover Cirrus Logic Family of ADCs
This patchset provides ASoC support for the latest family of Cirrus Logic multichannel, high performance audio ADCs. The devices that are supported are CS5302 (2 channel ADC), CS5304 (4 channel ADC), and CS5308 (8 channel ADC).
v2 changes:
- Use sizeof(*) instead of sizeof(struct cs530x_priv)
- Utilize i2c_get_match_data to simpify code.
- Use unintptr_t instead of enum cs530x_type to typecast match->data.
- Use dev_err_probe instead of dev_err in probe.
- Fix gpiod_set_vale for reset to the correct logical value.
- Provided full name for maintainer in DT binding.
- Remove | from after "discription" in DT binding.
- Removed unneeded discription of #sound-dai-cells.
- Changed supply discriptions in DT binding.
- Changeed underscores to dashes for DT property names.
- Added ref for dai-common for DT binding.
- Changed additionalProperties to unevaluatedProperties in DT binding.
- Changed the DT example to have the compatible property first and the reg second.
- Removed typos and blank lines in DT binding.
- Changed adc to cs5304 in DT example.
v3 changes:
- Changed cs5304 back to adc for device name in DT example.
- Removed dev_info for device id and rev id and added revid to dev_dbg along with device id.
- Set ret = dev_err_probe and passed PTR_ERR value into dev_err_probe insead of assigning PTR_ERR to ret and passing ret into dev_err_probe.
- Moved dev_dai allocation to the beginning of probe.
v4 changes:
- Remove regmap volatile_reg callback since it is not needed.
v5 changes:
- Add MODULE_LICENSE to cs530x-i2c.c
v6 changes:
- Added missing Reviewed-by for DT Binding.
- Updated changelog.
Paul Handrigan (2):
ASoC: dt-bindings: cirrus,cs530x: Add initial DT binding
ASoC: cs530x: Support for cs530x ADCs
.../bindings/sound/cirrus,cs530x.yaml | 85 ++ sound/soc/codecs/Kconfig | 14 + sound/soc/codecs/Makefile | 4 + sound/soc/codecs/cs530x-i2c.c | 72 ++ sound/soc/codecs/cs530x.c | 966 ++++++++++++++++++ sound/soc/codecs/cs530x.h | 223 ++++ 6 files changed, 1364 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/cirrus,cs530x.yaml create mode 100644 sound/soc/codecs/cs530x-i2c.c create mode 100644 sound/soc/codecs/cs530x.c create mode 100644 sound/soc/codecs/cs530x.h
Signature · 1 line
2.34.1
PATCH v6 1/2 ASoC: dt-bindings: cirrus,cs530x: Add initial DT binding
Add the YAML DT bindings for the cs530x high performance audio ADCs.
--- .../bindings/sound/cirrus,cs530x.yaml | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/cirrus,cs530x.yaml
Documentation/devicetree/bindings/sound/cirrus,cs530x.yaml new file +85 -0
@@ -0,0 +1,85 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/cirrus,cs530x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus Logic cs530x family of audio ADCs + +maintainers: + - Paul Handrigan <[email protected]> + - [email protected] + +description: + The CS530X devices are a family of high performance audio ADCs. + +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + enum: + - cirrus,cs5302 + - cirrus,cs5304 + - cirrus,cs5308 + + reg: + maxItems: 1 + + '#sound-dai-cells': + const: 1 + + reset-gpios: + maxItems: 1 + + vdd-a-supply: + description: Analog power supply + + vdd-io-supply: + description: Digital IO power supply + + cirrus,in-hiz-pin12: + description: + Sets input channels one and two to high impedance. + type: boolean + + cirrus,in-hiz-pin34: + description: + Sets input channels three and four to high impedance. + type: boolean + + cirrus,in-hiz-pin56: + description: + Sets input channels five and six to high impedance. + type: boolean + + cirrus,in-hiz-pin78: + description: + Sets input channels seven and eight to high impedance. + type: boolean + +required: + - compatible + - reg + - "#sound-dai-cells" + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + cs5304: adc@48 { + compatible = "cirrus,cs5304"; + reg = <0x48>; + #sound-dai-cells = <1>; + reset-gpios = <&gpio 110 GPIO_ACTIVE_LOW>; + vdd-a-supply = <&vreg>; + vdd-io-supply = <&vreg>; + cirrus,in-hiz-pin34; + }; + };
Signature · 1 line
2.34.1
PATCH v6 2/2 ASoC: cs530x: Support for cs530x ADCs
In reply to Paul HandriganAdd support for the cs530x family of high performance ADCs.
--- sound/soc/codecs/Kconfig | 14 + sound/soc/codecs/Makefile | 4 + sound/soc/codecs/cs530x-i2c.c | 72 +++ sound/soc/codecs/cs530x.c | 966 ++++++++++++++++++++++++++++++++++ sound/soc/codecs/cs530x.h | 223 ++++++++ 5 files changed, 1279 insertions(+) create mode 100644 sound/soc/codecs/cs530x-i2c.c create mode 100644 sound/soc/codecs/cs530x.c create mode 100644 sound/soc/codecs/cs530x.h
sound/soc/codecs/Kconfig +14 -0
@@ -99,6 +99,7 @@ config SND_SOC_ALL_CODECS imply SND_SOC_CS47L90 imply SND_SOC_CS47L92 imply SND_SOC_CS53L30 + imply SND_SOC_CS530X_I2C imply SND_SOC_CX20442 imply SND_SOC_CX2072X imply SND_SOC_DA7210
@@ -999,6 +1000,19 @@ config SND_SOC_CS53L30 tristate "Cirrus Logic CS53L30 CODEC" depends on I2C +config SND_SOC_CS530X + tristate + +config SND_SOC_CS530X_I2C + tristate "Cirrus Logic CS530x ADCs (I2C)" + depends on I2C + select REGMAP + select REGMAP_I2C + select SND_SOC_CS530X + help + Enable support for Cirrus Logic CS530X ADCs + with I2C control. + config SND_SOC_CX20442 tristate depends on TTY
sound/soc/codecs/Makefile +4 -0
@@ -107,6 +107,8 @@ snd-soc-cs47l85-y := cs47l85.o snd-soc-cs47l90-y := cs47l90.o snd-soc-cs47l92-y := cs47l92.o snd-soc-cs53l30-y := cs53l30.o +snd-soc-cs530x-y := cs530x.o +snd-soc-cs530x-i2c-y := cs530x-i2c.o snd-soc-cx20442-y := cx20442.o snd-soc-cx2072x-y := cx2072x.o snd-soc-da7210-y := da7210.o
@@ -508,6 +510,8 @@ obj-$(CONFIG_SND_SOC_CS47L85) += snd-soc-cs47l85.o obj-$(CONFIG_SND_SOC_CS47L90) += snd-soc-cs47l90.o obj-$(CONFIG_SND_SOC_CS47L92) += snd-soc-cs47l92.o obj-$(CONFIG_SND_SOC_CS53L30) += snd-soc-cs53l30.o +obj-$(CONFIG_SND_SOC_CS530X) += snd-soc-cs530x.o +obj-$(CONFIG_SND_SOC_CS530X_I2C) += snd-soc-cs530x-i2c.o obj-$(CONFIG_SND_SOC_CX20442) += snd-soc-cx20442.o obj-$(CONFIG_SND_SOC_CX2072X) += snd-soc-cx2072x.o obj-$(CONFIG_SND_SOC_DA7210) += snd-soc-da7210.o
sound/soc/codecs/cs530x-i2c.c new file +72 -0
72 lines not on this page · raw message
sound/soc/codecs/cs530x.c new file +966 -0
966 lines not on this page · raw message
sound/soc/codecs/cs530x.h new file +223 -0
223 lines not on this page · raw message
Signature · 1 line
2.34.1
Mark Brown
maintainerQuoted 25 lines · Paul Handrigan
This patchset provides ASoC support for the latest family of Cirrus Logic multichannel, high performance audio ADCs. The devices that are supported are CS5302 (2 channel ADC), CS5304 (4 channel ADC), and CS5308 (8 channel ADC).
v2 changes:
- Usesizeof(*)instead ofsizeof(struct cs530x_priv)
- Utilizei2c_get_match_datato simpify code.
- Useunintptr_tinstead of enumcs530x_typeto typecastmatch->data.
- Usedev_err_probeinstead ofdev_errin probe.
- Fixgpiod_set_valefor reset to the correct logical value.
- Provided full name for maintainer in DT binding.
- Remove | from after "discription" in DT binding.
- Removed unneeded discription of #sound-dai-cells.
- Changed supply discriptions in DT binding.
- Changeed underscores to dashes for DT property names.
- Added ref for dai-common for DT binding.
- Changed additionalProperties to unevaluatedProperties in DT binding.
- Changed the DT example to have the compatible property first and the reg second.
- Removed typos and blank lines in DT binding.
- Changed adc to cs5304 in DT example.
Quoted 1 line
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: dt-bindings: cirrus,cs530x: Add initial DT binding
commit: 0e2407ae89b340c385afdca1e1c61dd651ae6b35
[2/2] ASoC: cs530x: Support for cs530x ADCs
commit: 2884c29152c098c32e0041061f8327bcdb4e0697All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark