On Wed, Apr 04, 2012 at 03:48:31PM -0600, Stephen Warren wrote: > From: Stephen Warren > > This is a basic memory-mapped-IO bus for regmap. It has the following > features and limitations: I applied these up to here but it was painful as patch 2 didn't apply cleanly to -rc1 and git am couldn't find the blobs to use for resolution. Please check things worked out OK but I'm pretty sure they did. > * Registers themselves may be 8, 16, 32, or 64-bit. 64-bit is only > supported on 64-bit platforms. > * Register offsets are limited to precisely 32-bit. > * IO is performed using readl/writel, with no provision for using the > __raw_readl or readl_relaxed variants. Also limited native endian register I/O. It would have been much better to fix this in the core - please consider producing followup patches to push the code there, though it's far from essential. > +static int regmap_mmio_gather_write(void *context, > + const void *reg, size_t reg_size, > + const void *val, size_t val_size) > +{ > + struct regmap_mmio_context *ctx = context; > + u32 offset; > + > + if (reg_size != 4) > + return -EIO; Given that you constrain on registration too this should be BUG_ON(), we're seriously confused if we're specifying a different register size here and -EIO is going to be a bit obscure.