Skip to content

Commit

Permalink
mfd: tps65218: Make INT[12] and STATUS registers volatile
Browse files Browse the repository at this point in the history
STATUS register can be modified by the HW, so we
should bypass cache because of that.

In the case of INT[12] registers, they are the ones
that actually clear the IRQ source at the time they
are read. If we rely on the cache for them, we will
never be able to clear the interrupt, which will cause
our IRQ line to be disabled due to IRQ throttling.

Fixes: 44b4dc6 mfd: tps65218: Add driver for the TPS65218 PMIC
Cc: <stable@vger.kernel.org> # v3.15+
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
Felipe Balbi authored and Lee Jones committed Jan 20, 2015
1 parent b3f6c73 commit 773328d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/mfd/tps65218.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,21 @@ int tps65218_clear_bits(struct tps65218 *tps, unsigned int reg,
}
EXPORT_SYMBOL_GPL(tps65218_clear_bits);

static const struct regmap_range tps65218_yes_ranges[] = {
regmap_reg_range(TPS65218_REG_INT1, TPS65218_REG_INT2),
regmap_reg_range(TPS65218_REG_STATUS, TPS65218_REG_STATUS),
};

static const struct regmap_access_table tps65218_volatile_table = {
.yes_ranges = tps65218_yes_ranges,
.n_yes_ranges = ARRAY_SIZE(tps65218_yes_ranges),
};

static struct regmap_config tps65218_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.cache_type = REGCACHE_RBTREE,
.volatile_table = &tps65218_volatile_table,
};

static const struct regmap_irq tps65218_irqs[] = {
Expand Down

0 comments on commit 773328d

Please sign in to comment.