linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Add available sampling frequency and scale attributes
@ 2016-04-29 11:42 Daniel Baluta
  2016-04-29 11:42 ` [PATCH 1/3] iio: bmi160: Fix output data rate for accel Daniel Baluta
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Daniel Baluta @ 2016-04-29 11:42 UTC (permalink / raw)
  To: jic23; +Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel, daniel.baluta

First two patches are bugfixes related to sampling frequency and the last
one is adding support for exporting available sampling frequency and scale.

Daniel Baluta (3):
  iio: bmi160: Fix output data rate for accel
  iio: bmi160: Fix ODR setting
  imu: bmi160: Add avail frequency and scale attributes

 drivers/iio/imu/bmi160/bmi160_core.c | 43 +++++++++++++++++++++++++++++-------
 1 file changed, 35 insertions(+), 8 deletions(-)

-- 
2.5.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] iio: bmi160: Fix output data rate for accel
  2016-04-29 11:42 [PATCH 0/3] Add available sampling frequency and scale attributes Daniel Baluta
@ 2016-04-29 11:42 ` Daniel Baluta
  2016-05-01 19:00   ` Jonathan Cameron
  2016-04-29 11:42 ` [PATCH 2/3] iio: bmi160: Fix ODR setting Daniel Baluta
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Daniel Baluta @ 2016-04-29 11:42 UTC (permalink / raw)
  To: jic23; +Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel, daniel.baluta

Format is INT_PLUS_MICRO and micro odr part of ODR should
be parts of a micro.

Also s/8000/800 this is obviously a typo.

Fixes: 77c4ad2d6a9 ("iio: imu: Add initial support for Bosch BMI160")
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
---
 drivers/iio/imu/bmi160/bmi160_core.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/imu/bmi160/bmi160_core.c b/drivers/iio/imu/bmi160/bmi160_core.c
index 0bf92b0..cd9b75e 100644
--- a/drivers/iio/imu/bmi160/bmi160_core.c
+++ b/drivers/iio/imu/bmi160/bmi160_core.c
@@ -209,11 +209,11 @@ static const struct  bmi160_scale_item bmi160_scale_table[] = {
 };
 
 static const struct bmi160_odr bmi160_accel_odr[] = {
-	{0x01, 0, 78125},
-	{0x02, 1, 5625},
-	{0x03, 3, 125},
-	{0x04, 6, 25},
-	{0x05, 12, 5},
+	{0x01, 0, 781250},
+	{0x02, 1, 562500},
+	{0x03, 3, 125000},
+	{0x04, 6, 250000},
+	{0x05, 12, 500000},
 	{0x06, 25, 0},
 	{0x07, 50, 0},
 	{0x08, 100, 0},
@@ -229,7 +229,7 @@ static const struct bmi160_odr bmi160_gyro_odr[] = {
 	{0x08, 100, 0},
 	{0x09, 200, 0},
 	{0x0A, 400, 0},
-	{0x0B, 8000, 0},
+	{0x0B, 800, 0},
 	{0x0C, 1600, 0},
 	{0x0D, 3200, 0},
 };
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] iio: bmi160: Fix ODR setting
  2016-04-29 11:42 [PATCH 0/3] Add available sampling frequency and scale attributes Daniel Baluta
  2016-04-29 11:42 ` [PATCH 1/3] iio: bmi160: Fix output data rate for accel Daniel Baluta
@ 2016-04-29 11:42 ` Daniel Baluta
  2016-05-04  9:51   ` Jonathan Cameron
  2016-04-29 11:42 ` [PATCH 3/3] imu: bmi160: Add avail frequency and scale attributes Daniel Baluta
  2016-05-01 18:57 ` [PATCH 0/3] Add available sampling " Jonathan Cameron
  3 siblings, 1 reply; 10+ messages in thread
From: Daniel Baluta @ 2016-04-29 11:42 UTC (permalink / raw)
  To: jic23; +Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel, daniel.baluta

mask and val parameters of regmap_update_bits were reveresed.

Fixes: 77c4ad2d6a9 ("iio: imu: Add initial support for Bosch BMI160")
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
---
 drivers/iio/imu/bmi160/bmi160_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/imu/bmi160/bmi160_core.c b/drivers/iio/imu/bmi160/bmi160_core.c
index cd9b75e..b8a290e 100644
--- a/drivers/iio/imu/bmi160/bmi160_core.c
+++ b/drivers/iio/imu/bmi160/bmi160_core.c
@@ -364,8 +364,8 @@ int bmi160_set_odr(struct bmi160_data *data, enum bmi160_sensor_type t,
 
 	return regmap_update_bits(data->regmap,
 				  bmi160_regs[t].config,
-				  bmi160_odr_table[t].tbl[i].bits,
-				  bmi160_regs[t].config_odr_mask);
+				  bmi160_regs[t].config_odr_mask,
+				  bmi160_odr_table[t].tbl[i].bits);
 }
 
 static int bmi160_get_odr(struct bmi160_data *data, enum bmi160_sensor_type t,
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] imu: bmi160: Add avail frequency and scale attributes
  2016-04-29 11:42 [PATCH 0/3] Add available sampling frequency and scale attributes Daniel Baluta
  2016-04-29 11:42 ` [PATCH 1/3] iio: bmi160: Fix output data rate for accel Daniel Baluta
  2016-04-29 11:42 ` [PATCH 2/3] iio: bmi160: Fix ODR setting Daniel Baluta
@ 2016-04-29 11:42 ` Daniel Baluta
  2016-05-01 19:01   ` Jonathan Cameron
  2016-05-01 18:57 ` [PATCH 0/3] Add available sampling " Jonathan Cameron
  3 siblings, 1 reply; 10+ messages in thread
