summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/mt6359-accdet.c
AgeCommit message (Collapse)AuthorFilesLines
2023-10-09ASoC: Explicitly include correct DT includesRob Herring1-4/+0
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> # for at91 Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-1-13a4f0f7fee6@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-15ASoC: mt6359: fix tests for platform_get_irq() failureDan Carpenter1-3/+3
The platform_get_irq() returns negative error codes. It can't actually return zero, but if it did that should be treated as success. Fixes: eef07b9e0925 ("ASoC: mediatek: mt6359: add MT6359 accdet jack driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YvThhr86N3qQM2EO@kili Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-13ASoC: mt6359: Fix refcount leak bugLiang He1-0/+1
In mt6359_parse_dt() and mt6359_accdet_parse_dt(), we should call of_node_put() for the reference returned by of_get_child_by_name() which has increased the refcount. Fixes: 683530285316 ("ASoC: mt6359: fix failed to parse DT properties") Fixes: eef07b9e0925 ("ASoC: mediatek: mt6359: add MT6359 accdet jack driver") Signed-off-by: Liang He <windhl@126.com> Link: https://lore.kernel.org/r/20220713102013.367336-1-windhl@126.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-05ASoC: mt6359-accdet.c: remove useless assignmentsPierre-Louis Bossart1-4/+4
cppcheck warnings (and additional issue found by code inspection) sound/soc/codecs/mt6359-accdet.c:464:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210804192456.278702-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-04ASoC: mediatek: mt6359: convert to use module_platform_driverNobuhiro Iwamatsu1-16/+1
Simplify the code by using module_platform_driver macro for mt6359-accdet. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp> Link: https://lore.kernel.org/r/20210531051203.228567-1-nobuhiro1.iwamatsu@toshiba.co.jp Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-10ASoC: codecs: mt6359-accdet: remove useless initializationPierre-Louis Bossart1-1/+1
cppcheck warning sound/soc/codecs/mt6359-accdet.c:417:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ sound/soc/codecs/mt6359-accdet.c:464:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210426214701.235106-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-30ASoC: mediatek: mt6359: Fix spelling mistake "reate" -> "create"Colin Ian King1-1/+1
There is a spelling mistake in a dev_err error message. Fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210330084710.997731-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-25ASoC: mediatek: mt6359: add MT6359 accdet jack driverArgus Lin1-0/+1080
MT6359 audio codec supports jack detection feature, adds MT6359 accdet driver to support jack plugged detection and key detection. Signed-off-by: Argus Lin <argus.lin@mediatek.com> Link: https://lore.kernel.org/r/1615383186-18500-3-git-send-email-argus.lin@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>