Skip to content

Commit

Permalink
fix spurious triggering of irq 5v while plugout code is running
Browse files Browse the repository at this point in the history
  • Loading branch information
benhoff committed Sep 11, 2024
1 parent 155c54f commit b3f0e43
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ new file mode 100644
index 000000000000..111111111111
--- /dev/null
+++ b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
@@ -0,0 +1,2763 @@
@@ -0,0 +1,2775 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2024 Collabora, Ltd.
Expand Down Expand Up @@ -983,10 +983,17 @@ index 000000000000..111111111111
+static void hdmirx_plugout(struct snps_hdmirx_dev *hdmirx_dev)
+{
+ struct arm_smccc_res res;
+ int irq;
+
+ hdmirx_update_bits(hdmirx_dev, SCDC_CONFIG, POWERPROVIDED, 0);
+ hdmirx_interrupts_setup(hdmirx_dev, false);
+ hdmirx_hpd_ctrl(hdmirx_dev, false);
+
+ irq = gpiod_to_irq(hdmirx_dev->detect_5v_gpio);
+ if (irq >= 0) {
+ disable_irq(irq);
+ }
+
+ hdmirx_update_bits(hdmirx_dev, DMA_CONFIG6, HDMIRX_DMA_EN, 0);
+ hdmirx_update_bits(hdmirx_dev, DMA_CONFIG4,
+ LINE_FLAG_INT_EN |
Expand All @@ -1004,6 +1011,11 @@ index 000000000000..111111111111
+ cancel_delayed_work_sync(&hdmirx_dev->delayed_work_heartbeat);
+ flush_work(&hdmirx_dev->work_wdt_config);
+ arm_smccc_smc(SIP_WDT_CFG, WDT_STOP, 0, 0, 0, 0, 0, 0, &res);
+
+ hdmirx_hpd_ctrl(hdmirx_dev, true);
+ if (irq >= 0) {
+ enable_irq(irq);
+ }
+}
+
+static int hdmirx_set_edid(struct file *file, void *fh, struct v4l2_edid *edid)
Expand Down

0 comments on commit b3f0e43

Please sign in to comment.