[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1649939418-19861-5-git-send-email-quic_c_skakit@quicinc.com>
Date: Thu, 14 Apr 2022 18:00:13 +0530
From: Satya Priya <quic_c_skakit@...cinc.com>
To: Bjorn Andersson <bjorn.andersson@...aro.org>,
Rob Herring <robh+dt@...nel.org>
CC: Lee Jones <lee.jones@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
<linux-arm-msm@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <swboyd@...omium.org>,
<quic_collinsd@...cinc.com>, <quic_subbaram@...cinc.com>,
<quic_jprakash@...cinc.com>,
Satya Priya <quic_c_skakit@...cinc.com>
Subject: [PATCH V10 4/9] mfd: pm8008: Add reset-gpios
Add the reset-gpio toggling in the pm8008_probe() to bring
pm8008 chip out of reset instead of doing it in DT node using
"output-high" property.
Signed-off-by: Satya Priya <quic_c_skakit@...cinc.com>
---
Changes in V10:
- This has been split from [V9,3/6] as per comments here [1]
[1] https://patchwork.kernel.org/project/linux-arm-msm/patch/1649166633-25872-4-git-send-email-quic_c_skakit@quicinc.com/#24803409
drivers/mfd/qcom-pm8008.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/mfd/qcom-pm8008.c b/drivers/mfd/qcom-pm8008.c
index c472d7f..97a72da 100644
--- a/drivers/mfd/qcom-pm8008.c
+++ b/drivers/mfd/qcom-pm8008.c
@@ -4,6 +4,7 @@
*/
#include <linux/bitops.h>
+#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
@@ -57,6 +58,7 @@ enum {
struct pm8008_data {
struct device *dev;
struct regmap *regmap;
+ struct gpio_desc *reset_gpio;
int irq;
struct regmap_irq_chip_data *irq_data;
};
@@ -239,6 +241,13 @@ static int pm8008_probe(struct i2c_client *client)
dev_err(chip->dev, "Failed to probe irq periphs: %d\n", rc);
}
+ chip->reset_gpio = devm_gpiod_get(chip->dev, "reset", GPIOD_OUT_HIGH);
+ if (IS_ERR(chip->reset_gpio)) {
+ dev_err(chip->dev, "failed to acquire reset gpio\n");
+ return PTR_ERR(chip->reset_gpio);
+ }
+ gpiod_set_value(chip->reset_gpio, 1);
+
return devm_of_platform_populate(chip->dev);
}
--
2.7.4
Powered by blists - more mailing lists