summaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung/i2s.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge branch 'topic/dmaengine' of ↵Mark Brown2016-10-251-3/+0Star
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-samsung
| * | ASoC: samsung: Remove unneeded initialization of chan_nameSylwester Nawrocki2016-10-251-3/+0Star
| |/ | | | | | | | | | | | | | | | | | | | | | | | | This patch updates the I2S drivers to always use chan_names[] field of struct snd_dmaengine_pcm_config for specifying DMA channel names, rather than using struct snd_dmaengine_dai_dma_data. This allows us to subsequently drop the SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME flag, now when the last use of that flag is removed. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* / ASoC: samsung: i2s: Fixup last IRQ unsafe spin lock callCharles Keepax2016-10-241-2/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, I seem to have missed a case where an IRQ safe spinlock was required, in samsung_i2s_dai_remove, when I fixed up the other calls in this patch: 316fa9e09ad7 ("ASoC: samsung: Use IRQ safe spin lock calls") This causes a lockdep warning when unbinding and rebinding the audio card: [ 104.357664] CPU0 CPU1 [ 104.362174] ---- ---- [ 104.366692] lock(&(&pri_dai->spinlock)->rlock); [ 104.371372] local_irq_disable(); [ 104.377283] lock(&(&substream->self_group.lock)->rlock); [ 104.385259] lock(&(&pri_dai->spinlock)->rlock); [ 104.392469] <Interrupt> [ 104.395072] lock(&(&substream->self_group.lock)->rlock); [ 104.400710] [ 104.400710] *** DEADLOCK *** Fixes: ce8bcdbb61d9 ("ASoC: samsung: i2s: Protect more registers with a spinlock") Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Add missing clk_disable_unprepare() on error in ↵Wei Yongjun2016-08-241-2/+6
| | | | | | | | | | | samsung_i2s_probe() Add the missing clk_disable_unprepare() before return from samsung_i2s_probe() in the error handling case. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: Drop usage of struct s3c_dma_params from i2s.cSylwester Nawrocki2016-08-081-24/+24
| | | | | | | | | | | struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: Specify DMA channels through struct snd_dmaengine_pcm_configSylwester Nawrocki2016-07-211-2/+3
| | | | | | | | | | | The DMA channel names are specified through struct snd_dmaengine_pcm_config rather than using SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME flag when booting with devicetree in order to properly support deferred probing. Without this change the sound machine driver initialization can complete successfully with unavailable DMA resources. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: Fix error paths in the I2S driver's probe()Sylwester Nawrocki2016-07-211-5/+20
| | | | | | | | | | Ensure they secondary DAI device is freed properly when asoc_dma_platform registration fails. This change is needed for proper deferred probe support and will help preventing situations when the CPU DAI's initialization completes without required DMA resources. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: Use of_device_get_match_data() helperSylwester Nawrocki2016-05-301-17/+7Star
| | | | | | | | Simplify the code a little by using a standard function for getting the match data. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: Remove definition of an unused data structureSylwester Nawrocki2016-05-301-4/+0Star
| | | | | | | samsung_dai_type_pri is not referenced anywhere so remove it. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: Remove unused "samsung-i2sv4" platform_device_id entrySylwester Nawrocki2016-05-301-3/+0Star
| | | | | | | | | "samsung-i2sv4" identifier was previously used for the I2S device of the S5PV210 SoCs, it can be removed now when s5pv210 is a dt-only platform. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: Use IRQ safe spin lock callsCharles Keepax2016-02-191-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Lockdep warns of a potential lock inversion, i2s->lock is held numerous times whilst we are under the substream lock (snd_pcm_stream_lock). If we use the IRQ unsafe spin lock calls, you can also end up locking snd_pcm_stream_lock whilst under i2s->lock (if an IRQ happens whilst we are holding i2s->lock). This could result in deadlock. [ 18.147001] CPU0 CPU1 [ 18.151509] ---- ---- [ 18.156022] lock(&(&pri_dai->spinlock)->rlock); [ 18.160701] local_irq_disable(); [ 18.166622] lock(&(&substream->self_group.lock)->rlock); [ 18.174595] lock(&(&pri_dai->spinlock)->rlock); [ 18.181806] <Interrupt> [ 18.184408] lock(&(&substream->self_group.lock)->rlock); [ 18.190045] [ 18.190045] *** DEADLOCK *** This patch changes to using the irq safe spinlock calls, to avoid this issue. Fixes: ce8bcdbb61d9 ("ASoC: samsung: i2s: Protect more registers with a spinlock") Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
* ASoC: samsung: pass filter function as pointerArnd Bergmann2015-11-211-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we are now passing the filter data as pointers to the drivers, we can take the final step and also pass the filter function the same way. I'm keeping this change separate, as there it's less obvious that this is a net win. Upsides of this are: - The ASoC drivers are completely independent from the DMA engine implementation, which simplifies the Kconfig logic and in theory allows the same sound drivers to be built in a kernel that supports different kinds of dmaengine drivers. - Consistency with other subsystems and drivers On the other hand, we have a few downsides: - The s3c24xx-dma driver now needs to be built-in for the ac97 platform device to be instantiated on s3c2440. - samsung_dmaengine_pcm_config cannot be marked 'const' any more because the filter function pointer needs to be set at runtime. This is safe as long we don't have multiple different DMA engines in thet same system at runtime, but is nonetheless ugly. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: pass DMA channels as pointersArnd Bergmann2015-11-181-21/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | ARM64 allmodconfig produces a bunch of warnings when building the samsung ASoC code: sound/soc/samsung/dmaengine.c: In function 'samsung_asoc_init_dma_data': sound/soc/samsung/dmaengine.c:53:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] playback_data->filter_data = (void *)playback->channel; sound/soc/samsung/dmaengine.c:60:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] capture_data->filter_data = (void *)capture->channel; We could easily shut up the warning by adding an intermediate cast, but there is a bigger underlying problem: The use of IORESOURCE_DMA to pass data from platform code to device drivers is dubious to start with, as what we really want is a pointer that can be passed into a filter function. Note that on s3c64xx, the pl08x DMA data is already a pointer, but gets cast to resource_size_t so we can pass it as a resource, and it then gets converted back to a pointer. In contrast, the data we pass for s3c24xx is an index into a device specific table, and we artificially convert that into a pointer for the filter function. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: Constify platform_device_idKrzysztof Kozlowski2015-05-011-1/+1
| | | | | | | | The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Add clock provider for the I2S internal clocksSylwester Nawrocki2015-01-141-20/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds clock provider (currently only for DT platforms) for the CODECLKO (CDCLK) gate, RCLKSRC mux and RCLK pre-scaler divider divider clock. Those all tree clock are only available in the IIS Multi Audio Interface (I2S0), the regular IIS Bus Interface has only CDCLK gate clock. The motivation behind this patch is to expose the I2S internal clocks which are currently controlled through set_sysclk() through the clk API, so dedicated sound machine driver per each board can be avoided. The intention is also to fix the CDCLK gating issue reported by Daniel Drake: http://mailman.alsa-project.org/pipermail/alsa-devel/2014-September/081753.html This patch also reverts commit b97c60abf9a561f86ae71bd741add02673cc1 ("ASoC: samsung-i2s: Maintain CDCLK settings across i2s_{shutdown/ startup}") The problem that commit attempted to solve only affects the Odroid X2/U3, which doesn't configure the CDCLK clock in struct snd_soc_dai_ops hw_params callback and the issue should be now resolved by using clk API, i.e. having the codec enabling/ disabling the CDCLK clock as required. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Protect more registers with a spinlockSylwester Nawrocki2015-01-141-30/+51
| | | | | | | | Ensure the I2SMOD, I2SPSR registers, which are also exposed through clk API are only accessed with the i2s->spinlock spinlock held. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Add spinlock in place of local_irq_* callsSylwester Nawrocki2015-01-141-5/+13
| | | | | | | | | | | | It seems this driver hasn't been updated for SMP, as local_irq_save/ local_irq_restore don't provide proper protection of read/modify/write of the device's registers on such systems. Introduce a spinlock serializing access to the register region, it will be helpful later when I2SMOD, I2SPSR registers are made also accessible through the clk API. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Remove an unneeded goto usageSylwester Nawrocki2015-01-141-9/+8Star
| | | | | | | The usage of this goto seems unjustified, use if/else statement instead. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Add get_other_dai helper functionSylwester Nawrocki2015-01-141-9/+15
| | | | | | | | The code to get pointer to the other DAI is repeated multiple times. Add a helper function and use it instead. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Move clk enable to the platform driver probe()Sylwester Nawrocki2015-01-141-14/+11Star
| | | | | | | | | | | | | | | | | | | The clk_prepare_enable() call on the "iis" clock is moved to happen earlier in the DAI platform device driver's probe() callback, so the I2S registers can be safely accessed through the clk API, after the clk supplier is registered in the platform device probe(). After this patch the "iis" clock is kept enabled since the (primary) I2S platform device probe() and until the platform device driver remove() call. This is similar to gating the clock in the snd_soc_dai probe() and remove() callbacks. Normally, in addition to that we should mark the device as PM runtime active, so if runtime PM is enabled it can idle the device by turning off the clock. Correcting this issue is left for a separate patch series, as we need to ensure the BUSCLK clock is always enabled when required. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Move clk_get() to platform driver probe()Sylwester Nawrocki2015-01-141-12/+7Star
| | | | | | | | | Acquire the I2S interface clock in driver probe() callback as it's a per-device not a per-DAI clock. While at it switch to the resource managed clk_get(). Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Request memory region in driver probe()Sylwester Nawrocki2015-01-141-38/+7Star
| | | | | | | | | | | The memory mapped registers region is common for both DAIs so request it in the I2S platform device driver's probe for the platform device corresponding to the primary DAI, rather than in the ASoC DAI's probe callback. While at it switch to devm_ioremap_resource(). This also drops the hard coded (0x100) register region size in the driver. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Add return value checks in probe()Sylwester Nawrocki2015-01-141-4/+8
| | | | | | | These functions may fail so let's properly report any errors. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: samsung_i2s_get_driver_data() cleanupSylwester Nawrocki2015-01-141-5/+4Star
| | | | | | | | | | Tidy up the samsung_i2s_get_driver_data() function by using IS_ENABLE() instead of #ifdef and add missing braces for the 'else' part. Also ensure we are not dereferencing NULL 'match' pointer. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Remove unused gpios field from struct i2sSylwester Nawrocki2015-01-061-1/+0Star
| | | | | | | | | The 'gpios' field in 'struct i2s' is now unused, this change seems to be missing in commit 0429ffeff460c4302bd1520e6 ("ASoC: samsung: Remove obsolete GPIO based DT pinmuxing"). Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge tag 'sound-fix-3.19-rc1' of ↵Linus Torvalds2014-12-201-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here are a few fixes that have landed after the previous pull request. All are driver specific fixes including: - error/int value fixes in OXFW, - Intel Skylake HD-audio HDMI codec support, - Additional HD-audio Realtek codecs and AD1986A codec fixes/quirks, - a few more DSD support and a quirk for Arcam rPAC in usb-audio, - a typo fix for Scarlett 6i6, - fixes for new ASIHPI firmware, - ASoC Exynos7 cleanups, - Intel ACPI support, and - a fix for PCM512 register cache sync" * tag 'sound-fix-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (24 commits) ALSA: usb-audio: extend KEF X300A FU 10 tweak to Arcam rPAC ALSA: hda/realtek - New codec support for ALC298 ALSA: asihpi: update to HPI version 4.14 ALSA: asihpi: increase tuner pad cache size ALSA: asihpi: relax firmware version check ALSA: usb-audio: Fix Scarlett 6i6 initialization typo ALSA: hda - Add quirk for Packard Bell EasyNote MX65 ALSA: usb-audio: add native DSD support for Matrix Audio DACs ALSA: hda/realtek - New codec support for ALC256 ALSA: hda/realtek - Add new Dell desktop for ALC3234 headset mode ASoC: Intel: fix possible acpi enumeration panic ALSA: hda/hdmi - apply Haswell fix-ups to Skylake display codec ASoC: Intel: fix return value check in sst_acpi_probe() ALSA: hda - Make add_stereo_mix_input flag tristate ALSA: hda - Create capture source ctls when stereo mix input is added ALSA: hda - Fix typos in snd_hda_get_int_hint() kerneldoc comments ALSA: hda - add codec ID for Skylake display audio codec ALSA: oxfw: some signedness bugs ALSA: oxfw: fix detect_loud_models() return value ASoC: rt5677: add REGMAP_I2C and REGMAP_IRQ dependency ...
| *-. Merge remote-tracking branches 'asoc/fix/atmel', 'asoc/fix/intel', ↵Mark Brown2014-12-161-70/+176
| |\ \ | | | | | | | | | | | | 'asoc/fix/rt5645', 'asoc/fix/rt5677' and 'asoc/fix/samsung' into asoc-linus
| | | * ASoC: samsung: i2s: Add missing assignment of variant_regsSylwester Nawrocki2014-12-081-0/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add assignment of the variant_regs field which is missing in commit a5a56871f804edac93a53b5e871c0e9818fb9033 ("ASoC: samsung: add support for exynos7 I2S controller"). Without this attempting to probe the secondary DAI fails with an error like: [ 1.763026] Unable to handle kernel NULL pointer dereference at virtual address 0000000c [ 1.780895] pgd = c0004000 [ 1.783606] [0000000c] *pgd=00000000 [ 1.838255] Internal error: Oops: 5 [#1] PREEMPT SMP ARM [ 1.843514] Modules linked in: [ 1.846558] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.18.0-rc1-00009-g5dcb01e-dirty #1521 [ 1.854887] task: ee00a800 ti: ee088000 task.ti: ee088000 [ 1.860284] PC is at i2s_txctrl+0x40/0x2d4 [ 1.864350] LR is at i2s_txctrl+0x28/0x2d4 [ 1.868428] pc : [<c036ffd4>] lr : [<c036ffbc>] psr: 60000153 [ 1.868428] sp : ee089dc0 ip : 00000000 fp : ee21f000 [ 1.879883] r10: 00000000 r9 : ee21fb00 r8 : c06406c4 [ 1.885091] r7 : ee21fb00 r6 : 00000000 r5 : f00f6000 r4 : ed943410 [ 1.891601] r3 : 0000016c r2 : c0464550 r1 : c055cef8 r0 : ed943610 [ 1.898113] Flags: nZCv IRQs on FIQs off Mode SVC_32 ISA ARM Segment kernel [ 1.905490] Control: 10c5387d Table: 4000404a DAC: 00000015 [ 1.911218] Process swapper/0 (pid: 1, stack limit = 0xee088240) [ 1.917208] Stack: (0xee089dc0 to 0xee08a000) ... [ 2.068431] [<c036ffd4>] (i2s_txctrl) from [<c03719fc>] (samsung_i2s_dai_probe+0xb8/0x450) [ 2.076676] [<c03719fc>] (samsung_i2s_dai_probe) from [<c03607e0>] (snd_soc_register_card+0xd98/0x1348) [ 2.086044] [<c03607e0>] (snd_soc_register_card) from [<c03726e4>] (odroidx2_audio_probe+0xa8/0x11c) [ 2.095160] [<c03726e4>] (odroidx2_audio_probe) from [<c0249dd0>] (platform_drv_probe+0x48/0xa4) [ 2.103922] [<c0249dd0>] (platform_drv_probe) from [<c0248988>] (driver_probe_device+0x10c/0x22c) [ 2.112773] [<c0248988>] (driver_probe_device) from [<c0248b34>] (__driver_attach+0x8c/0x90) [ 2.121192] [<c0248b34>] (__driver_attach) from [<c02471c8>] (bus_for_each_dev+0x54/0x88) [ 2.129352] [<c02471c8>] (bus_for_each_dev) from [<c0248188>] (bus_add_driver+0xd4/0x1d0) [ 2.137510] [<c0248188>] (bus_add_driver) from [<c024915c>] (driver_register+0x78/0xf4) [ 2.145499] [<c024915c>] (driver_register) from [<c0008924>] (do_one_initcall+0x80/0x1b8) [ 2.153670] [<c0008924>] (do_one_initcall) from [<c05b7d40>] (kernel_init_freeable+0xfc/0x1c8) [ 2.162260] [<c05b7d40>] (kernel_init_freeable) from [<c04146c0>] (kernel_init+0x8/0xec) [ 2.170330] [<c04146c0>] (kernel_init) from [<c000e7f8>] (ret_from_fork+0x14/0x3c) [ 2.177873] Code: e5940000 e59f128c e59f228c e2800010 (e59c700c) Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge tag 'pm+acpi-3.19-rc1-2' of ↵Linus Torvalds2014-12-191-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI and power management updates from Rafael Wysocki: "These are regression fixes (leds-gpio, ACPI backlight driver, operating performance points library, ACPI device enumeration messages, cpupower tool), other bug fixes (ACPI EC driver, ACPI device PM), some cleanups in the operating performance points (OPP) framework, continuation of CONFIG_PM_RUNTIME elimination, a couple of minor intel_pstate driver changes, a new MAINTAINERS entry for it and an ACPI fan driver change needed for better support of thermal management in user space. Specifics: - Fix a regression in leds-gpio introduced by a recent commit that inadvertently changed the name of one of the properties used by the driver (Fabio Estevam). - Fix a regression in the ACPI backlight driver introduced by a recent fix that missed one special case that had to be taken into account (Aaron Lu). - Drop the level of some new kernel messages from the ACPI core introduced by a recent commit to KERN_DEBUG which they should have used from the start and drop some other unuseful KERN_ERR messages printed by ACPI (Rafael J Wysocki). - Revert an incorrect commit modifying the cpupower tool (Prarit Bhargava). - Fix two regressions introduced by recent commits in the OPP library and clean up some existing minor issues in that code (Viresh Kumar). - Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout the tree (or drop it where that can be done) in order to make it possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki, Ulf Hansson, Ludovic Desroches). There will be one more "CONFIG_PM_RUNTIME removal" batch after this one, because some new uses of it have been introduced during the current merge window, but that should be sufficient to finally get rid of it. - Make the ACPI EC driver more robust against race conditions related to GPE handler installation failures (Lv Zheng). - Prevent the ACPI device PM core code from attempting to disable GPEs that it has not enabled which confuses ACPICA and makes it report errors unnecessarily (Rafael J Wysocki). - Add a "force" command line switch to the intel_pstate driver to make it possible to override the blacklisting of some systems in that driver if needed (Ethan Zhao). - Improve intel_pstate code documentation and add a MAINTAINERS entry for it (Kristen Carlson Accardi). - Make the ACPI fan driver create cooling device interfaces witn names that reflect the IDs of the ACPI device objects they are associated with, except for "generic" ACPI fans (PNP ID "PNP0C0B"). That's necessary for user space thermal management tools to be able to connect the fans with the parts of the system they are supposed to be cooling properly. From Srinivas Pandruvada" * tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits) MAINTAINERS: add entry for intel_pstate ACPI / video: update the skip case for acpi_video_device_in_dod() power / PM: Eliminate CONFIG_PM_RUNTIME NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM ACPI / EC: Fix unexpected ec_remove_handlers() invocations Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()" tracing / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM x86 / PM: Replace CONFIG_PM_RUNTIME in io_apic.c PM: Remove the SET_PM_RUNTIME_PM_OPS() macro mmc: atmel-mci: use SET_RUNTIME_PM_OPS() macro PM / Kconfig: Replace PM_RUNTIME with PM in dependencies ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM phy / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM tty / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM ACPI / PM: Do not disable wakeup GPEs that have not been enabled ACPI / utils: Drop error messages from acpi_evaluate_reference() ...
| * | | sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PMRafael J. Wysocki2014-12-131-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under sound/. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Acked-by: Mark Brown <broonie@kernel.org>
* | | Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds2014-12-151-1/+0Star
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
| * | ASoC: samsung: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0Star
| |/ | | | | | | | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* | ASoC: samsung: Fix non-DT use of I2S controllerMark Brown2014-12-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes in commit a5a56871f804e (ASoC: samsung: add support for exynos7 I2S controller) introduce a new variant_regs structure in the driver data which is now mandatory for accessing registers. Unfortunately this is only hooked up for DT platforms so non-DT platforms like my primary development platform for audio are broken by this change and crash on boot. Since the only non-DT user of these device is s3c64xx fix this by making the standard samsung-i2s device be of type I2Sv3 and add a new I2Sv4 name to the platform data section, currently using the I2Sv5 information which should be about right. Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: samsung: Fix error handling for clock lookupMark Brown2014-12-061-2/+8
| | | | | | | | | | | | | | Return the error code we got from clk_get() and check to make sure that clk_prepare_enable() worked. Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: samsung: ASoC: samsung: Fix IISMOD setting in i2s_set_sysclk()Padmavathi Venna2014-11-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | In the i2s_set_sysclk() callback we are currently clearing all bits of the IISMOD register in i2s_set_sysclk. It's due to an incorrect mask used for the AND operation which is introduced in commit a5a56871f804edac93a53b5e871c0e9818fb9033 (ASoC: samsung: add support for exynos7 I2S controller) and also adds the missing break statement. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Padmavathi Venna <padma.v@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: samsung: add support for exynos7 I2S controllerPadmavathi Venna2014-11-071-62/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exynos7 I2S controller has no internal dma, supports more no. of root clock sampling frequencies and has more no.of Rx fifos to support 7.1CH recording in TDM mode. Due to more no. of root clock frequency values some of the bit offsets got shifted up by one. Also I2S1 on previous Samsung platforms uses v3 dai type but on Exynos7 it is upgraded to v5 with slightly modified register offsets for supporting more no.of RFS values. Due to the above changes, the driver has to be modified to handle all versions of I2S controller. For this I introduced a new structure to hold modified bit offsets and masks which is passed as dai data. Signed-off-by: Padmavathi Venna <padma.v@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: Samsung: Add quirk for internal DMAPadmavathi Venna2014-11-071-6/+6
|/ | | | | | | | Internal DMA is available only on some of Samsung platforms. So added a quirk for the same and made it optional. Signed-off-by: Padmavathi Venna <padma.v@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung-i2s: Check secondary DAI exists before referencingCharles Keepax2014-09-091-2/+3
| | | | | | | | | | | In a couple of places the driver is missing a check to ensure there is a secondary DAI before it de-references the pointer to it, causing a null pointer de-reference. This patch adds a check to avoid this. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
*-. Merge remote-tracking branches 'asoc/topic/rt5670', 'asoc/topic/rt5677', ↵Mark Brown2014-08-041-6/+0Star
|\ \ | | | | | | | | | 'asoc/topic/s6000', 'asoc/topic/samsung' and 'asoc/topic/sh-fsi' into asoc-next
| | * ASoC: samsung: remove unused DMA dataArnd Bergmann2014-07-141-6/+0Star
| |/ | | | | | | | | | | | | | | | | The s3c_dma_client structures and the 'ch' and 'ops' members in s3c_dma_params were only used by the legacy DMA driver and serve no function any more. This removes any reference to them. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: samsung-i2s: Maintain CDCLK settings across i2s_{shutdown/startup}Sylwester Nawrocki2014-07-111-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently configuration of the CDCLK pad is being overwritten in the i2s_shutdown() callback in order to gate the SoC output clock. However if an ASoC machine driver doesn't restore that clock settings each time after opening the sound device this results in the CDCLK pin being permanently configured into input mode. I.e. the output clock will always stay disabled. Fix that by saving the CDCLKCON bit state in i2s_shutdown() and and restoring it in the i2s_startup() callback. Signed-off-by: Chen Zhen <zhen1.chen@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: samsung: Correct I2S DAI suspend/resume opsSylwester Nawrocki2014-07-041-10/+6Star
|/ | | | | | | | | | | | We should save/restore relevant I2S registers regardless of the dai->active flag, otherwise some settings are being lost after system suspend/resume cycle. E.g. I2S slave mode set only during dai initialization is not preserved and the device ends up in master mode after system resume. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
* ASoC: samsung: Use params_width()Tushar Behera2014-05-261-4/+4
| | | | | | | | | commit 8c5178fca4ce ("ALSA: Add params_width() helpers") introduces a helper to get the sample width. Updating Samsung related sound drivers to use this helper. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: samsung: Handle errors when getting the op_clk clockSylwester Nawrocki2014-05-221-1/+5
| | | | | | | | | Ensure i2s->op_clk is not used when clk_get() for this clock fails. This prevents working with an incorrectly configured clock in some conditions. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: samsung: Use devm_snd_soc_register_platformTushar Behera2014-05-221-2/+0Star
| | | | | | | | | | Replaced snd_soc_register_platform with devm_snd_soc_register_platform in samsung_asoc_dma_platform_register(). This makes the function samsung_asoc_dma_platform_unregister() redundant. This is removed and all its users are updated. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: samsung: Allow setting OP_CLK of the IIS Multi Audio InterfaceSylwester Nawrocki2014-05-211-0/+4
| | | | | | | | This patch adds support for setting source clock of the "Core CLK" of the IIS Multi Audio Interface. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: samsung: Don't clear clock setting during i2s_startupTushar Behera2014-04-231-3/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | In exiting kernel, if DAIFMT flags are set in dai_link and I2S is set to run in master mode, the I2S clocks are not getting configured resulting in no output. Existing code clears the current I2S clock settings during i2s_startup and requires that the clocks are reconfigured. It then assumes that sound-card driver would call snd_soc_dai_{set_sysclk/set_fmt} to configure the root clock. 1. Since I2S clock settings remain fixed for a board, it would be better to set the clocks once during sound-card probe. 2. Also if the DAIFMT flags are set in dai_link, snd_soc_dai_set_fmt is called during DAI probe. If both these conditions are true, then I2S clock remains unconfigured during audio playback. Fix this by removing the code to clear rclk_srcrate in i2s_startup. Instead, reset this during DAI probe. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: samsung: Fix build on multiplatformSachin Kamat2014-04-081-3/+3
| | | | | | | | | | | | PCM and S/PDIF drivers referenced mach headers for a trivial data structure. This caused build errors on multiplatform builds as machine headers are not accessible from driver files. Move the data structure definition to the driver header and remove the dependency. While at it rename the structure to avoid multiple definition errors as the same structure is also used by the platform code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: samsung: Remove dma.h inclusionSachin Kamat2014-01-241-2/+0Star
| | | | | | | mach/dma.h is not referenced by this file. Remove it. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: samsung: Add NULL check in i2s.cSachin Kamat2014-01-241-1/+2
| | | | | | | | | 'res' could be NULL from one of the operations above (line 1243). Thus check 'res' for NULL before releasing the region to avoid null pointer dereference. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>