From: Daniel Baluta @ 2016-04-29 11:42 UTC (permalink / raw)
  To: jic23; +Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel, daniel.baluta

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
---
 drivers/iio/imu/bmi160/bmi160_core.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/drivers/iio/imu/bmi160/bmi160_core.c b/drivers/iio/imu/bmi160/bmi160_core.c
index b8a290e..97928d5 100644
--- a/drivers/iio/imu/bmi160/bmi160_core.c
+++ b/drivers/iio/imu/bmi160/bmi160_core.c
@@ -20,6 +20,7 @@
 #include <linux/iio/triggered_buffer.h>
 #include <linux/iio/trigger_consumer.h>
 #include <linux/iio/buffer.h>
+#include <linux/iio/sysfs.h>
 
 #include "bmi160.h"
 
@@ -466,10 +467,36 @@ static int bmi160_write_raw(struct iio_dev *indio_dev,
 	return 0;
 }
 
+static
+IIO_CONST_ATTR(in_accel_sampling_frequency_available,
+	       "0.78125 1.5625 3.125 6.25 12.5 25 50 100 200 400 800 1600");
+static
+IIO_CONST_ATTR(in_anglvel_sampling_frequency_available,
+	       "25 50 100 200 400 800 1600 3200");
+static
+IIO_CONST_ATTR(in_accel_scale_available,
+	       "0.000598 0.001197 0.002394 0.004788");
+static
+IIO_CONST_ATTR(in_anglvel_scale_available,
+	       "0.001065 0.000532 0.000266 0.000133 0.000066");
+
+static struct attribute *bmi160_attrs[] = {
+	&iio_const_attr_in_accel_sampling_frequency_available.dev_attr.attr,
+	&iio_const_attr_in_anglvel_sampling_frequency_available.dev_attr.attr,
+	&iio_const_attr_in_accel_scale_available.dev_attr.attr,
+	&iio_const_attr_in_anglvel_scale_available.dev_attr.attr,
+	NULL,
+};
+
+static const struct attribute_group bmi160_attrs_group = {
+	.attrs = bmi160_attrs,
+};
+
 static const struct iio_info bmi160_info = {
 	.driver_module = THIS_MODULE,
 	.read_raw = bmi160_read_raw,
 	.write_raw = bmi160_write_raw,
+	.attrs = &bmi160_attrs_group,
 };
 
 static const char *bmi160_match_acpi_device(struct device *dev)
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/3] Add available sampling frequency and scale attributes
  2016-04-29 11:42 [PATCH 0/3] Add available sampling frequency and scale attributes Daniel Baluta
                   ` (2 preceding siblings ...)
  2016-04-29 11:42 ` [PATCH 3/3] imu: bmi160: Add avail frequency and scale attributes Daniel Baluta
