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

From: Mark Brown
Date: Mon Jul 18 2011 - 06:51:08 EST


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/