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

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

Merge "i2c: i2c-qcom-geni: Check firmware setting before transaction"

parents 409e4e51 b9137c1e
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -881,9 +881,17 @@ static int geni_i2c_runtime_resume(struct device *dev)
		return ret;

	if (gi2c->se_mode == UNINITIALIZED) {
		u32 se_mode = readl_relaxed(gi2c->base +
					GENI_IF_FIFO_DISABLE_RO);
		int proto = get_se_proto(gi2c->base);
		u32 se_mode;

		if (unlikely(proto != I2C)) {
			dev_err(gi2c->dev, "Invalid proto %d\n", proto);
			se_geni_resources_off(&gi2c->i2c_rsc);
			return -ENXIO;
		}

		se_mode = readl_relaxed(gi2c->base +
					GENI_IF_FIFO_DISABLE_RO);
		if (se_mode) {
			gi2c->se_mode = GSI_ONLY;
			geni_se_select_mode(gi2c->base, GSI_DMA);