@ 2016-05-01 18:57 ` Jonathan Cameron
  3 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2016-05-01 18:57 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel

On 29/04/16 12:42, Daniel Baluta wrote:
> First two patches are bugfixes related to sampling frequency and the last
> one is adding support for exporting available sampling frequency and scale.
> 
> Daniel Baluta (3):
>   iio: bmi160: Fix output data rate for accel
>   iio: bmi160: Fix ODR setting
>   imu: bmi160: Add avail frequency and scale attributes
> 
>  drivers/iio/imu/bmi160/bmi160_core.c | 43 +++++++++++++++++++++++++++++-------
>  1 file changed, 35 insertions(+), 8 deletions(-)
> 
*cough* Daniel, a part name might be nice in the cover letter title!

J

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] iio: bmi160: Fix output data rate for accel
  2016-04-29 11:42 ` [PATCH 1/3] iio: bmi160: Fix output data rate for accel Daniel Baluta
@ 2016-05-01 19:00   ` Jonathan Cameron
  2016-05-04  9:50     ` Jonathan Cameron
  0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Cameron @ 2016-05-01 19:00 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel

On 29/04/16 12:42, Daniel Baluta wrote:
> Format is INT_PLUS_MICRO and micro odr part of ODR should
> be parts of a micro.
> 
> Also s/8000/800 this is obviously a typo.
> 
> Fixes: 77c4ad2d6a9 ("iio: imu: Add initial support for Bosch BMI160")
> Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
I can't set up a suitable fixes branch for this as I'm without internet to grab an
updated staging-next tree right now.  Will mark it to be sorted out when I get some time
back on a sensible internet connection (France is always a lot bigger than I expect it
to be for some reason...)

Anyhow, poke me if you don't hear anything before the end of the week.

Note this will probably have to go in post merge window now as I doubt I'll be doing
another pull before that opens.

