Re: [PATCH V3] iio: pressure: hp03: Add Hope RF HP03 sensor support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 18.04.2016 14:56, Marek Vasut wrote:
On 04/18/2016 03:44 PM, jic23@xxxxxxxxxxxxxxxxxxxxx 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@xxxxxxx>
Cc: Matt Ranostay <mranostay@xxxxxxxxx>
Cc: Jonathan Cameron <jic23@xxxxxxxxxx>
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 ;)

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux