linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Daniel Baluta <daniel.baluta@intel.com>
Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] imu: bmi160: Add avail frequency and scale attributes
Date: Wed, 4 May 2016 10:51:58 +0100	[thread overview]
Message-ID: <0adf3dff-0f1c-3563-c43a-dd56eaef7f29@kernel.org> (raw)
In-Reply-To: <9818bbd9-7f83-570d-77b5-ec50e4b8ef4f@kernel.org>

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
> 


  reply	other threads:[~2016-05-04 14:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-05-01 18:57 ` [PATCH 0/3] Add available sampling " Jonathan Cameron

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=0adf3dff-0f1c-3563-c43a-dd56eaef7f29@kernel.org \
    --to=jic23@kernel.org \
    --cc=daniel.baluta@intel.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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 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).