aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <johan+linaro@kernel.org>2023-05-25 13:56:30 +0200
committerJohan Hovold <johan+linaro@kernel.org>2023-05-30 14:42:24 +0200
commit8589faafbb9dd3c815d00dc00416b2b78f20fb21 (patch)
tree7303c7e95446868409b57f276265f055ce9a81b9
parentb51a40faf4909dcd1f66b1a376ce73b6457f8e46 (diff)
wip: mfd: pm8008: reset device on probe
Assert reset during probe so that the PMIC reverts to the expected default address 0x08 and 0x09 (rather than the firmware configured address 0x0c and 0x0d). FIXME: determine how address selection works Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
-rw-r--r--drivers/mfd/qcom-pm8008.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mfd/qcom-pm8008.c b/drivers/mfd/qcom-pm8008.c
index 0920dfb87a0dc..6994d625edfa6 100644
--- a/drivers/mfd/qcom-pm8008.c
+++ b/drivers/mfd/qcom-pm8008.c
@@ -230,6 +230,10 @@ static int pm8008_probe(struct i2c_client *client)
if (IS_ERR(reset_gpio))
return PTR_ERR(reset_gpio);
+ gpiod_set_value(reset_gpio, 1);
+ usleep_range(500, 2000);
+ gpiod_set_value(reset_gpio, 0);
+
if (of_property_read_bool(dev->of_node, "interrupt-controller")) {
rc = pm8008_probe_irq_peripherals(dev, regmap, client->irq);
if (rc)