Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1206027

Re: [PATCH 12/20] regmap: Introduce max_raw_io for regmap_bulk_read/write

From Markus Pargmann <mpa@pengutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH 12/20] regmap: Introduce max_raw_io for regmap_bulk_read/write
Date 2015-08-12 14:40 +0200
Message-ID <pWDu3-4ta-35@gated-at.bofh.it> (permalink)
References <pWBix-1oV-9@gated-at.bofh.it> <pWBiy-1oV-19@gated-at.bofh.it> <pWCHE-3ic-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Wed, Aug 12, 2015 at 12:49:31PM +0100, Mark Brown wrote:
> On Wed, Aug 12, 2015 at 12:12:37PM +0200, Markus Pargmann wrote:
> 
> > +	/* if set, raw reads/writes are limited to this size */
> > +	size_t max_raw_io;
> > +
> 
> Do this separately for read and write, there's doubtless going to be
> something that has asymmetry.

Okay.

> 
> > +		if (!map->use_single_rw) {
> > +			write_count = total_bytes / map->max_raw_io;
> > +			write_bytes = map->max_raw_io;
> 
> We may not be able to fit a whole number of values into whatever the
> constraint that the bus has is and partial values don't seem like a good
> idea.

Oh right. Will change the calculation so that there are no partial
values being written.

> 
> > +			reg_stride *= write_bytes / val_bytes;
> > +		}
> 
> This is very confusing, regmap already has a concept of stride and this
> isn't the same thing.

Okay, will rename it.

Thanks,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 12/20] regmap: Introduce max_raw_io for regmap_bulk_read/write Markus Pargmann <mpa@pengutronix.de> - 2015-08-12 12:20 +0200
  Re: [PATCH 12/20] regmap: Introduce max_raw_io for  regmap_bulk_read/write Mark Brown <broonie@kernel.org> - 2015-08-12 13:50 +0200
    Re: [PATCH 12/20] regmap: Introduce max_raw_io for  regmap_bulk_read/write Markus Pargmann <mpa@pengutronix.de> - 2015-08-12 14:40 +0200

csiph-web