From: Jonathan Cameron <jic23@kernel.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH v3 3/8] iio: hid-sensors: gyro : Add sensitivity
Date: Tue, 05 Nov 2013 23:05:53 +0000 [thread overview]
Message-ID: <527979D1.9030903@kernel.org> (raw)
In-Reply-To: <1383173333-18618-3-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
> gyro fields, which is most commonly used in currently available
> sensor hubs.
>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Applied
> ---
> drivers/iio/gyro/hid-sensor-gyro-3d.c | 11 +++++++++++
> include/linux/hid-sensor-ids.h | 1 +
> 2 files changed, 12 insertions(+)
>
> diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c
> index 74bbed7..d665ec3 100644
> --- a/drivers/iio/gyro/hid-sensor-gyro-3d.c
> +++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c
> @@ -261,6 +261,17 @@ static int gyro_3d_parse_report(struct platform_device *pdev,
> st->gyro[1].index, st->gyro[1].report_id,
> st->gyro[2].index, st->gyro[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_ANGL_VELOCITY,
> + &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 bd97d60..6473d93 100644
> --- a/include/linux/hid-sensor-ids.h
> +++ b/include/linux/hid-sensor-ids.h
> @@ -34,6 +34,7 @@
>
> /* Gyro 3D: (200076) */
> #define HID_USAGE_SENSOR_GYRO_3D 0x200076
> +#define HID_USAGE_SENSOR_DATA_ANGL_VELOCITY 0x200456
> #define HID_USAGE_SENSOR_ANGL_VELOCITY_X_AXIS 0x200457
> #define HID_USAGE_SENSOR_ANGL_VELOCITY_Y_AXIS 0x200458
> #define HID_USAGE_SENSOR_ANGL_VELOCITY_Z_AXIS 0x200459
>
next prev parent reply other threads:[~2013-11-05 22:04 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
2013-10-30 22:48 ` [PATCH v3 3/8] iio: hid-sensors: gyro : " Srinivas Pandruvada
2013-11-05 23:05 ` Jonathan Cameron [this message]
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=527979D1.9030903@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.