mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Looijmans <mike.looijmans@topic.nl>
To: Tomasz Duszynski <tduszyns@gmail.com>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jic23@kernel.org" <jic23@kernel.org>,
	"knaack.h@gmx.de" <knaack.h@gmx.de>,
	"lars@metafoo.de" <lars@metafoo.de>,
	"pmeerw@pmeerw.net" <pmeerw@pmeerw.net>
Subject: Re: [PATCH] iio/gyro/bmg160: Use millidegrees for temperature scale
Date: Wed, 13 Feb 2019 06:58:49 +0000	[thread overview]
Message-ID: <4a775677-1633-db22-af8f-24c411c56eeb@topic.nl> (raw)
In-Reply-To: <20190212170031.GA14756@arch>

On 12-02-19 18:00, Tomasz Duszynski wrote:
> On Tue, Feb 12, 2019 at 03:25:49PM +0100, Mike Looijmans wrote:
>> Standard unit for temperature is millidegrees Celcius, whereas this driver
>> was reporting in degrees. Fix the scale factor in the driver.
>>
>> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
>> ---
>>   drivers/iio/gyro/bmg160_core.c | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/iio/gyro/bmg160_core.c b/drivers/iio/gyro/bmg160_core.c
>> index 63ca316..ad7f8cb 100644
>> --- a/drivers/iio/gyro/bmg160_core.c
>> +++ b/drivers/iio/gyro/bmg160_core.c
>> @@ -585,8 +585,9 @@ static int bmg160_read_raw(struct iio_dev *indio_dev,
>>   		*val = 0;
>>   		switch (chan->type) {
>>   		case IIO_TEMP:
>> -			*val2 = 500000;
>> -			return IIO_VAL_INT_PLUS_MICRO;
>> +			*val = 500;
>> +			*val2 = 0;
>> +			return IIO_VAL_INT;
> 
> You are returning integer type to iio so there's no point in touching
> val2. iio will ignore it anyway.

Indeed, I'll post a v2 for that.

> 
>>   		case IIO_ANGL_VEL:
>>   		{
>>   			int i;
>> --
>> 1.9.1
>>


  reply	other threads:[~2019-02-13  6:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 14:25 Mike Looijmans
2019-02-12 17:00 ` Tomasz Duszynski
2019-02-13  6:58   ` Mike Looijmans [this message]
2019-02-13  7:41 ` [PATCH v2] " Mike Looijmans
2019-02-20 12:10   ` 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=4a775677-1633-db22-af8f-24c411c56eeb@topic.nl \
    --to=mike.looijmans@topic.nl \
    --cc=jic23@kernel.org \
    --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 \
    --cc=tduszyns@gmail.com \
    /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

all inboxes | Powered by JetHome®