You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge remote-tracking branch 'regulator/topic/min' into regulator-next
This commit is contained in:
@@ -1924,6 +1924,10 @@ int regulator_list_voltage_linear(struct regulator_dev *rdev,
|
||||
{
|
||||
if (selector >= rdev->desc->n_voltages)
|
||||
return -EINVAL;
|
||||
if (selector < rdev->desc->linear_min_sel)
|
||||
return 0;
|
||||
|
||||
selector -= rdev->desc->linear_min_sel;
|
||||
|
||||
return rdev->desc->min_uV + (rdev->desc->uV_step * selector);
|
||||
}
|
||||
@@ -2152,6 +2156,8 @@ int regulator_map_voltage_linear(struct regulator_dev *rdev,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret += rdev->desc->linear_min_sel;
|
||||
|
||||
/* Map back into a voltage to verify we're still in bounds */
|
||||
voltage = rdev->desc->ops->list_voltage(rdev, ret);
|
||||
if (voltage < min_uV || voltage > max_uV)
|
||||
|
||||
Reference in New Issue
Block a user