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

Commit 156fcf4b authored by Viraja Kommaraju's avatar Viraja Kommaraju Committed by Gerrit - the friendly Code Review server
Browse files

drivers: mfd: Update wcd-gpio-ctrl driver and Makefile



Update wcd-gpio-ctrl driver to include a condition for
not selecting the pin states during boot up for all the
TLMM pins. Also update the Makefile to compile this driver
for WCD9330 and WCD9306 codecs.

CRs-Fixed: 2029897
Change-Id: I103a74ae9c387e281d66208ee2f0bbf9b1b3dccf
Signed-off-by: default avatarViraja Kommaraju <virajak@codeaurora.org>
parent b81d100b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -179,11 +179,13 @@ obj-$(CONFIG_MFD_HI6421_PMIC) += hi6421-pmic-core.o
intel-soc-pmic-objs		:= intel_soc_pmic_core.o intel_soc_pmic_crc.o
obj-$(CONFIG_INTEL_SOC_PMIC)	+= intel-soc-pmic.o
obj-$(CONFIG_WCD9306_CODEC)	+= wcd9xxx-core.o wcd9xxx-irq.o wcd9xxx-slimslave.o\
						wcd9xxx-core-resource.o wcd9306-regmap.o
					wcd9xxx-core-resource.o wcd9306-regmap.o\
					wcd-gpio-ctrl.o
obj-$(CONFIG_WCD9320_CODEC)	+= wcd9xxx-core.o wcd9xxx-irq.o wcd9xxx-slimslave.o\
						wcd9xxx-core-resource.o
obj-$(CONFIG_WCD9330_CODEC)	+= wcd9xxx-core.o wcd9xxx-irq.o wcd9xxx-slimslave.o\
						wcd9xxx-core-resource.o wcd9330-regmap.o
					wcd9xxx-core-resource.o wcd9330-regmap.o\
					wcd-gpio-ctrl.o
obj-$(CONFIG_WCD9335_CODEC)	+= wcd9xxx-core.o wcd9xxx-irq.o wcd9xxx-slimslave.o\
					wcd9xxx-core-resource.o wcd9335-regmap.o\
					wcd9335-tables.o wcd-gpio-ctrl.o
+11 −7
Original line number Diff line number Diff line
/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-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
@@ -137,12 +137,16 @@ static int wcd_gpio_ctrl_probe(struct platform_device *pdev)
		goto err_lookup_state;
	}

	/* skip setting to sleep state for MI2S_AUXPCM_TLMM GPIOs */
	if (!of_property_read_bool(pdev->dev.of_node,
				"qcom,mi2s-auxpcm-cdc-gpios")) {
		/* Set pinctrl state to aud_sleep by default */
		ret = pinctrl_select_state(gpio_data->pinctrl,
						gpio_data->pinctrl_sleep);
		if (ret)
		dev_err(&pdev->dev, "%s: set cdc gpio sleep state fail: %d\n",
			dev_err(&pdev->dev, "%s: set gpio to sleep state fail: %d\n",
					__func__, ret);
	}

	dev_set_drvdata(&pdev->dev, gpio_data);
	return 0;
+4 −2
Original line number Diff line number Diff line
/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-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
@@ -16,7 +16,9 @@
#include <linux/types.h>
#include <linux/of.h>

#ifdef CONFIG_WCD9335_CODEC
#if defined(CONFIG_WCD9335_CODEC) || \
	defined(CONFIG_WCD9330_CODEC) || \
	defined(CONFIG_WCD9306_CODEC)
extern int wcd_gpio_ctrl_select_sleep_state(struct device_node *);
extern int wcd_gpio_ctrl_select_active_state(struct device_node *);