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

Commit 04b8572e authored by Ramachandran Venkataramani's avatar Ramachandran Venkataramani
Browse files

irqchip: qcom: pdc: Add a kernel config for pdc save/restore feature



Add a kernel config for pdc save/restore feature to selectively enable
the feature only on some platforms.

Change-Id: I554574f7f063a28a9b42c476b8a51a94693ccd53
Signed-off-by: default avatarRamachandran Venkataramani <ramavenk@codeaurora.org>
parent d64e27a1
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ config QTI_PDC
config QTI_PDC_SM8150
        bool "QTI PDC SM8150"
        select QTI_PDC
        select QTI_PDC_SAVE_RESTORE
        default y if ARCH_SM8150
        help
          QTI Power Domain Controller for SM8150
@@ -17,6 +18,7 @@ config QTI_PDC_SM8150
config QTI_PDC_SM6150
        bool "QTI PDC SM6150"
        select QTI_PDC
        select QTI_PDC_SAVE_RESTORE
        default y if ARCH_SM6150
        help
          QTI Power Domain Controller for SM6150
@@ -66,3 +68,10 @@ config QTI_PDC_VIRT
          QTI Power Domain Controller for Virtual platforms
	  This is used for managing and configuring
	  the wakeup interrupts on virtual platforms.

config QTI_PDC_SAVE_RESTORE
        bool "QTI PDC SAVE RESTORE"
        depends on QTI_PDC
        help
          Enables the QTI PDC feature to save/restore pin configurations
          during suspend/resume.
+4 −1
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ struct pdc_type_info {
	bool set;
};
static struct pdc_type_info pdc_type_config[MAX_IRQS];
static u32 pdc_enabled[MAX_ENABLE_REGS];
static u32 max_enable_regs;
static DEFINE_SPINLOCK(pdc_lock);
static void __iomem *pdc_base;
@@ -289,6 +288,9 @@ static const struct irq_domain_ops qcom_pdc_ops = {
	.free		= irq_domain_free_irqs_common,
};

#ifdef CONFIG_QTI_PDC_SAVE_RESTORE
static u32 pdc_enabled[MAX_ENABLE_REGS];

static int pdc_suspend(void)
{
	int i;
@@ -336,6 +338,7 @@ static int __init pdc_init_syscore(void)
	return 0;
}
arch_initcall(pdc_init_syscore);
#endif

int qcom_pdc_init(struct device_node *node,
		struct device_node *parent, void *data)