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

Commit 211ec036 authored by Shiju Mathew's avatar Shiju Mathew
Browse files

power: bcl_peripheral: Move BCL interrupts to level based



BCL driver was using edge triggered interrupt, which allows
the Linux interrupt framework to flag pending interrupts
after BCL interrupts are disabled. This pending interrupt
will trigger a false trip as soon as the interrupt is enabled.
To fix this, move BCL Ibat and Vbat interrupts from edge
triggered to level triggered. This will eliminate any pending
interrupts that will cause unexpected behavior in BCL
driver.

Change-Id: I9270dc15911ab94a0cef1b808699e1b5e7016d4c
Signed-off-by: default avatarShiju Mathew <shijum@codeaurora.org>
parent 2e7b8c61
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -848,7 +848,7 @@ static int bcl_probe(struct spmi_device *spmi)

	ret = devm_request_irq(&spmi->dev,
			bcl_perph->param[BCL_PARAM_VOLTAGE].irq_num,
			bcl_handle_isr, IRQF_TRIGGER_RISING,
			bcl_handle_isr, IRQF_TRIGGER_HIGH,
			"bcl_vbat_interrupt",
			&bcl_perph->param[BCL_PARAM_VOLTAGE]);
	if (ret) {
@@ -857,7 +857,7 @@ static int bcl_probe(struct spmi_device *spmi)
	}
	ret = devm_request_irq(&spmi->dev,
			bcl_perph->param[BCL_PARAM_CURRENT].irq_num,
			bcl_handle_isr, IRQF_TRIGGER_RISING,
			bcl_handle_isr, IRQF_TRIGGER_HIGH,
			"bcl_ibat_interrupt",
			&bcl_perph->param[BCL_PARAM_CURRENT]);
	if (ret) {