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

Commit 9a721aa3 authored by Prateek Sood's avatar Prateek Sood
Browse files

pinctrl: qcom: Add mpm wakeup control capability in pinctrl



Add support for mpm wakeup control capability, for selective
enable of wakeup capability for GPIO being used as IRQ.

Change-Id: I38f5c8eea4b12919fb95b2135d76579eb4b27247
Signed-off-by: default avatarPrateek Sood <prsood@codeaurora.org>
parent 503b958a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2013, Sony Mobile Communications AB.
 * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2021, The Linux Foundation. All rights reserved.
 */

#include <linux/delay.h>
@@ -46,6 +46,7 @@
 * @restart_nb:     restart notifier block.
 * @irq:            parent irq for the TLMM irq_chip.
 * @n_dir_conns:    The number of pins directly connected to GIC.
 * @mpm_wake_ctl:   MPM wakeup capability control enable.
 * @lock:           Spinlock to protect register resources as well
 *                  as msm_pinctrl data structures.
 * @enabled_irqs:   Bitmap of currently enabled irqs.
@@ -65,6 +66,7 @@ struct msm_pinctrl {
	struct irq_chip irq_chip;
	int irq;
	int n_dir_conns;
	bool mpm_wake_ctl;

	raw_spinlock_t lock;

@@ -1530,6 +1532,9 @@ int msm_pinctrl_probe(struct platform_device *pdev,
			return PTR_ERR(pctrl->regs[0]);
	}

	pctrl->mpm_wake_ctl = of_property_read_bool(pdev->dev.of_node,
					"qcom,tlmm-mpm-wake-control");

	msm_pinctrl_setup_pm_reset(pctrl);

	pctrl->irq = platform_get_irq(pdev, 0);