mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
OMAP3+: VC bypass: use fields from VC struct instead of PMIC info
The PMIC configurable variables should be isolated to VC initialization. The rest of the VC functions (like VC bypass) should use the i2c slave address and voltage register address fields from struct omap_vc_channel. Signed-off-by: Kevin Hilman <khilman@ti.com>
This commit is contained in:
parent
e4e021c549
commit
78614e0f8f
1 changed files with 2 additions and 5 deletions
|
@ -100,7 +100,6 @@ int omap_vc_bypass_scale(struct voltagedomain *voltdm,
|
|||
unsigned long target_volt)
|
||||
{
|
||||
struct omap_vc_channel *vc = voltdm->vc;
|
||||
struct omap_vdd_info *vdd = voltdm->vdd;
|
||||
u32 loop_cnt = 0, retries_cnt = 0;
|
||||
u32 vc_valid, vc_bypass_val_reg, vc_bypass_value;
|
||||
u8 target_vsel, current_vsel;
|
||||
|
@ -113,10 +112,8 @@ int omap_vc_bypass_scale(struct voltagedomain *voltdm,
|
|||
vc_valid = vc->common->valid;
|
||||
vc_bypass_val_reg = vc->common->bypass_val_reg;
|
||||
vc_bypass_value = (target_vsel << vc->common->data_shift) |
|
||||
(vdd->pmic_info->volt_reg_addr <<
|
||||
vc->common->regaddr_shift) |
|
||||
(vdd->pmic_info->i2c_slave_addr <<
|
||||
vc->common->slaveaddr_shift);
|
||||
(vc->volt_reg_addr << vc->common->regaddr_shift) |
|
||||
(vc->i2c_slave_addr << vc->common->slaveaddr_shift);
|
||||
|
||||
voltdm->write(vc_bypass_value, vc_bypass_val_reg);
|
||||
voltdm->write(vc_bypass_value | vc_valid, vc_bypass_val_reg);
|
||||
|
|
Loading…
Add table
Reference in a new issue