[PATCHv2 12/13] regulator: rk808: add rk806 support

Mark Brown broonie at kernel.org
Thu Sep 8 04:31:48 PDT 2022


On Thu, Sep 08, 2022 at 10:45:40AM +0300, Matti Vaittinen wrote:
> On 9/8/22 03:31, Sebastian Reichel wrote:

> > +static int rk806_set_voltage(struct regulator_dev *rdev,
> > +			     int req_min_uV, int req_max_uV,
> > +			     unsigned int *selector)

> Hmm. Maybe this is not necessary? I wonder if we could get away just with
> the .map and .set_voltage_sel (regulator_get_voltage_sel_regmap() and
> regulator_map_voltage_linear_range()).

Not just can, should.  Drivers should not mix and match voltage based
and selector based operations, and they should always try to implement
selector based operations unless there's a specific reason to do
otherwise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20220908/dae0424f/attachment.sig>


More information about the Linux-rockchip mailing list