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

Commit 989d724e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: pd: qpnp-pdphy: Remove rx_busy flag"

parents e838c541 f0c23394
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -112,7 +112,6 @@ struct usb_pdphy {
	int tx_status;
	u8 frame_filter_val;
	bool in_test_data_mode;
	bool rx_busy;

	enum data_role data_role;
	enum power_role power_role;
@@ -490,7 +489,7 @@ int pd_phy_write(u16 hdr, const u8 *data, size_t data_len, enum pd_sop_type sop)
	}

	ret = pdphy_reg_read(pdphy, &val, USB_PDPHY_RX_ACKNOWLEDGE, 1);
	if (ret || val || pdphy->rx_busy) {
	if (ret || val) {
		dev_err(pdphy->dev, "%s: RX message pending\n", __func__);
		return -EBUSY;
	}
@@ -668,15 +667,6 @@ static int pd_phy_bist_mode(u8 bist_mode)
			BIST_MODE_MASK | BIST_ENABLE, bist_mode | BIST_ENABLE);
}

static irqreturn_t pdphy_msg_rx_irq(int irq, void *data)
{
	struct usb_pdphy *pdphy = data;

	pdphy->rx_busy = true;

	return IRQ_WAKE_THREAD;
}

static irqreturn_t pdphy_msg_rx_irq_thread(int irq, void *data)
{
	u8 size, rx_status, frame_type;
@@ -733,7 +723,6 @@ static irqreturn_t pdphy_msg_rx_irq_thread(int irq, void *data)
		false);
	pdphy->rx_bytes += size + 1;
done:
	pdphy->rx_busy = false;
	return IRQ_HANDLED;
}

@@ -819,7 +808,7 @@ static int pdphy_probe(struct platform_device *pdev)
		return ret;

	ret = pdphy_request_irq(pdphy, pdev->dev.of_node,
		&pdphy->msg_rx_irq, "msg-rx", pdphy_msg_rx_irq,
		&pdphy->msg_rx_irq, "msg-rx", NULL,
		pdphy_msg_rx_irq_thread, (IRQF_TRIGGER_RISING | IRQF_ONESHOT));
	if (ret < 0)
		return ret;