Received: by 10.223.185.116 with SMTP id b49csp5498970wrg; Wed, 7 Mar 2018 12:51:54 -0800 (PST) X-Google-Smtp-Source: AG47ELspCax6aSGSfKudPUE9fDlh+2iyLekBUs5yATbL4Q1Rw5ukQvO3s3z44vwHlvjgQvHWRLss X-Received: by 10.99.7.15 with SMTP id 15mr18546026pgh.388.1520455914885; Wed, 07 Mar 2018 12:51:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520455914; cv=none; d=google.com; s=arc-20160816; b=xmblT4VcINOOVWtAybPLpsTIXeEjri/rZCgWtQSQDKoPyLbbi2VTGurWNh9SOmlsEY xOi4eap+2kxw2JBfUG5JwA4erWM2CFC+pRCoU42qUGFvECk241CTmFTPWsAq9uxATyp4 KaArQ6cfJ4kE5dmKVSXr3cWC2PLVdOpoOf1JpZ7ghOtVAq5sJ+gX0KSOcn8AGkQ7iY+e KQT8NliMB0ffCz47rwKyq6RHNLNCz38ROMN9Zlav83QKH267pfNvjRUrYuY3ANG5G94c /hpzdxPI1R89RaLuQLT4KDw7e1n6kKIt8nNP0bx3yNWSUWytgnCSO6NIDpeeRL3a1WuJ pckQ== 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 :dmarc-filter:arc-authentication-results; bh=cO5fRZ9hm26pMfB/NjrkskhUrHoNosFZWrAlVWbhF3g=; b=HqZ8RUUU3e0eBmbzMGjpaV3COP4HfFb+UuXWRkNavFIAsnx/G8hh+p9aXtI2JJMZw9 jgU/OJBkz6bzuD5qkfpuFYCipS3lN07YhTj0W24ByxtC/0mFVFawWGirYHa+eX28Ye44 CEiHJ9Mnj6lzCU5/nxf9mS6x0gVmsVc53j0GZaOW869fL1V7Gc/6BQFX7LHkP4FcGniv zN9vFlAGUD17N4bEUBx7GoBqvoleuiU7UvMnxR/1yVpFxmotjInfJPK6m+q0N1MmmWSq sxZC6dje5TnEymIKFtTb7weSWWePTMwIN+TxjJ4gdM42ItLeUKJ6Pm9uC6F0KV/KHKmI MwbQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si13426187plr.786.2018.03.07.12.51.40; Wed, 07 Mar 2018 12:51:54 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934652AbeCGUuj (ORCPT + 99 others); Wed, 7 Mar 2018 15:50:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:36150 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934454AbeCGUuf (ORCPT ); Wed, 7 Mar 2018 15:50:35 -0500 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (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 E318320685; Wed, 7 Mar 2018 20:50:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E318320685 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jic23@kernel.org Date: Wed, 7 Mar 2018 20:50:30 +0000 From: Jonathan Cameron To: Himanshu Jha Cc: lars@metafoo.de, Michael.Hennerich@analog.com, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, daniel.baluta@gmail.com Subject: Re: [PATCH 10/11] Staging: iio: accel: Add comments about units in data read function Message-ID: <20180307205030.11fff428@archlinux> In-Reply-To: <1520236170-14668-11-git-send-email-himanshujha199640@gmail.com> References: <1520236170-14668-1-git-send-email-himanshujha199640@gmail.com> <1520236170-14668-11-git-send-email-himanshujha199640@gmail.com> X-Mailer: Claws Mail 3.16.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 Mon, 5 Mar 2018 13:19:29 +0530 Himanshu Jha wrote: > Clarify the conversion and formation of resultant data in the > adis16201_read_raw() with sufficient comments. > > Signed-off-by: Himanshu Jha This is fine but it needs to be in the original comment changing patch rather than removing the comments first then a few patches later putting back a different version. So good change but in the wrong place in the series. Learning to reorder a series and merge down multiple patches into one is very useful when working with git. Thanks, Jonathan > --- > drivers/staging/iio/accel/adis16201.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/staging/iio/accel/adis16201.c b/drivers/staging/iio/accel/adis16201.c > index 8d795e2..946c7b1 100644 > --- a/drivers/staging/iio/accel/adis16201.c > +++ b/drivers/staging/iio/accel/adis16201.c > @@ -130,6 +130,11 @@ static int adis16201_read_raw(struct iio_dev *indio_dev, > *val2 = 0; > return IIO_VAL_INT_PLUS_MICRO; > case IIO_ACCEL: > + /* > + * IIO base unit for sensitivity of accelerometer > + * is milli g. > + * 1 LSB represents 0.244 mg. > + */ > *val = 0; > *val2 = IIO_G_TO_M_S_2(462400); > return IIO_VAL_INT_PLUS_NANO; > @@ -142,6 +147,11 @@ static int adis16201_read_raw(struct iio_dev *indio_dev, > } > break; > case IIO_CHAN_INFO_OFFSET: > + /* > + * The raw ADC value is 0x4FE when the temperature > + * is 25 degrees and the scale factor per milli > + * degree celcius is -470. > + */ > *val = 25000 / -470 - 1278; > return IIO_VAL_INT; > case IIO_CHAN_INFO_CALIBBIAS: