Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5d7bd09 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm: Change wsa dt property to optional"

parents 2ceb520f b3c8896c
Loading
Loading
Loading
Loading
+25 −3
Original line number Diff line number Diff line
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -20,6 +20,7 @@

#define WSA881X_MAX_SWR_PORTS   4

#if IS_ENABLED(CONFIG_SND_SOC_WSA881X)
extern int wsa881x_set_channel_map(struct snd_soc_codec *codec, u8 *port,
				   u8 num_port, unsigned int *ch_mask,
				   unsigned int *ch_rate);
@@ -31,4 +32,25 @@ extern int wsa881x_codec_info_create_codec_entry(
					struct snd_soc_codec *codec);
void wsa881x_regmap_defaults(struct regmap *regmap, u8 version);

#else
extern int wsa881x_set_channel_map(struct snd_soc_codec *codec, u8 *port,
				   u8 num_port, unsigned int *ch_mask,
				   unsigned int *ch_rate)
{
	return 0;
}

extern int wsa881x_codec_info_create_codec_entry(
					struct snd_info_entry *codec_root,
					struct snd_soc_codec *codec)
{
	return 0;
}

void wsa881x_regmap_defaults(struct regmap *regmap, u8 version)
{
}

#endif

#endif /* _WSA881X_H */
+5 −3
Original line number Diff line number Diff line
@@ -6697,16 +6697,18 @@ static int msm_init_wsa_dev(struct platform_device *pdev,
	ret = of_property_read_u32(pdev->dev.of_node,
				   "qcom,wsa-max-devs", &wsa_max_devs);
	if (ret) {
		dev_dbg(&pdev->dev,
		dev_info(&pdev->dev,
			 "%s: wsa-max-devs property missing in DT %s, ret = %d\n",
			 __func__, pdev->dev.of_node->full_name, ret);
		goto err;
		card->num_aux_devs = 0;
		return 0;
	}
	if (wsa_max_devs == 0) {
		dev_warn(&pdev->dev,
			 "%s: Max WSA devices is 0 for this target?\n",
			 __func__);
		goto err;
		card->num_aux_devs = 0;
		return 0;
	}

	/* Get count of WSA device phandles for this platform */