Jonathan
> ---
>  drivers/iio/imu/bmi160/bmi160_core.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/iio/imu/bmi160/bmi160_core.c b/drivers/iio/imu/bmi160/bmi160_core.c
> index 0bf92b0..cd9b75e 100644
> --- a/drivers/iio/imu/bmi160/bmi160_core.c
> +++ b/drivers/iio/imu/bmi160/bmi160_core.c
> @@ -209,11 +209,11 @@ static const struct  bmi160_scale_item bmi160_scale_table[] = {
>  };
>  
>  static const struct bmi160_odr bmi160_accel_odr[] = {
> -	{0x01, 0, 78125},
> -	{0x02, 1, 5625},
> -	{0x03, 3, 125},
> -	{0x04, 6, 25},
> -	{0x05, 12, 5},
> +	{0x01, 0, 781250},
> +	{0x02, 1, 562500},
> +	{0x03, 3, 125000},
> +	{0x04, 6, 250000},
> +	{0x05, 12, 500000},
>  	{0x06, 25, 0},
>  	{0x07, 50, 0},
>  	{0x08, 100, 0},
> @@ -229,7 +229,7 @@ static const struct bmi160_odr bmi160_gyro_odr[] = {
>  	{0x08, 100, 0},
>  	{0x09, 200, 0},
>  	{0x0A, 400, 0},
> -	{0x0B, 8000, 0},
> +	{0x0B, 800, 0},
>  	{0x0C, 1600, 0},
>  	{0x0D, 3200, 0},
>  };
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] imu: bmi160: Add avail frequency and scale attributes
  2016-04-29 11:42 ` [PATCH 3/3] imu: bmi160: Add avail frequency and scale attributes Daniel Baluta
@ 2016-05-01 19:01   ` Jonathan Cameron
  2016-05-04  9:51     ` Jonathan Cameron
  0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Cameron @ 2016-05-01 19:01 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel

On 29/04/16 12:42, Daniel Baluta wrote:
> Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
These are not strictly 'required' so will have to be next cycle now...

Again, poke me if I haven't  picked this up in a week or so...
Jonathan
> ---
>  drivers/iio/imu/bmi160/bmi160_core.c | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/drivers/iio/imu/bmi160/bmi160_core.c b/drivers/iio/imu/bmi160/bmi160_core.c
> index b8a290e..97928d5 100644
> --- a/drivers/iio/imu/bmi160/bmi160_core.c
> +++ b/drivers/iio/imu/bmi160/bmi160_core.c
> @@ -20,6 +20,7 @@
>  #include <linux/iio/triggered_buffer.h>
>  #include <linux/iio/trigger_consumer.h>
>  #include <linux/iio/buffer.h>
> +#include <linux/iio/sysfs.h>
>  
>  #include "bmi160.h"
>  
> @@ -466,10 +467,36 @@ static int bmi160_write_raw(struct iio_dev *indio_dev,
>  	return 0;
>  }
>  
> +static
> +IIO_CONST_ATTR(in_accel_sampling_frequency_available,
> +	       "0.78125 1.5625 3.125 6.25 12.5 25 50 100 200 400 800 1600");
> +static
> +IIO_CONST_ATTR(in_anglvel_sampling_frequency_available,
> +	       "25 50 100 200 400 800 1600 3200");
> +static
> +IIO_CONST_ATTR(in_accel_scale_available,
> +	       "0.000598 0.001197 0.002394 0.004788");
> +static
> +IIO_CONST_ATTR(in_anglvel_scale_available,
> +	       "0.001065 0.000532 0.000266 0.000133 0.000066");
> +
> +static struct attribute *bmi160_attrs[] = {
> +	&iio_const_attr_in_accel_sampling_frequency_available.dev_attr.attr,
> +	&iio_const_attr_in_anglvel_sampling_frequency_available.dev_attr.attr,
> +	&iio_const_attr_in_accel_scale_available.dev_attr.attr,
> +	&iio_const_attr_in_anglvel_scale_available.dev_attr.attr,
> +	NULL,
> +};
> +
> +static const struct attribute_group bmi160_attrs_group = {
> +	.attrs = bmi160_attrs,
> +};
> +
>  static const struct iio_info bmi160_info = {
>  	.driver_module = THIS_MODULE,
>  	.read_raw = bmi160_read_raw,
>  	.write_raw = bmi160_write_raw,
> +	.attrs = &bmi160_attrs_group,
>  };
>  
>  static const char *bmi160_match_acpi_device(struct device *dev)
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] iio: bmi160: Fix output data rate for accel
  2016-05-01 19:00   ` Jonathan Cameron
