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)
commit0dceab33342d279130252b7c587142a7252a9324
tree34f218da1ffa1f6e81b745417a9418bcf11a2b89
parent7d695f20c27f33173f2149d4d1c6e994e5c0b08e
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