summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5659.c
AgeCommit message (Collapse)AuthorFilesLines
2017-09-01Merge remote-tracking branches 'asoc/topic/rt5563', 'asoc/topic/rt5616', ↵Mark Brown1-1/+1
'asoc/topic/rt5645', 'asoc/topic/rt5659' and 'asoc/topic/rt5663' into asoc-next
2017-08-10ASoC: codecs: add const to snd_soc_codec_driver structuresBhumika Goyal1-1/+1
Declare snd_soc_codec_driver structures as const as they are only passed as an argument to the function snd_soc_register_codec. This argument is of type const, so declare the structures with this property as const. In file codecs/sn95031.c, snd_soc_codec_driver structure is also used in a copy operation along with getting passed to snd_soc_register_codec. So, it can be made const too. Done using Coccinelle: @match disable optional_qualifier@ identifier s; position p; @@ static struct snd_soc_codec_driver s@p={...}; @good1@ identifier match.s; position p; @@ snd_soc_register_codec(...,&s@p,...) @bad@ identifier match.s; position p!={match.p,good1.p}; @@ s@p @depends on !bad disable optional_qualifier@ identifier match.s; @@ static +const struct snd_soc_codec_driver s={...}; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-24ASoC: rt5659: constify acpi_device_id.Arvind Yadav1-1/+1
acpi_device_id are not supposed to change at runtime. All functions working with acpi_device_id provided by <acpi/acpi_bus.h> work with const acpi_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-17ASoC: rt5659: fix platform_no_drv_owner.cocci warningskbuild test robot1-1/+0
sound/soc/codecs/rt5659.c:4236:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-12ASoC: rt5659: drop double constNicholas Mc Guire1-43/+43
Drop the const qualifier as it is being added by SOC_ENUM_DOUBLE_DECL() already which is called by SOC_ENUM_SINGLE_DECL() as well as the double const by calls to SOC_VALUE_ENUM_SINGLE_DECL() via SOC_VALUE_ENUM_DOUBLE_DECL). Fixes: commit d3cb2de2479b ("ASoC: rt5659: add rt5659 codec driver") Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-12ASoC: rt5659: declare rt5659_i2c_driver staticNicholas Mc Guire1-1/+1
Declar rt5659_i2c_driver, which is only being passed to module_i2c_driver(rt5659_i2c_driver), static. Fixes: commit d3cb2de2479b ("ASoC: rt5659: add rt5659 codec driver") Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-12ASoC: rt5659: use msleep() for long delaysNicholas Mc Guire1-1/+1
ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. For this large delay msleep() is preferable. Fixes: commit d3cb2de2479b ("ASoC: rt5659: add rt5659 codec driver") Link: http://lkml.org/lkml/2017/1/11/377 Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-29Merge remote-tracking branches 'asoc/topic/rt5659', 'asoc/topic/rt5660', ↵Mark Brown1-0/+27
'asoc/topic/rt5677' and 'asoc/topic/samsung' into asoc-next
2016-09-01ASoC: rt5659: Enable IRQ output for GPIO1 pinNicolin Chen1-0/+3
Since it's possible to have an IRQ without enabling JD3, the GPIO1 pin then would remain its default GPIO function which is set as an input direction (seeing from rt5659). Meanwhile, CPU would also listen this connection via its own GPIO input: [input] [input] CPU GPIO <--------> RT5659 GPIO1 The result for the IRQ on the CPU side will be unexpectable. So this patch enables the IRQ output for GPIO1 pin any way as long as there's an IRQ assigned from platform data or DT: [input] [IRQ output] CPU GPIO <--------< RT5659 GPIO1 Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: codec duplicated callback function goes to component on rt5659Kuninori Morimoto1-6/+8
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-08-08ASoC: rt5659: Add mclk controlsNicolin Chen1-0/+24
The codec driver should control the mclk. So this patch adds this support. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-13Merge remote-tracking branches 'asoc/topic/rt5640', 'asoc/topic/rt5659', ↵Mark Brown1-1/+1
'asoc/topic/samsung' and 'asoc/topic/ssm4567' into asoc-next
2016-01-21ASoC: rt5659: avoid unused variable warning for rt5659_acpi_matchArnd Bergmann1-5/+10
The newly added rt5659 codec driver unconditionally defines an ACPI device match table but then uses ACPI_PTR() to remove the only reference to it, so we get a harmless build warning: sound/soc/codecs/rt5659.c:4200:30: warning: 'rt5659_acpi_match' defined but not used [-Wunused-variable] static struct acpi_device_id rt5659_acpi_match[] = { This changes both the OF match table and the ACPI match table to follow the same style, using ACPI_PTR/of_match_ptr to make the reference conditional, and using an #ifdef to hide the table. This also adds the missing MODULE_DEVICE_TABLE for the OF case and adapts the formatting to the same style. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-01-13ASoC: rt5659: Staticise rt5659_i2c_shutdownAxel Lin1-1/+1
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-01-13ASoC: rt5659: Fix irq leakAxel Lin1-12/+4
Use devm_request_threaded_irq to ensure the irq is freed when unload the module. The rt5659->i2c is no longer used after this conversion, thus remove it as well. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18ASoC: rt5659: add rt5659 codec driverBard Liao1-0/+4223
This is the initial codec driver for rt5659. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>