summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/max9867.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: max9867: Drop probe functionLadislav Michl2018-03-021-10/+0
| | | | | | | Driver probe function has no use and can be deleted. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge branch 'topic/wm9867' of ↵Mark Brown2018-03-021-35/+30
|\ | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-max9867
| * ASoC: wm9867: replace codec to componentKuninori Morimoto2018-02-121-35/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: max9867: DSP modeLadislav Michl2018-03-011-4/+10
| | | | | | | | | | | | | | Add configuration for DSP mode. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: max9867: Fix codec capabilitiesLadislav Michl2018-03-011-2/+3
| | | | | | | | | | | | | | | | Codes is stereo only with playback and capture streams bind to the same rate. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: max9867: Improve error loggingLadislav Michl2018-03-011-3/+4
|/ | | | | | | Tell user what are clock rate limits and reindent log messages. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: codecs: constify snd_soc_dai_ops structuresArvind Yadav2017-08-181-1/+1
| | | | | | | | | snd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. 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>
* ASoC: codecs: add const to snd_soc_codec_driver structuresBhumika Goyal2017-08-101-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>
* ASoC: max9867: make array ni_div static constColin Ian King2017-06-221-1/+1
| | | | | | | | | | | | The array ni_div does not need to be in global scope and is not modified, so make it static const. Cleans up sparse warning: "symbol 'ni_div' was not declared. Should it be static?" Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/max9878', 'asoc/topic/max98927', ↵Mark Brown2017-04-301-2/+2
|\ \ | | | | | | | | | 'asoc/topic/mtk' and 'asoc/topic/nau8540' into asoc-next
| * | ASoC: max9867: export OF device ID as module aliasesJavier Martinez Canillas2017-04-051-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The I2C core always reports a MODALIAS of the form i2c:<foo> even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. While there, move the MODULE_DEVICE_TABLE(i2c, max9867_i2c_id) just next to the I2C device table declaration, for consistency with other drivers. Before this patch: $ modinfo sound/soc/codecs/snd-soc-max9867.ko | grep alias alias: i2c:max9867 After this patch: $ modinfo sound/soc/codecs/snd-soc-max9867.ko | grep alias alias: i2c:max9867 alias: of:N*T*Cmaxim,max9867C* alias: of:N*T*Cmaxim,max9867 Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: max9867: remove unused ‘ret’Vinod Koul2016-12-151-3/+2
|/ | | | | | | | | | | | In max9867_dai_set_fmt(), 'ret' is initialized as return value of regmap_raw_write() but never checked, so remove this and assignement. sound/soc/codecs/max9867.c: In function ‘max9867_dai_set_fmt’: sound/soc/codecs/max9867.c:312:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret; Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/max98371', 'asoc/topic/max9867', ↵Mark Brown2016-09-291-3/+2
|\ \ | | | | | | | | | 'asoc/topic/max98926' and 'asoc/topic/mtk' into asoc-next
| | * ASoC: max9867: remove usage of obsoleted TLV-related macroTakashi Sakamoto2016-09-281-3/+2
| |/ | | | | | | | | | | | | | | | | | | | | TLV_DB_RANGE_HEAD macro was obsoleted by commit bf1d1c9b6179 ("ALSA: tlv: add DECLARE_TLV_DB_RANGE()"). This commit removes usage of the macro, with the obsoleting macro renamed to SNDRV_CTL_TLVD_DECLARE_DB_RANGE(). Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: codec duplicated callback function goes to component on wm9867Kuninori Morimoto2016-08-081-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>
* ASoC: max9867: Fix unix permissions for source files.Enric Balletbo i Serra2016-06-221-0/+0
| | | | | | | Change file permissions of source files max9867.c/h from 0755 to 0644. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: max9867: silence and array overflow warningDan Carpenter2016-02-261-0/+2
| | | | | | | | | Smatch complains that we might reach the end of this loop without finding what we're looking for leading to a buffer overflow. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: max9867: Use params_width instead of open-codedAxel Lin2016-02-241-3/+2
| | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: anish kumar <yesanishhere@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: max9867: fix type of variable containing error codesAndrzej Hajda2016-02-241-1/+2
| | | | | | | | | | | | value variable can contain error values and is compared with zero. Its type must be signed. The problem has been detected using coccinelle script scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: max9867: Constify max9867_reg and max9867_regmapAxel Lin2016-02-211-2/+2
| | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: anish kumar <yesanishhere@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: max9867: Make max9867_i2c_id NULL terminatedAxel Lin2016-02-211-0/+1
| | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: anish kumar <yesanishhere@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: max9867: Changed the if-else case to switch caseanish kumar2016-02-181-6/+12
| | | | | Signed-off-by: anish kumar <yesanishhere@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Add max9867 codec driveranish kumar2016-02-181-0/+537
Signed-off-by: anish kumar <yesanishhere@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
OpenPOWER on IntegriCloud