regulator: rtmv20: Fix .set_current_limit/.get_current_limit callbacks
authorAxel Lin <axel.lin@ingics.com>
Sun, 30 May 2021 12:41:00 +0000 (20:41 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 1 Jun 2021 13:03:03 +0000 (14:03 +0100)
commit86ab21cc39e6b99b7065ab9008c90bec5dec535a
tree8490c657dc6a57ebc7c518486ab64625fc15a104
parenta072cbda97a9367a84d46e7bf78a47abdbfcaea8
regulator: rtmv20: Fix .set_current_limit/.get_current_limit callbacks

Current code does not set .curr_table and .n_linear_ranges settings,
so it cannot use the regulator_get/set_current_limit_regmap helpers.
If we setup the curr_table, it will has 200 entries.
Implement customized .set_current_limit/.get_current_limit callbacks
instead.

Fixes: b8c054a5eaf0 ("regulator: rtmv20: Adds support for Richtek RTMV20 load switch regulator")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: ChiYuan Huang <cy_huang@richtek.com>
Link: https://lore.kernel.org/r/20210530124101.477727-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/rtmv20-regulator.c