lkml.org 
[lkml]   [2011]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] staging:iio:imu:adis16400 regmap introduction.
On Thu, Sep 08, 2011 at 03:09:24PM +0100, Jonathan Cameron wrote:
> Apply regmap for the basic register reads and writes.
> Note not currently used at all for the mass reads
> that occur in the buffer code.

Looks good, shame adding the register access lists makes the diffstat
grow rather than shrink - a separate patch adding the access maps would
be good for showing the benefits :)

> + case ADIS16400_DIAG_STAT:
> + return true;
> + default:
> + return 0;

Should use either 1/0 or true/false consistently (probably the latter).

> +static const struct regmap_config adis16400_regmap_config = {
> + .reg_bits = 8,
> + .reg_pad_bits = 8,
> + .val_bits = 16,
> + .half_write = true,
> + .writeable_reg = &adis16400_reg_writeable,
> + .readable_reg = &adis16400_reg_readable,
> + .precious_reg = &adis16400_reg_precious,
> + .volatile_reg = &adis16400_reg_volatile,
> + .max_register = 0x56,
> + .write_flag_mask = 0x80,
> + .read_flag_mask = 0,

No need to set things to zero explicitly.

> -
> + spi->cs_between_transfers = 1;

Guess we need that change to go in first...


\
 
 \ /
  Last update: 2011-09-09 01:39    [W:0.056 / U:0.036 seconds]
©2003-2014 Jasper Spaans. Advertise on this site