Re: [PATCH 2/2] staging:iio:imu:adis16400 regmap introduction.

From: Mark Brown
Date: Thu Sep 08 2011 - 19:37:44 EST


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...
--
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/