diff options
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/max77686.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c index 936afb1..6e34c5e 100644 --- a/drivers/regulator/max77686.c +++ b/drivers/regulator/max77686.c @@ -32,6 +32,8 @@ #include <linux/mfd/max77686.h> #include <linux/mfd/max77686-private.h> +//#define MAX77686_DEBUG + #define PMIC_DEBUG KERN_DEBUG #define PMIC_REG_DEBUG KERN_DEBUG @@ -316,8 +318,10 @@ static int max77686_reg_enable(struct regulator_dev *rdev) if (ret) return ret; +#ifdef MAX77686_DEBUG printk(PMIC_DEBUG "%s: id=%d, pattern=%x\n", __func__, rdev_get_id(rdev), pattern); +#endif return max77686_update_reg(i2c, reg, pattern, mask); } @@ -332,8 +336,10 @@ static int max77686_reg_disable(struct regulator_dev *rdev) if (ret) return ret; +#ifdef MAX77686_DEBUG printk(PMIC_DEBUG "%s: id=%d, pattern=%x\n", __func__, rdev_get_id(rdev), pattern); +#endif return max77686_update_reg(i2c, reg, ~mask, mask); } @@ -401,8 +407,10 @@ static int max77686_get_voltage(struct regulator_dev *rdev) val >>= shift; val &= mask; +#ifdef MAX77686_DEBUG printk(PMIC_REG_DEBUG "%s: id=%d, val=%x\n", __func__, rid, val); +#endif return max77686_list_voltage(rdev, val); } @@ -479,9 +487,10 @@ static int max77686_set_voltage(struct regulator_dev *rdev, if (!gpio_get_value(GPIO_HDMI_EN)) #endif #endif +#ifdef MAX77686_DEBUG printk(PMIC_REG_DEBUG "max77686: id=%d, org=%x, val=%x", rdev_get_id(rdev), org, i); - +#endif ret = max77686_update_reg(i2c, reg, i << shift, mask << shift); *selector = i; @@ -640,7 +649,9 @@ static int max77686_set_ramp_rate(struct i2c_client *i2c, int rate) break; } +#ifdef MAX77686_DEBUG printk(PMIC_DEBUG "%s: ramp_delay=%d, data=0x%x\n", __func__, ramp_delay, data); +#endif max77686_update_reg(i2c, MAX77686_REG_BUCK2CTRL1, data, 0xC0); max77686_update_reg(i2c, MAX77686_REG_BUCK3CTRL1, data, 0xC0); @@ -791,9 +802,11 @@ static __devinit int max77686_pmic_probe(struct platform_device *pdev) regulators[id].n_voltages = (desc->max - desc->min) / desc->step + 1; +#ifdef MAX77686_DEBUG printk(PMIC_DEBUG "%s: desc=%p, id=%d, n_vol=%d, max=%d, min=%d, step=%d\n", __func__, desc, id, regulators[id].n_voltages, desc->max, desc->min, desc->step); +#endif } rdev[i] = regulator_register(®ulators[id], max77686->dev, |