All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: jic23@jic23.retrosnub.co.uk
Cc: Jonathan Cameron <jic23@kernel.org>,
	linux-iio@vger.kernel.org, Matt Ranostay <mranostay@gmail.com>,
	devicetree@vger.kernel.org, Mark Rutland <Mark.Rutland@arm.com>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <Pawel.Moll@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	linux-iio-owner@vger.kernel.org
Subject: Re: [PATCH V3] iio: pressure: hp03: Add Hope RF HP03 sensor support
Date: Mon, 18 Apr 2016 15:59:20 +0200	[thread overview]
Message-ID: <5714E838.6040702@denx.de> (raw)
In-Reply-To: <809d6d41963caff6c7f3fa26e2009dff@jic23.retrosnub.co.uk>

On 04/18/2016 03:57 PM, jic23@jic23.retrosnub.co.uk wrote:
> On 18.04.2016 14:56, Marek Vasut wrote:
>> On 04/18/2016 03:44 PM, jic23@jic23.retrosnub.co.uk wrote:
>>> On 18.04.2016 14:26, Marek Vasut wrote:
>>>> On 04/16/2016 09:40 PM, Jonathan Cameron wrote:
>>>>> On 10/04/16 21:52, Marek Vasut wrote:
>>>>>> Add support for HopeRF pressure and temperature sensor.
>>>>>>
>>>>>> This device uses two fixed I2C addresses, one for storing
>>>>>> calibration coefficients and another for accessing the ADC.
>>>>>>
>>>>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>>>>> Cc: Matt Ranostay <mranostay@gmail.com>
>>>>>> Cc: Jonathan Cameron <jic23@kernel.org>
>>>>> Sorry I didn't get to this earlier in the week.
>>>>>
>>>>> Unfortunately the resulting scales don't match the standard ABI for
>>>>> these
>>>>> two channel types.
>>>>
>>>> Ah, sorry for the inconvenience.
>>>>
>>>>> Otherwise, looks good. I've cc'd the devicetree list and maintainers.
>>>>> The binding is trivial I think, but always good to give people a
>>>>> opportunity to comment.
>>>>>
>>>>> Jonathan
>>>>>> ---
>>>>>> V2: - Expand the binding document with more details on the XCLR pin
>>>>>>     - Switch from IIO_CHAN_INFO_PROCESSED to RAW + SCALE
>>>>>>     - Add failpath into hp03_update_temp_pressure() for the case
>>>>>>       when ADC readout fails. This correctly sets the XCLR pin back
>>>>>>       to LO now.
>>>>>>     - Add comment explaining the need for allocation of child device
>>>>>>       in hp03_probe().
>>>>>> V3: - Fix indent in the DT binding documentation
>>>>>>     - Report raw pressure and temperature unmodified
>>>>> Good
>>>>>>     - Report pressure scale to be 1 , since pressure is in Pa
>>>>> Standard units for pressure (see
>>>>> Documentation/ABI/testing/sysfs-bus-iio
>>>>> are KPa so it wants to report 0.001)
>>>>
>>>> OK, got it.
>>>>
>>>>>>     - Report temperature scale to be 0.01 , since temp is in 0.01C
>>>>>> steps
>>>>> Unfortunately the documented base unit for temp (originally from
>>>>> hwmon before
>>>>> we started going for SI units every time) are milli Celcius.  Thus
>>>>> the value
>>>>> reported * scale should end up in milli degrees Celcius. Hence if it
>>>>> is in 0.01
>>>>> steps the scale should be 0.1
>>>>
>>>> Shouldn't this be 10 ? The value is in 0.01C steps , so the value
>>>> has to
>>>> be multiplied by 10 to convert it into mC units.
>>> err. yes I'm clearly wrong :)
>>
>> Thanks for confirming :) V4 is coming.
> Beware, I might not be any more correct today ;)

That's fine, take your time, MW opening is far away :)

-- 
Best regards,
Marek Vasut

WARNING: multiple messages have this Message-ID (diff)
From: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
To: jic23-tko9wxEg+fIOOJlXag/Snyp2UmYkHbXO@public.gmane.org
Cc: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Matt Ranostay <mranostay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Mark Rutland <Mark.Rutland-5wv7dgnIgG8@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <Pawel.Moll-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	linux-iio-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH V3] iio: pressure: hp03: Add Hope RF HP03 sensor support
Date: Mon, 18 Apr 2016 15:59:20 +0200	[thread overview]
Message-ID: <5714E838.6040702@denx.de> (raw)
In-Reply-To: <809d6d41963caff6c7f3fa26e2009dff-tko9wxEg+fIOOJlXag/Snyp2UmYkHbXO@public.gmane.org>

