aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/atmel/atmel-classd.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-21treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 3Thomas Gleixner1-4/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 or later as published by the free software foundation extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 9 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190519154040.848507137@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-28Merge remote-tracking branches 'asoc/topic/arizona', 'asoc/topic/atmel', 'asoc/topic/bd28623', 'asoc/topic/blackfin' and 'asoc/topic/bt-sco' into asoc-nextMark Brown1-32/+29
2018-03-01ASoC: atmel: Remove redundant dev_err() call in probe functionLadislav Michl1-5/+2
There is an error message within devm_ioremap_resource already, so remove the redundant dev_err() call. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12ASoC: atmel: replace platform to componentKuninori Morimoto1-1/+3
Now platform can be replaced to component, let's do it. To avoid complex operation, this patch adds device pointer to atmel_classd. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12ASoC: atmel-classd: replace codec to componentKuninori Morimoto1-27/+27
Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-04ASoC: use snd_soc_component_init_regmap() on atmel-classdKuninori Morimoto1-6/+0
To setup regmap, ALSA SoC has snd_soc_component_init_regmap() and .get_regmap. But these are duplicated feature. This driver is using .get_regmap and set regmap by using dev_get_regmap(), but it is automatically done by snd_soc_component_add_unlocked(). let's remove .get_regmap. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-13Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linuxLinus Torvalds1-33/+14
Pull clk updates from Stephen Boyd: "The diff is dominated by the Allwinner A10/A20 SoCs getting converted to the sunxi-ng framework. Otherwise, the heavy hitters are various drivers for SoCs like AT91, Amlogic, Renesas, and Rockchip. There are some other new clk drivers in here too but overall this is just a bunch of clk drivers for various different pieces of hardware and a collection of non-critical fixes for clk drivers. New Drivers: - Allwinner R40 SoCs - Renesas R-Car Gen3 USB 2.0 clock selector PHY - Atmel AT91 audio PLL - Uniphier PXs3 SoCs - ARC HSDK Board PLLs - AXS10X Board PLLs - STMicroelectronics STM32H743 SoCs Removed Drivers: - Non-compiling mb86s7x support Updates: - Allwinner A10/A20 SoCs converted to sunxi-ng framework - Allwinner H3 CPU clk fixes - Renesas R-Car D3 SoC - Renesas V2H and M3-W modules - Samsung Exynos5420/5422/5800 audio fixes - Rockchip fractional clk approximation fixes - Rockchip rk3126 SoC support within the rk3128 driver - Amlogic gxbb CEC32 and sd_emmc clks - Amlogic meson8b reset controller support - IDT VersaClock 5P49V5925/5P49V6901 support - Qualcomm MSM8996 SMMU clks - Various 'const' applications for struct clk_ops - si5351 PLL reset bugfix - Uniphier audio on LD11/LD20 and ethernet support on LD11/LD20/Pro4/PXs2 - Assorted Tegra clk driver fixes" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (120 commits) clk: si5351: fix PLL reset ASoC: atmel-classd: remove aclk clock ASoC: atmel-classd: remove aclk clock from DT binding clk: at91: clk-generated: make gclk determine audio_pll rate clk: at91: clk-generated: create function to find best_diff clk: at91: add audio pll clock drivers dt-bindings: clk: at91: add audio plls to the compatible list clk: at91: clk-generated: remove useless divisor loop clk: mb86s7x: Drop non-building driver clk: ti: check for null return in strrchr to avoid null dereferencing clk: Don't write error code into divider register clk: uniphier: add video input subsystem clock clk: uniphier: add audio system clock clk: stm32h7: Add stm32h743 clock driver clk: gate: expose clk_gate_ops::is_enabled clk: nxp: clk-lpc32xx: rename clk_gate_is_enabled() clk: uniphier: add PXs3 clock data clk: hi6220: change watchdog clock source clk: Kconfig: Name RK805 in Kconfig for COMMON_CLK_RK808 clk: cs2000: Add cs2000_set_saved_rate ...
2017-09-01ASoC: atmel-classd: remove aclk clockQuentin Schulz1-33/+14
Since gclk (generated-clk) is now able to determine the rate of the audio_pll, there is no need for classd to have a direct phandle to the audio_pll while already having a phandle to gclk. Thus, remove all mentions to aclk in classd driver and update macros and variable names. Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-08-21ASoC: atmel: Remove unnecessary function callDonglin Peng1-1/+0
The function platform_set_drvdata copies the value the variable card to card->dev->driver_data, then the address of &pdev->dev is assigned to card->dev in atmel_classd_asoc_card_init, but when calling snd_soc_register_card,the function dev_set_drvdata(card->dev, card) will do the same copy operation, so i think that the former copy operation can be removed. Signed-off-by: Peng Donglin <dolinux.peng@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-17ASoC: atmel-classd: sync regcache when resumingQuentin Schulz1-0/+9
The PM functions used in this driver are the ones defined in sounc/soc/soc-core.c. When suspending (using snd_soc_suspend), the regcache is marked dirty but is never synced on resume. Sync regcache on resume of Atmel ClassD device. Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07ASoC: atmel-classd: fix audio clock rateSongjun Wu1-1/+1
Fix the audio clock rate according to the datasheet. Reported-by: Dushara Jayasinghe <dushara@successful.com.au> Signed-off-by: Songjun Wu <songjun.wu@microchip.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2016-08-08ASoC: codec duplicated callback function goes to component on atmel-classdKuninori Morimoto1-2/+4
codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-04ASoC: Atmel: ClassD: Simplify use of devm_ioremap_resourceAmitoj Kaur Chawla1-5/+0
Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. The Coccinelle semantic patch that makes this change is as follows: // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-23Merge remote-tracking branches 'asoc/topic/atmel-classd', 'asoc/topic/const' and 'asoc/topic/da7218' into asoc-nextMark Brown1-4/+8
2015-12-12ASoC: Atmel: ClassD: unregister codec when error occursSongjun Wu1-4/+10
Add code to unregister codec in probe function, when the error occurs after the codec is registered. Signed-off-by: Songjun Wu <songjun.wu@atmel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-20ASoC: Atmel: ClassD: supports mono audioSongjun Wu1-4/+8
Modify the code to support mono audio. Signed-off-by: Songjun Wu <songjun.wu@atmel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-23ASoC: atmel-classd: add the Audio Class D AmplifierSongjun Wu1-0/+679
Add driver for the digital imput to PWM output stereo class D amplifier. It comes with filter, digitally controlled gain, an equalizer and a dmphase filter. Signed-off-by: Songjun Wu <songjun.wu@atmel.com> Signed-off-by: Mark Brown <broonie@kernel.org>