]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: max8998: Factor out struct voltage_map_desc
authorAxel Lin <axel.lin@ingics.com>
Sun, 14 Apr 2019 12:48:18 +0000 (20:48 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 15 Apr 2019 08:45:15 +0000 (09:45 +0100)
commit51fd49db051ba431b234fb1e0e0f068549cbb556
tree34f218da1ffa1f6e81b745417a9418bcf11a2b89
parent6176ce2e6bb4472bf654ae20adc93a1ddfbafc2b
regulator: max8998: Factor out struct voltage_map_desc

The struct voltage_map_desc is used for storing min/max/step fileds, and
then setup the min_uV, uV_step and n_voltages fields for regulator_desc.
Introduce MAX8998_LINEAR_REG/MAX8998_OTHERS_REG macro to setup these filds
directly in regulator_desc to simplify the code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/max8998.c