On 04/18/2016 03:57 PM, jic23-tko9wxEg+fIOOJlXag/Snyp2UmYkHbXO@public.gmane.org wrote:
> On 18.04.2016 14:56, Marek Vasut wrote:
>> On 04/18/2016 03:44 PM, jic23-tko9wxEg+fIOOJlXag/Snyp2UmYkHbXO@public.gmane.org wrote:
>>> On 18.04.2016 14:26, Marek Vasut wrote:
>>>> On 04/16/2016 09:40 PM, Jonathan Cameron wrote:
>>>>> On 10/04/16 21:52, Marek Vasut wrote:
>>>>>> Add support for HopeRF pressure and temperature sensor.
>>>>>>
>>>>>> This device uses two fixed I2C addresses, one for storing
>>>>>> calibration coefficients and another for accessing the ADC.
>>>>>>
>>>>>> Signed-off-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
>>>>>> Cc: Matt Ranostay <mranostay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>>>> Cc: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>>>>> Sorry I didn't get to this earlier in the week.
>>>>>
>>>>> Unfortunately the resulting scales don't match the standard ABI for
>>>>> these
>>>>> two channel types.
>>>>
>>>> Ah, sorry for the inconvenience.
>>>>
>>>>> Otherwise, looks good. I've cc'd the devicetree list and maintainers.
>>>>> The binding is trivial I think, but always good to give people a
>>>>> opportunity to comment.
>>>>>
>>>>> Jonathan
>>>>>> ---
>>>>>> V2: - Expand the binding document with more details on the XCLR pin
>>>>>>     - Switch from IIO_CHAN_INFO_PROCESSED to RAW + SCALE
>>>>>>     - Add failpath into hp03_update_temp_pressure() for the case
>>>>>>       when ADC readout fails. This correctly sets the XCLR pin back
>>>>>>       to LO now.
>>>>>>     - Add comment explaining the need for allocation of child device
>>>>>>       in hp03_probe().
>>>>>> V3: - Fix indent in the DT binding documentation
>>>>>>     - Report raw pressure and temperature unmodified
>>>>> Good
>>>>>>     - Report pressure scale to be 1 , since pressure is in Pa
>>>>> Standard units for pressure (see
>>>>> Documentation/ABI/testing/sysfs-bus-iio
>>>>> are KPa so it wants to report 0.001)
>>>>
>>>> OK, got it.
>>>>
>>>>>>     - Report temperature scale to be 0.01 , since temp is in 0.01C
>>>>>> steps
>>>>> Unfortunately the documented base unit for temp (originally from
>>>>> hwmon before
>>>>> we started going for SI units every time) are milli Celcius.  Thus
>>>>> the value
>>>>> reported * scale should end up in milli degrees Celcius. Hence if it
>>>>> is in 0.01
>>>>> steps the scale should be 0.1
>>>>
>>>> Shouldn't this be 10 ? The value is in 0.01C steps , so the value
>>>> has to
>>>> be multiplied by 10 to convert it into mC units.
>>> err. yes I'm clearly wrong :)
>>
>> Thanks for confirming :) V4 is coming.
> Beware, I might not be any more correct today ;)

That's fine, take your time, MW opening is far away :)

-- 
Best regards,
Marek Vasut

  reply	other threads:[~2016-04-18 13:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-10 20:52 [PATCH V3] iio: pressure: hp03: Add Hope RF HP03 sensor support Marek Vasut
2016-04-16 19:40 ` Jonathan Cameron
2016-04-16 19:40   ` Jonathan Cameron
2016-04-18 13:26   ` Marek Vasut
2016-04-18 13:26     ` Marek Vasut
2016-04-18 13:44     ` jic23
2016-04-18 13:44       ` jic23-tko9wxEg+fIOOJlXag/Snyp2UmYkHbXO
2016-04-18 13:56       ` Marek Vasut
2016-04-18 13:56         ` Marek Vasut
2016-04-18 13:57         ` jic23
2016-04-18 13:57           ` jic23-tko9wxEg+fIOOJlXag/Snyp2UmYkHbXO
2016-04-18 13:59           ` Marek Vasut [this message]
2016-04-18 13:59             ` Marek Vasut

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=5714E838.6040702@denx.de \
    --to=marex@denx.de \
    --cc=Mark.Rutland@arm.com \
    --cc=Pawel.Moll@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jic23@jic23.retrosnub.co.uk \
    --cc=jic23@kernel.org \
    --cc=linux-iio-owner@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=mranostay@gmail.com \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.