Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-18 Thread Jonathan Cameron
On Sun, 17 Jan 2021 13:02:31 -0800 Jyoti Bhayana wrote: > Hi Jonathan, > > Instead of IIO_VAL_INT_PLUS_MICRO, we can also use IIO_VAL_FRACTIONAL > right for the raw values for min/max range and resolution? But, to Sure on IIO_VAL_FRACTIONAL, that should be fine. > keep things simple though, it

Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-17 Thread Jyoti Bhayana
Hi Jonathan, Instead of IIO_VAL_INT_PLUS_MICRO, we can also use IIO_VAL_FRACTIONAL right for the raw values for min/max range and resolution? But, to keep things simple though, it will be nice if the IIO driver uses IIO_VAL_INT and throws an error if there is a negative exponent in the following

Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-17 Thread Jonathan Cameron
On Sat, 16 Jan 2021 23:15:56 -0800 Jyoti Bhayana wrote: > Hi Jonathan, > > Can you clarify one thing ? If we go with option 2 which is using > IIO_AVAIL_RANGE for min,step,high using IIO_VAL_INT then how will it > ensure the possible floating value for step as we are using int type? As you've id

Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-16 Thread Jyoti Bhayana
Hi Jonathan, Can you clarify one thing ? If we go with option 2 which is using IIO_AVAIL_RANGE for min,step,high using IIO_VAL_INT then how will it ensure the possible floating value for step as we are using int type? Thanks, Jyoti On Sat, Jan 16, 2021 at 11:33 AM Jonathan Cameron wrote: > > On

Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-16 Thread Jonathan Cameron
On Mon, 11 Jan 2021 13:17:51 -0800 Jyoti Bhayana wrote: > Hi Jonathan, > > I know it is a bit confusing. Let me try to explain it with some > examples to hopefully clarify some things here. > SCMI Platform talks to the native/actual sensor, gets the raw values > from the native sensor and applie

Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-11 Thread Jyoti Bhayana
Hi Jonathan, I know it is a bit confusing. Let me try to explain it with some examples to hopefully clarify some things here. SCMI Platform talks to the native/actual sensor, gets the raw values from the native sensor and applies the scale and then sends those values to the SCMI agent and the SCMI

Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-11 Thread Jonathan Cameron
On Sun, 10 Jan 2021 22:44:44 -0800 Jyoti Bhayana wrote: > Hi Jonathan, > > In section 4.7.2.5.1 of the specification, the following exponent is > the scale value > > uint32 axis_attributes_high > Bits[15:11] Exponent: The power-of-10 multiplier in two’s-complement > format that is applied to th

Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-10 Thread Jyoti Bhayana
Hi Jonathan, In section 4.7.2.5.1 of the specification, the following exponent is the scale value uint32 axis_attributes_high Bits[15:11] Exponent: The power-of-10 multiplier in two’s-complement format that is applied to the sensor unit specified by the SensorType field. and the resolution is u

Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-09 Thread Jonathan Cameron
On Wed, 6 Jan 2021 21:23:53 + Jyoti Bhayana wrote: > Hi Jonathan, > > Instead of adding IIO_VAL_INT_H32_L32, I am thinking of adding > IIO_VAL_FRACTIONAL_LONG > or IIO_VAL_FRACTIONAL_64 as the scale/exponent used for min/max range can be > different > than the one used in resolution accor

Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-06 Thread Jyoti Bhayana
Hi Jonathan, Instead of adding IIO_VAL_INT_H32_L32, I am thinking of adding IIO_VAL_FRACTIONAL_LONG or IIO_VAL_FRACTIONAL_64 as the scale/exponent used for min/max range can be different than the one used in resolution according to specification. I am planning to use read_avail for IIO_CHAN_IN

Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-06 Thread Cristian Marussi
On Wed, Jan 06, 2021 at 02:36:45PM +, Jonathan Cameron wrote: > On Wed, 6 Jan 2021 11:26:59 + > Cristian Marussi wrote: > > > Hi > > > > On Wed, Jan 06, 2021 at 10:29:17AM +, Jonathan Cameron wrote: > > > On Tue, 5 Jan 2021 23:09:20 + > > > Jyoti Bhayana wrote: > > > > > > >

Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-06 Thread Jonathan Cameron
On Wed, 6 Jan 2021 11:26:59 + Cristian Marussi wrote: > Hi > > On Wed, Jan 06, 2021 at 10:29:17AM +, Jonathan Cameron wrote: > > On Tue, 5 Jan 2021 23:09:20 + > > Jyoti Bhayana wrote: > > > > > Hi Jonathan, > > > > > > > So, sensor_max_range can effectively be exposed as a com

Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-06 Thread Cristian Marussi
Hi On Wed, Jan 06, 2021 at 10:29:17AM +, Jonathan Cameron wrote: > On Tue, 5 Jan 2021 23:09:20 + > Jyoti Bhayana wrote: > > > Hi Jonathan, > > > > > So, sensor_max_range can effectively be exposed as a combination of > > > scale and the *_raw_avail for a raw read (via the read_avail cal

Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-06 Thread Jonathan Cameron
On Tue, 5 Jan 2021 23:09:20 + Jyoti Bhayana wrote: > Hi Jonathan, > > > So, sensor_max_range can effectively be exposed as a combination of > > scale and the *_raw_avail for a raw read (via the read_avail callback in > > IIO). > > We'll ignore the fact the interface assumes a single value (

Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2021-01-05 Thread Jyoti Bhayana
Hi Jonathan, > So, sensor_max_range can effectively be exposed as a combination of > scale and the *_raw_avail for a raw read (via the read_avail callback in IIO). > We'll ignore the fact the interface assumes a single value (so I assume > symmetric?) Based on the SCMI specification the sensor m

Re: [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2020-12-30 Thread Jonathan Cameron
On Thu, 24 Dec 2020 03:19:20 + Jyoti Bhayana wrote: > Hi, > > This series adds support for ARM SCMI Protocol based IIO Device. > This driver provides support for Accelerometer and Gyroscope sensor > using new SCMI Sensor Protocol defined by the upcoming SCMIv3.0 ARM > specification, which is

[RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2020-12-23 Thread Jyoti Bhayana
Hi, This series adds support for ARM SCMI Protocol based IIO Device. This driver provides support for Accelerometer and Gyroscope sensor using new SCMI Sensor Protocol defined by the upcoming SCMIv3.0 ARM specification, which is available at https://developer.arm.com/documentation/den0056/c/ Th