@ 2016-05-04  9:50     ` Jonathan Cameron
  0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2016-05-04  9:50 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel

On 01/05/16 20:00, Jonathan Cameron wrote:
> On 29/04/16 12:42, Daniel Baluta wrote:
>> Format is INT_PLUS_MICRO and micro odr part of ODR should
>> be parts of a micro.
>>
>> Also s/8000/800 this is obviously a typo.
>>
>> Fixes: 77c4ad2d6a9 ("iio: imu: Add initial support for Bosch BMI160")
>> Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
> I can't set up a suitable fixes branch for this as I'm without internet to grab an
> updated staging-next tree right now.  Will mark it to be sorted out when I get some time
> back on a sensible internet connection (France is always a lot bigger than I expect it
> to be for some reason...)
> 
> Anyhow, poke me if you don't hear anything before the end of the week.
> 
> Note this will probably have to go in post merge window now as I doubt I'll be doing
> another pull before that opens.
> 
> Jonathan
Applied to the fixes-togreg-post-rc1 branch which will get pushed out when
I get home.  France is awfully big sometimes.

Jonathan
>> ---
>>  drivers/iio/imu/bmi160/bmi160_core.c | 12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/iio/imu/bmi160/bmi160_core.c b/drivers/iio/imu/bmi160/bmi160_core.c
>> index 0bf92b0..cd9b75e 100644
>> --- a/drivers/iio/imu/bmi160/bmi160_core.c
>> +++ b/drivers/iio/imu/bmi160/bmi160_core.c
>> @@ -209,11 +209,11 @@ static const struct  bmi160_scale_item bmi160_scale_table[] = {
>>  };
>>  
>>  static const struct bmi160_odr bmi160_accel_odr[] = {
>> -	{0x01, 0, 78125},
>> -	{0x02, 1, 5625},
>> -	{0x03, 3, 125},
>> -	{0x04, 6, 25},
>> -	{0x05, 12, 5},
>> +	{0x01, 0, 781250},
>> +	{0x02, 1, 562500},
>> +	{0x03, 3, 125000},
>> +	{0x04, 6, 250000},
>> +	{0x05, 12, 500000},
>>  	{0x06, 25, 0},
>>  	{0x07, 50, 0},
>>  	{0x08, 100, 0},
>> @@ -229,7 +229,7 @@ static const struct bmi160_odr bmi160_gyro_odr[] = {
>>  	{0x08, 100, 0},
>>  	{0x09, 200, 0},
>>  	{0x0A, 400, 0},
>> -	{0x0B, 8000, 0},
>> +	{0x0B, 800, 0},
>>  	{0x0C, 1600, 0},
>>  	{0x0D, 3200, 0},
>>  };
>>
> 
> --
> 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
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] iio: bmi160: Fix ODR setting
  2016-04-29 11:42 ` [PATCH 2/3] iio: bmi160: Fix ODR setting Daniel Baluta
@ 2016-05-04  9:51   ` Jonathan Cameron
  0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2016-05-04  9:51 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel

On 29/04/16 12:42, Daniel Baluta wrote:
> mask and val parameters of regmap_update_bits were reveresed.
> 
> Fixes: 77c4ad2d6a9 ("iio: imu: Add initial support for Bosch BMI160")
> Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Applied to the fixes-togreg-post-rc1 branch of iio.git.

Not pushed out as anything at all yet.

Jonathan
> ---
>  drivers/iio/imu/bmi160/bmi160_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/imu/bmi160/bmi160_core.c b/drivers/iio/imu/bmi160/bmi160_core.c
> index cd9b75e..b8a290e 100644
> --- a/drivers/iio/imu/bmi160/bmi160_core.c
> +++ b/drivers/iio/imu/bmi160/bmi160_core.c
> @@ -364,8 +364,8 @@ int bmi160_set_odr(struct bmi160_data *data, enum bmi160_sensor_type t,
>  
>  	return regmap_update_bits(data->regmap,
>  				  bmi160_regs[t].config,
> -				  bmi160_odr_table[t].tbl[i].bits,
> -				  bmi160_regs[t].config_odr_mask);
> +				  bmi160_regs[t].config_odr_mask,
> +				  bmi160_odr_table[t].tbl[i].bits);
>  }
>  
>  static int bmi160_get_odr(struct bmi160_data *data, enum bmi160_sensor_type t,
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] imu: bmi160: Add avail frequency and scale attributes
  2016-05-01 19:01   ` Jonathan Cameron
