Skip to content

Commit 94a66fe

Browse files
committed
regulator: rpi-panel-v2: Cache regmap values
Not all implementations of the V2 regulator support reading back the value of registers, which makes the GPIO control fail. Enable the regmap caching to avoid this. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent 1d5bb99 commit 94a66fe

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/regulator/rpi-panel-v2-regulator.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ static const struct regmap_config rpi_panel_regmap_config = {
3333
.val_bits = 8,
3434
.max_register = REG_PWM,
3535
.can_sleep = true,
36+
.cache_type = REGCACHE_MAPLE,
3637
};
3738

3839
static int rpi_panel_v2_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
@@ -63,11 +64,13 @@ static const struct pwm_ops rpi_panel_v2_pwm_ops = {
6364
*/
6465
static int rpi_panel_v2_i2c_probe(struct i2c_client *i2c)
6566
{
67+
//unsigned long direction_bitmap = (1 << NUM_GPIO) - 1;
6668
struct gpio_regmap_config gconfig = {
6769
.ngpio = NUM_GPIO,
6870
.ngpio_per_reg = NUM_GPIO,
6971
.parent = &i2c->dev,
7072
.reg_set_base = REG_POWERON,
73+
//.fixed_direction_output = &direction_bitmap,
7174
};
7275
struct regmap *regmap;
7376
struct pwm_chip *pc;

0 commit comments

Comments
 (0)