Re: [PATCH 1/4] regmap: Add generic non-memory mapped register access API

Mark Brown
2011-07-18T10:51:02Z

On Mon, Jul 18, 2011 at 12:38:14PM +0200, Takashi Iwai wrote:

> In most cases, val = map->work_buf + map->format.reg_bytes.
> How about a bit optimization?

> if (ret == -ENOTSUPP) {

Indeed, I'd had an additional optimization there in mind but it was to
do the checking before we try the gather write rather than after since
generally it'll be cheaper to do the pre-gathered write than the
gathered write (sometimes noticably cheaper as some controllers have an
appreciable overhead for starting transfers, especially at high data
rates).

I mostly didn't implement it yet because I was trying to minimize the
code complexity of the initial submission in order to aid review so was
avoiding non-essential features.