diff mbox

[v2,01/13] iio: health: max30102: Temperature should be in milli Celsius

Message ID 1509133543-4597-2-git-send-email-pmeerw@pmeerw.net (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Meerwald-Stadler Oct. 27, 2017, 7:45 p.m. UTC
As per ABI temperature should be in milli Celsius after scaling,
not Celsius

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: Matt Ranostay <matt.ranostay@konsulko.com>
---
 drivers/iio/health/max30102.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Matt Ranostay Nov. 19, 2017, 9:09 p.m. UTC | #1
On Fri, Oct 27, 2017 at 12:45 PM, Peter Meerwald-Stadler
<pmeerw@pmeerw.net> wrote:
> As per ABI temperature should be in milli Celsius after scaling,
> not Celsius

Good catch...Thanks

Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>

>
> Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
> Cc: Matt Ranostay <matt.ranostay@konsulko.com>
> ---
>  drivers/iio/health/max30102.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/health/max30102.c b/drivers/iio/health/max30102.c
> index 203ffb9..147a8c1 100644
> --- a/drivers/iio/health/max30102.c
> +++ b/drivers/iio/health/max30102.c
> @@ -371,7 +371,7 @@ static int max30102_read_raw(struct iio_dev *indio_dev,
>                 mutex_unlock(&indio_dev->mlock);
>                 break;
>         case IIO_CHAN_INFO_SCALE:
> -               *val = 1;  /* 0.0625 */
> +               *val = 1000;  /* 62.5 */
>                 *val2 = 16;
>                 ret = IIO_VAL_FRACTIONAL;
>                 break;
> --
> 2.7.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jonathan Cameron Nov. 25, 2017, 2:04 p.m. UTC | #2
On Sun, 19 Nov 2017 13:09:34 -0800
Matt Ranostay <matt.ranostay@konsulko.com> wrote:

> On Fri, Oct 27, 2017 at 12:45 PM, Peter Meerwald-Stadler
> <pmeerw@pmeerw.net> wrote:
> > As per ABI temperature should be in milli Celsius after scaling,
> > not Celsius  
> 
> Good catch...Thanks
> 
> Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Applied to the fixes-togreg branch of iio.git and marked for stable.

I've also added a brief not to emphasise that is breaking the ABI
hence I want it fixed in stable...  (just hammering the point
home ;)

Thanks

Jonathan
> 
> >
> > Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
> > Cc: Matt Ranostay <matt.ranostay@konsulko.com>
> > ---
> >  drivers/iio/health/max30102.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/health/max30102.c b/drivers/iio/health/max30102.c
> > index 203ffb9..147a8c1 100644
> > --- a/drivers/iio/health/max30102.c
> > +++ b/drivers/iio/health/max30102.c
> > @@ -371,7 +371,7 @@ static int max30102_read_raw(struct iio_dev *indio_dev,
> >                 mutex_unlock(&indio_dev->mlock);
> >                 break;
> >         case IIO_CHAN_INFO_SCALE:
> > -               *val = 1;  /* 0.0625 */
> > +               *val = 1000;  /* 62.5 */
> >                 *val2 = 16;
> >                 ret = IIO_VAL_FRACTIONAL;
> >                 break;
> > --
> > 2.7.4
> >  

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/iio/health/max30102.c b/drivers/iio/health/max30102.c
index 203ffb9..147a8c1 100644
--- a/drivers/iio/health/max30102.c
+++ b/drivers/iio/health/max30102.c
@@ -371,7 +371,7 @@  static int max30102_read_raw(struct iio_dev *indio_dev,
 		mutex_unlock(&indio_dev->mlock);
 		break;
 	case IIO_CHAN_INFO_SCALE:
-		*val = 1;  /* 0.0625 */
+		*val = 1000;  /* 62.5 */
 		*val2 = 16;
 		ret = IIO_VAL_FRACTIONAL;
 		break;