tps62360-regulator.c (688d794c4c3f8b08c814381ee2edd3ede5856056) tps62360-regulator.c (1864b670902260d1c239f37e984f26de8fbad319)
1/*
2 * tps62360.c -- TI tps62360
3 *
4 * Driver for processor core supply tps62360, tps62361B, tps62362 and tps62363.
5 *
6 * Copyright (c) 2012, NVIDIA Corporation.
7 *
8 * Author: Laxman Dewangan <ldewangan@nvidia.com>

--- 264 unchanged lines hidden (view full) ---

273 /* Get ramp value from ramp control register */
274 ret = regmap_read(tps->regmap, REG_RAMPCTRL, &ramp_ctrl);
275 if (ret < 0) {
276 dev_err(tps->dev,
277 "%s(): register %d read failed with err %d\n",
278 __func__, REG_RAMPCTRL, ret);
279 return ret;
280 }
1/*
2 * tps62360.c -- TI tps62360
3 *
4 * Driver for processor core supply tps62360, tps62361B, tps62362 and tps62363.
5 *
6 * Copyright (c) 2012, NVIDIA Corporation.
7 *
8 * Author: Laxman Dewangan <ldewangan@nvidia.com>

--- 264 unchanged lines hidden (view full) ---

273 /* Get ramp value from ramp control register */
274 ret = regmap_read(tps->regmap, REG_RAMPCTRL, &ramp_ctrl);
275 if (ret < 0) {
276 dev_err(tps->dev,
277 "%s(): register %d read failed with err %d\n",
278 __func__, REG_RAMPCTRL, ret);
279 return ret;
280 }
281 ramp_ctrl = (ramp_ctrl >> 4) & 0x7;
281 ramp_ctrl = (ramp_ctrl >> 5) & 0x7;
282
283 /* ramp mV/us = 32/(2^ramp_ctrl) */
284 tps->desc.ramp_delay = DIV_ROUND_UP(32000, BIT(ramp_ctrl));
285 return ret;
286}
287
288static const struct regmap_config tps62360_regmap_config = {
289 .reg_bits = 8,

--- 264 unchanged lines hidden ---
282
283 /* ramp mV/us = 32/(2^ramp_ctrl) */
284 tps->desc.ramp_delay = DIV_ROUND_UP(32000, BIT(ramp_ctrl));
285 return ret;
286}
287
288static const struct regmap_config tps62360_regmap_config = {
289 .reg_bits = 8,

--- 264 unchanged lines hidden ---