From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 8 Sep 2011 09:30:18 -0700 From: Mark Brown To: Jonathan Cameron Cc: linux-kernel@vger.kernel.org, Michael.Hennerich@analog.com, linux-iio@vger.kernel.org Subject: Re: [PATCH 2/2] staging:iio:imu:adis16400 regmap introduction. Message-ID: <20110908163017.GC3098@opensource.wolfsonmicro.com> References: <1315490964-25718-1-git-send-email-jic23@cam.ac.uk> <1315490964-25718-3-git-send-email-jic23@cam.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1315490964-25718-3-git-send-email-jic23@cam.ac.uk> List-ID: 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...