Re: [PATCH 2/9] regulator: core: Introduce set_optimum_mode op

From: Mark Brown
Date: Sat Feb 07 2015 - 03:27:39 EST


On Tue, Jan 27, 2015 at 06:46:32PM -0800, Bjorn Andersson wrote:

> + /* set most efficient regulator operating mode for load */
> + int (*set_optimum_mode)(struct regulator_dev *, int input_uV,
> + int output_uV, int load_uA);

This is basically fine but can you please rename this to be something
that more directly reflects the fact that we're just informing the
driver about the operating parameters - there are other things a driver
could usefully do with this, for example set current limits so that if
something starts to consume excessive current the device will flag this
as an error.

It'd also be better to split the voltage specs out into a separate
function, especially for the output voltage where obviously we have a
separate range based interface for setting that.

Attachment: signature.asc
Description: Digital signature