Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp883254imm; Sun, 2 Sep 2018 02:19:25 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZOVkmzXhVF2iOF2+zjYpDZGL8RuT7Li5m2SzMhW2LS8j7pvnC+LDZgCUKIMX1XHCT/cEaS X-Received: by 2002:a17:902:e088:: with SMTP id cb8-v6mr23076909plb.189.1535879965078; Sun, 02 Sep 2018 02:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535879965; cv=none; d=google.com; s=arc-20160816; b=Hc5FzYiynaV3EvrTmVZRd44KIWuhCGWeHIQMoyBYTfKZSaGYDZ+qEq8YlYUnOilV+E GjHyC3v2Vmi1Wwet9biBKNlZOqWcUUj3U5v/kIBrUSL4wMAfrky8c9ADOYe/brtreckp zAs74qmZYBTyR065U+sY8fXxk6Q/DduHAE426mTIJfQnDX6j+PFDzgA5X2SSzQkVpLF1 S8gbEeNGr06pODVhZMM2jcl7tWEzxMubVuyS8ywoPW67caDN880t8Io7Od3oJQDn69EB gpkeN9bThwmzQBOMVf1TjnSAk9WO2u9t2aJTb6AbO37aBkPo7oRjOR4Lgba7SXKKqSWo u8RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=c2dXlt6ROnzEWZAeZjOLXO7lO9q7jyqWiLUspds+kHE=; b=Lllk0otB1c+69SuIPsCgpX5BT3cQEe3wnS/eQ4XM0y6qWoP6k+mOv6AaOdoAcPM8Qt pVG3kCrn6Tu4DhjCjIF/zETQhb+RyOKvRJnnbNUUh9pA/F1Qe218ga20gnL2jMkTNUHr /yOw/UpgscchSI1BxD7pSJeZDs9CPsujfmX9i2jK9f0OTMHv3261Uv+ndiGRXJxJQuUQ TM9bZoeNXsOld9iElFz7O3SdCuhugYISSVvSmUic3FeCdOjlsm+SNB2Jvj3dfO1it814 N/ABHvBdMlV7jXsFepIgVOi9OKYQmoRSb3yck7dlZYw0Fp2yNJCPA/jDvV1EzRVPOoVk DjMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KGQWEHQ3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k91-v6si14802998pld.187.2018.09.02.02.19.10; Sun, 02 Sep 2018 02:19:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KGQWEHQ3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726991AbeIBNdL (ORCPT + 99 others); Sun, 2 Sep 2018 09:33:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:34128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726003AbeIBNdL (ORCPT ); Sun, 2 Sep 2018 09:33:11 -0400 Received: from archlinux (82-132-217-68.dab.02.net [82.132.217.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 805D220841; Sun, 2 Sep 2018 09:18:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1535879886; bh=8Gz7pwSl5Cn5J+bpfRstmDRTgYYSJzfvxi5Gp7iFChM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KGQWEHQ3ujij5Q6yOWidarfcjiYyp5QM/inlNnveyNGClxlAKvfTHgpXZ0tXnN7nR JGhw1x0ra7bjPHHC1N80B9JykLVnYHhOd0sBlMt60StjELZNrmHoN/4XLO5tDZLIiq EKZJ2Jgr7rs0ySbIAUiPaX7WR+rjnQf621OT8wTs= Date: Sun, 2 Sep 2018 10:18:00 +0100 From: Jonathan Cameron To: Afonso Bordado Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 1/4] iio: gyro: add support for fxas21002c Message-ID: <20180902101800.4165005f@archlinux> In-Reply-To: References: <20180825211910.22929-1-afonsobordado@az8.co> <20180827180805.7d4b9f4e@archlinux> X-Mailer: Claws Mail 3.17.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Aug 2018 07:43:48 +0100 Afonso Bordado wrote: > On Mon, 2018-08-27 at 18:08 +0100, Jonathan Cameron wrote: > > On Sat, 25 Aug 2018 22:19:07 +0100 > > Afonso Bordado wrote: > > > > > FXAS21002C is a 3 axis gyroscope with integrated temperature sensor > > > > > > Signed-off-by: Afonso Bordado > > > > Hi, > > > > Driver is pretty clean so only a few minor comments inline. > > If we were late in a cycle I'd probably just have taken it and fixed > > up > > but as we have lots of time and I'm inherently lazy I'll let you do a > > v2 :) > > > > Good job, thanks! > > > > Jonathan > > Great! > > > > > + > > > +static const struct regmap_access_table fxas21002c_volatile_table > > > = { > > > + .yes_ranges = fxas21002c_volatile_ranges, > > > + .n_yes_ranges = ARRAY_SIZE(fxas21002c_volatile_ranges), > > > +}; > > > + > > > +const struct regmap_config fxas21002c_regmap_config = { > > > + .reg_bits = 8, > > > + .val_bits = 8, > > > + > > > + .max_register = FXAS21002C_REG_CTRL_REG3, > > > + // We don't specify a .rd_table because everything is readable > > > > /* ... */ > > > > Please run checkpatch as IIRC it complains about this. > > I've replaced all instances of C99 comments with ANSI comments. > However, has Joe Perches mentioned. Checkpatch did not warn me about > this. > Yup, thanks to Joe for clarifying this I had missed the change. > > > > + > > > +static int fxas21002c_remove(struct i2c_client *client) > > > +{ > > > + struct iio_dev *indio_dev = i2c_get_clientdata(client); > > > + struct fxas21002c_data *data = iio_priv(indio_dev); > > > + > > > + iio_device_unregister(indio_dev); > > > + > > > + fxas21002c_set_operating_mode(data, FXAS21002C_OM_STANDBY); > > > > You could have used the devm_add_action to allow the managed cleanup > > to handle > > this and hence gotten rid of the remove function. > > > > (minor suggestion and somewhat a matter of personal taste). > > I didn't know this existed! Changed in v2. Nor me until someone used it in a driver a few months back ;) One of the advantages of doing a lot of review is that you get to see any new stuff other people use. Jonathan