Messages in this thread |  | | Date | Tue, 8 Jan 2013 11:18:06 +0000 | From | Mark Brown <> | Subject | Re: [PATCH 3/3] regulator: max8998: Return enough delay time for max8998_set_voltage_buck_time_sel |
| |
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. [unhandled content-type:application/pgp-signature] |  |