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

Commit ad522f4e authored by J Keerthy's avatar J Keerthy Committed by Samuel Ortiz
Browse files

mfd: palmas: Check if irq is valid



Check if irq value obtained is valid. If it is not valid
then skip the irq request step and go ahead with the probe.

Signed-off-by: default avatarJ Keerthy <j-keerthy@ti.com>
Reviewed-by: default avatarMark Brown <broonie@linaro.org>
Reviewed-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 283aae8a
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -290,6 +290,11 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
		}
		}
	}
	}


	if (!palmas->irq) {
		dev_warn(palmas->dev, "IRQ missing: skipping irq request\n");
		goto no_irq;
	}

	/* Change interrupt line output polarity */
	/* Change interrupt line output polarity */
	if (pdata->irq_flags & IRQ_TYPE_LEVEL_HIGH)
	if (pdata->irq_flags & IRQ_TYPE_LEVEL_HIGH)
		reg = PALMAS_POLARITY_CTRL_INT_POLARITY;
		reg = PALMAS_POLARITY_CTRL_INT_POLARITY;
@@ -316,6 +321,7 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
	if (ret < 0)
	if (ret < 0)
		goto err;
		goto err;


no_irq:
	slave = PALMAS_BASE_TO_SLAVE(PALMAS_PU_PD_OD_BASE);
	slave = PALMAS_BASE_TO_SLAVE(PALMAS_PU_PD_OD_BASE);
	addr = PALMAS_BASE_TO_REG(PALMAS_PU_PD_OD_BASE,
	addr = PALMAS_BASE_TO_REG(PALMAS_PU_PD_OD_BASE,
			PALMAS_PRIMARY_SECONDARY_PAD1);
			PALMAS_PRIMARY_SECONDARY_PAD1);