All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH v3 2/8] iio: hid-sensors: accelerometer: Add sensitivity
Date: Tue, 05 Nov 2013 23:04:26 +0000	[thread overview]
Message-ID: <5279797A.8000207@kernel.org> (raw)
In-Reply-To: <1383173333-18618-2-git-send-email-srinivas.pandruvada@linux.intel.com>

On 10/30/13 22:48, Srinivas Pandruvada wrote:
> A number of Properties that can be applied to Data Fields are per data
> field basis or for all data fields. Adding sensitivity field for all
> accelerometer fields, which is most commonly used in currently
> available sensor hubs.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
The defines needed for this bled into patch 6.  Please build test you individual
patches to makes sure they can be bisected.

Anyhow fixed that up and applied to the togreg branch of iio.git

> ---
>  drivers/iio/accel/hid-sensor-accel-3d.c | 12 ++++++++++++
>  include/linux/hid-sensor-ids.h          |  1 +
>  2 files changed, 13 insertions(+)
> 
> diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
> index 7fbe136..b89ba92 100644
> --- a/drivers/iio/accel/hid-sensor-accel-3d.c
> +++ b/drivers/iio/accel/hid-sensor-accel-3d.c
> @@ -261,6 +261,18 @@ static int accel_3d_parse_report(struct platform_device *pdev,
>  			st->accel[1].index, st->accel[1].report_id,
>  			st->accel[2].index, st->accel[2].report_id);
>  
> +	/* Set Sensitivity field ids, when there is no individual modifier */
> +	if (st->common_attributes.sensitivity.index < 0) {
> +		sensor_hub_input_get_attribute_info(hsdev,
> +			HID_FEATURE_REPORT, usage_id,
> +			HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS |
> +			HID_USAGE_SENSOR_DATA_ACCELERATION,
> +			&st->common_attributes.sensitivity);
> +		dev_dbg(&pdev->dev, "Sensitivity index:report %d:%d\n",
> +			st->common_attributes.sensitivity.index,
> +			st->common_attributes.sensitivity.report_id);
> +	}
> +
>  	return ret;
>  }
>  
> diff --git a/include/linux/hid-sensor-ids.h b/include/linux/hid-sensor-ids.h
> index 8323775..bd97d60 100644
> --- a/include/linux/hid-sensor-ids.h
> +++ b/include/linux/hid-sensor-ids.h
> @@ -23,6 +23,7 @@
>  
>  /* Accel 3D (200073) */
>  #define HID_USAGE_SENSOR_ACCEL_3D				0x200073
> +#define HID_USAGE_SENSOR_DATA_ACCELERATION			0x200452
>  #define HID_USAGE_SENSOR_ACCEL_X_AXIS				0x200453
>  #define HID_USAGE_SENSOR_ACCEL_Y_AXIS				0x200454
>  #define HID_USAGE_SENSOR_ACCEL_Z_AXIS				0x200455
> 

  reply	other threads:[~2013-11-05 22:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30 22:48 [PATCH v3 1/8] iio: hid_Sensors: fix crash during trigger unregister Srinivas Pandruvada
2013-10-30 22:48 ` [PATCH v3 2/8] iio: hid-sensors: accelerometer: Add sensitivity Srinivas Pandruvada
2013-11-05 23:04   ` Jonathan Cameron [this message]
2013-10-30 22:48 ` [PATCH v3 3/8] iio: hid-sensors: gyro : " Srinivas Pandruvada
2013-11-05 23:05   ` Jonathan Cameron
2013-10-30 22:48 ` [PATCH v3 4/8] iio: hid-sensors: light/als " Srinivas Pandruvada
2013-10-30 22:48 ` [PATCH v3 5/8] iio: hid-sensors: magnetometer " Srinivas Pandruvada
2013-11-05 23:06   ` Jonathan Cameron
2013-10-30 22:48 ` [PATCH v3 6/8] iio: hid-sensors: Added Inclinometer 3D Srinivas Pandruvada
2013-10-30 22:48 ` [PATCH v3 7/8] iio: Add quaternion channel Srinivas Pandruvada
2013-11-05 23:10   ` Jonathan Cameron
2013-11-06  0:10     ` Srinivas Pandruvada
2013-11-06  7:58       ` Jonathan Cameron
2013-12-06 22:44         ` Srinivas Pandruvada
2013-12-07 19:49           ` Jonathan Cameron
2013-10-30 22:48 ` [PATCH v3 8/8] iio: hid-sensors: Added device rotation support Srinivas Pandruvada
2013-11-05 22:56 ` [PATCH v3 1/8] iio: hid_Sensors: fix crash during trigger unregister 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=5279797A.8000207@kernel.org \
    --to=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    /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.