linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Himanshu Jha <himanshujha199640@gmail.com>
Cc: devel@driverdev.osuosl.org, daniel.baluta@gmail.com,
	lars@metafoo.de, Michael.Hennerich@analog.com,
	linux-iio@vger.kernel.org, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, pmeerw@pmeerw.net, knaack.h@gmx.de
Subject: Re: [PATCH 10/11] Staging: iio: accel: Add comments about units in data read function
Date: Wed, 7 Mar 2018 20:50:30 +0000	[thread overview]
Message-ID: <20180307205030.11fff428@archlinux> (raw)
In-Reply-To: <1520236170-14668-11-git-send-email-himanshujha199640@gmail.com>

On Mon,  5 Mar 2018 13:19:29 +0530
Himanshu Jha <himanshujha199640@gmail.com> wrote:

> Clarify the conversion and formation of resultant data in the
> adis16201_read_raw() with sufficient comments.
> 
> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
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:

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2018-03-07 20:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-05  7:49 [PATCH 00/11] staging: iio: accel: adis16201 driver cleanup Himanshu Jha
2018-03-05  7:49 ` [PATCH 01/11] Staging: iio: accel: Prefer alphabetical sequence of header files Himanshu Jha
2018-03-07 20:29   ` Jonathan Cameron
2018-03-05  7:49 ` [PATCH 02/11] Staging: iio: accel: Add a blank space before returns Himanshu Jha
2018-03-07 20:32   ` Jonathan Cameron
2018-03-05  7:49 ` [PATCH 03/11] Staging: iio: accel: Remove unnecessary comments Himanshu Jha
2018-03-06 21:26   ` Shreeya Patel
2018-03-06 22:25     ` Himanshu Jha
2018-03-07 20:40   ` Jonathan Cameron
2018-03-05  7:49 ` [PATCH 04/11] Staging: iio: accel: Rename few macro definitions Himanshu Jha
2018-03-07 20:42   ` Jonathan Cameron
2018-03-05  7:49 ` [PATCH 05/11] Staging: iio: accel: Add _REG suffix to registers Himanshu Jha
2018-03-07 20:44   ` Jonathan Cameron
2018-03-05  7:49 ` [PATCH 06/11] Staging: iio: accel: Reverse christmas tree Himanshu Jha
2018-03-05  7:49 ` [PATCH 07/11] Staging: iio: accel: Adjust arguments to match open parentheses Himanshu Jha
2018-03-05 10:16   ` Dan Carpenter
2018-03-05  7:49 ` [PATCH 08/11] Staging: iio: accel: Use switch statement than if-else Himanshu Jha
2018-03-07 20:48   ` Jonathan Cameron
2018-03-05  7:49 ` [PATCH 09/11] Staging: iio: accel: Use sign_extend32 function Himanshu Jha
2018-03-05  7:49 ` [PATCH 10/11] Staging: iio: accel: Add comments about units in data read function Himanshu Jha
2018-03-07 20:50   ` Jonathan Cameron [this message]
2018-03-08  7:28     ` Himanshu Jha
2018-03-10 15:05       ` Jonathan Cameron
2018-03-05  7:49 ` [PATCH 11/11] Staging: iio: accel: Move adis16201 driver out of staging subsystem Himanshu Jha
2018-03-07 20:58   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180307205030.11fff428@archlinux \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=daniel.baluta@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=himanshujha199640@gmail.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).