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

Commit dfbd9633 authored by Harry Yang's avatar Harry Yang
Browse files

power: smb138x: set some USB/Typec IRQs as wakeup ones



The device cannot wake up from sleep on USB insertion, because
USBIN_PLUGIN_IRQ, USBIN_SRC_CHANGE_IRQ and TYPE_C_CHANGE_IRQ
are not set as wakeup IRQs.

Fix it.

CRs-Fixed: 2249396
Change-Id: Iaf5ecbf9c77ae847cc9071f9742fdd16936c0e73
Signed-off-by: default avatarHarry Yang <harryy@codeaurora.org>
parent c60b52df
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1371,10 +1371,12 @@ static struct smb_irq_info smb138x_irqs[] = {
	[USBIN_PLUGIN_IRQ] = {
		.name		= "usbin-plugin",
		.handler	= smblib_handle_usb_plugin,
		.wake		= true,
	},
	[USBIN_SRC_CHANGE_IRQ] = {
		.name		= "usbin-src-change",
		.handler	= smblib_handle_usb_source_change,
		.wake		= true,
	},
	[USBIN_ICL_CHANGE_IRQ] = {
		.name		= "usbin-icl-change",
@@ -1383,6 +1385,7 @@ static struct smb_irq_info smb138x_irqs[] = {
	[TYPE_C_CHANGE_IRQ] = {
		.name		= "type-c-change",
		.handler	= smblib_handle_usb_typec_change,
		.wake		= true,
	},
/* DC INPUT IRQs */
	[DCIN_COLLAPSE_IRQ] = {
@@ -1825,6 +1828,8 @@ static int smb138x_probe(struct platform_device *pdev)
		goto cleanup;
	}

	device_init_wakeup(chip->chg.dev, true);

	pr_info("SMB138X probed successfully mode=%d\n", chip->chg.mode);
	return rc;