]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting
authorAxel Lin <axel.lin@ingics.com>
Thu, 10 Jan 2019 09:26:16 +0000 (17:26 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 14 Jan 2019 11:50:42 +0000 (11:50 +0000)
commit7d9f818425edf7c1e373b9c7f4b6bfc2bf29e89e
tree8cd40dbf3c9d8e7b2b48892f3c8a01bc2c122937
parentbe24087ee88f50ddb4a55dc69937b1741605f52b
regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting

The act8600_sudcdc_voltage_ranges setting does not match the datasheet.

The problems in below entry:
  REGULATOR_LINEAR_RANGE(19000000, 191, 255, 400000),

1. The off-by-one min_sel causes wrong volatage calculation.
   The min_sel should be 192.
2. According to the datasheet[1] Table 7. (on page 43):
   The selector 248 (0b11111000) ~ 255 (0b11111111) are 41.400V.

Also fix off-by-one for ACT8600_SUDCDC_VOLTAGE_NUM.

[1] https://active-semi.com/wp-content/uploads/ACT8600_Datasheet.pdf

Fixes: 70c42c46e82a ("regulator: act8865: Add act8600 support")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/act8865-regulator.c