@ 2016-05-04  9:51     ` Jonathan Cameron
  0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2016-05-04  9:51 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel

On 01/05/16 20:01, Jonathan Cameron wrote:
> On 29/04/16 12:42, Daniel Baluta wrote:
>> Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
> These are not strictly 'required' so will have to be next cycle now...
> 
> Again, poke me if I haven't  picked this up in a week or so...
> Jonathan
Applied to the togreg branch of iio.git

Thanks,

Jonathan
>> ---
>>  drivers/iio/imu/bmi160/bmi160_core.c | 27 +++++++++++++++++++++++++++
>>  1 file changed, 27 insertions(+)
>>
>> diff --git a/drivers/iio/imu/bmi160/bmi160_core.c b/drivers/iio/imu/bmi160/bmi160_core.c
>> index b8a290e..97928d5 100644
>> --- a/drivers/iio/imu/bmi160/bmi160_core.c
>> +++ b/drivers/iio/imu/bmi160/bmi160_core.c
>> @@ -20,6 +20,7 @@
>>  #include <linux/iio/triggered_buffer.h>
>>  #include <linux/iio/trigger_consumer.h>
>>  #include <linux/iio/buffer.h>
>> +#include <linux/iio/sysfs.h>
>>  
>>  #include "bmi160.h"
>>  
>> @@ -466,10 +467,36 @@ static int bmi160_write_raw(struct iio_dev *indio_dev,
>>  	return 0;
>>  }
>>  
>> +static
>> +IIO_CONST_ATTR(in_accel_sampling_frequency_available,
>> +	       "0.78125 1.5625 3.125 6.25 12.5 25 50 100 200 400 800 1600");
>> +static
>> +IIO_CONST_ATTR(in_anglvel_sampling_frequency_available,
>> +	       "25 50 100 200 400 800 1600 3200");
>> +static
>> +IIO_CONST_ATTR(in_accel_scale_available,
>> +	       "0.000598 0.001197 0.002394 0.004788");
>> +static
>> +IIO_CONST_ATTR(in_anglvel_scale_available,
>> +	       "0.001065 0.000532 0.000266 0.000133 0.000066");
>> +
>> +static struct attribute *bmi160_attrs[] = {
>> +	&iio_const_attr_in_accel_sampling_frequency_available.dev_attr.attr,
>> +	&iio_const_attr_in_anglvel_sampling_frequency_available.dev_attr.attr,
>> +	&iio_const_attr_in_accel_scale_available.dev_attr.attr,
>> +	&iio_const_attr_in_anglvel_scale_available.dev_attr.attr,
>> +	NULL,
>> +};
>> +
>> +static const struct attribute_group bmi160_attrs_group = {
>> +	.attrs = bmi160_attrs,
>> +};
>> +
>>  static const struct iio_info bmi160_info = {
>>  	.driver_module = THIS_MODULE,
>>  	.read_raw = bmi160_read_raw,
>>  	.write_raw = bmi160_write_raw,
>> +	.attrs = &bmi160_attrs_group,
>>  };
>>  
>>  static const char *bmi160_match_acpi_device(struct device *dev)
>>
> 
> --
> 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
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-05-04 14:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-29 11:42 [PATCH 0/3] Add available sampling frequency and scale attributes Daniel Baluta
2016-04-29 11:42 ` [PATCH 1/3] iio: bmi160: Fix output data rate for accel Daniel Baluta
2016-05-01 19:00   ` Jonathan Cameron
2016-05-04  9:50     ` Jonathan Cameron
2016-04-29 11:42 ` [PATCH 2/3] iio: bmi160: Fix ODR setting Daniel Baluta
2016-05-04  9:51   ` Jonathan Cameron
2016-04-29 11:42 ` [PATCH 3/3] imu: bmi160: Add avail frequency and scale attributes Daniel Baluta
2016-05-01 19:01   ` Jonathan Cameron
2016-05-04  9:51     ` Jonathan Cameron
2016-05-01 18:57 ` [PATCH 0/3] Add available sampling " Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).