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

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

Merge "ASoC: wcd9xxx: Add gpio control for micbias-supply for SXR1120"

parents 6fe3f835 8148b998
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2018, 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
@@ -180,7 +180,9 @@ struct wcd9xxx_pdata {
	int num_irqs;
	int reset_gpio;
	bool has_buck_vsel_gpio;
	bool has_micb_supply_en_gpio;
	struct device_node *buck_vsel_ctl_np;
	struct device_node *micb_en_ctl;
	struct device_node *wcd_rst_np;
	struct wcd9xxx_amic amic_settings;
	struct slim_device slimbus_slave_device;
+3 −0
Original line number Diff line number Diff line
@@ -1289,6 +1289,9 @@ static int wcd9xxx_slim_probe(struct slim_device *slim)
	if (pdata->has_buck_vsel_gpio)
		msm_cdc_pinctrl_select_active_state(pdata->buck_vsel_ctl_np);

	if (pdata->has_micb_supply_en_gpio)
		msm_cdc_pinctrl_select_active_state(pdata->micb_en_ctl);

	device_id = slim_get_device_id(slim);
	if (!device_id) {
		dev_err(&slim->dev, "%s: Error, no device id\n", __func__);
+13 −0
Original line number Diff line number Diff line
@@ -365,6 +365,19 @@ struct wcd9xxx_pdata *wcd9xxx_populate_dt_data(struct device *dev)
		}
	}

	pdata->has_micb_supply_en_gpio = of_property_read_bool(dev->of_node,
					   "qcom,has-micbias-supply-en-gpio");
	if (pdata->has_micb_supply_en_gpio) {
		pdata->micb_en_ctl = of_parse_phandle(dev->of_node,
				"qcom,micbias-supply-en-gpio-node", 0);
		if (!pdata->micb_en_ctl) {
			dev_err(dev, "%s No entry for %s property in node %s\n",
				__func__, "qcom,micbias-supply-en-gpio-node",
				dev->of_node->full_name);
			goto err_parse_dt_prop;
		}
	}

	if (!(wcd9xxx_read_of_property_u32(dev, "qcom,cdc-mclk-clk-rate",
					   &prop_val)))
		pdata->mclk_rate = prop_val;