aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Aidan MacDonald <aidanmacdonald.0x0@gmail.com> 2023-02-16 22:22:14 +0000
committerGravatar Lee Jones <lee@kernel.org> 2023-04-26 11:40:28 +0100
commitc8bce48225eff37d87d1eab12c907c813befa8e9 (patch)
tree258a0a2536d2a7fd17132194d9695edffa0998aa
parentmfd: qcom-pm8008: Use .get_irq_reg() for irq chip (diff)
downloadlinux-c8bce48225eff37d87d1eab12c907c813befa8e9.tar.gz
linux-c8bce48225eff37d87d1eab12c907c813befa8e9.tar.bz2
linux-c8bce48225eff37d87d1eab12c907c813befa8e9.zip
mfd: qcom-pm8008: Remove workaround for a regmap-irq quirk
Remove pm8008_init(), which according to the comments exists only as a workaround for regmap-irq's odd treatment of type registers. This workaround shouldn't be needed anymore because this driver uses config registers, which are always programmed by regmap-irq no matter what the initial register state is. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20230216222214.138671-5-aidanmacdonald.0x0@gmail.com
-rw-r--r--drivers/mfd/qcom-pm8008.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/drivers/mfd/qcom-pm8008.c b/drivers/mfd/qcom-pm8008.c
index 54fc9c298c03..837246aab4ac 100644
--- a/drivers/mfd/qcom-pm8008.c
+++ b/drivers/mfd/qcom-pm8008.c
@@ -143,30 +143,6 @@ static struct regmap_config qcom_mfd_regmap_cfg = {
.max_register = 0xFFFF,
};
-static int pm8008_init(struct regmap *regmap)
-{
- int rc;
-
- /*
- * Set TEMP_ALARM peripheral's TYPE so that the regmap-irq framework
- * reads this as the default value instead of zero, the HW default.
- * This is required to enable the writing of TYPE registers in
- * regmap_irq_sync_unlock().
- */
- rc = regmap_write(regmap, (PM8008_TEMP_ALARM_ADDR | INT_SET_TYPE_OFFSET), BIT(0));
- if (rc)
- return rc;
-
- /* Do the same for GPIO1 and GPIO2 peripherals */
- rc = regmap_write(regmap, (PM8008_GPIO1_ADDR | INT_SET_TYPE_OFFSET), BIT(0));
- if (rc)
- return rc;
-
- rc = regmap_write(regmap, (PM8008_GPIO2_ADDR | INT_SET_TYPE_OFFSET), BIT(0));
-
- return rc;
-}
-
static int pm8008_probe_irq_peripherals(struct device *dev,
struct regmap *regmap,
int client_irq)
@@ -175,12 +151,6 @@ static int pm8008_probe_irq_peripherals(struct device *dev,
struct regmap_irq_type *type;
struct regmap_irq_chip_data *irq_data;
- rc = pm8008_init(regmap);
- if (rc) {
- dev_err(dev, "Init failed: %d\n", rc);
- return rc;
- }
-
for (i = 0; i < ARRAY_SIZE(pm8008_irqs); i++) {
type = &pm8008_irqs[i].type;