Re: [PATCH 3/3] regulator: max8998: Return enough delay time formax8998_set_voltage_buck_time_sel

From: Mark Brown
Date: Tue Jan 08 2013 - 06:17:56 EST


On Fri, Dec 28, 2012 at 05:14:58PM +0800, Axel Lin wrote:
> Use DIV_ROUND_UP to prevent truncation by integer division issue.
> This ensures we return enough delay time.

This bit is OK.

> Since the delay is required only if the voltage is increasing,
> and we know both old_selector and new_selector.
> We can check it earlier, for linear mapping, by simply compare
> new_selector with old_selector.

This is generally a reasonable assumption but it's not a bug fix, it's
an optimisation, and we should be doing it in core code not in a
specific driver.

Attachment: signature.asc
Description: Digital signature