summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/adau1977.c
diff options
context:
space:
mode:
authorAlexandru Ardelean <alexandru.ardelean@analog.com>2020-10-19 13:53:13 +0300
committerMark Brown <broonie@kernel.org>2020-10-26 21:37:03 +0300
commitab589bac553f79d559952aa088480a72258ac5bc (patch)
tree3b75a7f48087d166f630192af6b0efc82cc91930 /sound/soc/codecs/adau1977.c
parent76b5f68bbf7df9343b69fbee04d5edf50680c231 (diff)
downloadlinux-ab589bac553f79d559952aa088480a72258ac5bc.tar.xz
ASoC: adau1977: remove platform data and move micbias bindings include
The change removes the platform_data include/definition. It only contains some values for the MICBIAS. These are moved into 'dt-bindings/sound/adi,adau1977.h' so that they can be used inside device-trees. When moving then, they need to be converted to pre-compiler defines, so that the DT compiler can understand them. The driver then, also needs to include the new 'dt-bindings/sound/adi,adau1977.h' file. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20201019105313.24862-1-alexandru.ardelean@analog.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/adau1977.c')
-rw-r--r--sound/soc/codecs/adau1977.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c
index 0a36e523584c..8260f49caa24 100644
--- a/sound/soc/codecs/adau1977.c
+++ b/sound/soc/codecs/adau1977.c
@@ -12,7 +12,6 @@
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/module.h>
-#include <linux/platform_data/adau1977.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
@@ -24,6 +23,8 @@
#include <sound/soc.h>
#include <sound/tlv.h>
+#include <dt-bindings/sound/adi,adau1977.h>
+
#include "adau1977.h"
#define ADAU1977_REG_POWER 0x00
@@ -881,13 +882,9 @@ static const struct snd_soc_component_driver adau1977_component_driver = {
static int adau1977_setup_micbias(struct adau1977 *adau1977)
{
- struct adau1977_platform_data *pdata = adau1977->dev->platform_data;
unsigned int micbias;
- if (pdata)
- micbias = pdata->micbias;
- else if (device_property_read_u32(adau1977->dev, "adi,micbias",
- &micbias))
+ if (device_property_read_u32(adau1977->dev, "adi,micbias", &micbias))
micbias = ADAU1977_MICBIAS_8V5;
if (micbias > ADAU1977_MICBIAS_9V0) {