linux-iio.vger.kernel.org archive mirror
 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 5/8] iio: hid-sensors: magnetometer : Add sensitivity
Date: Tue, 05 Nov 2013 23:06:43 +0000	[thread overview]
Message-ID: <52797A03.2020309@kernel.org> (raw)
In-Reply-To: <1383173333-18618-5-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
> magnetometer fields, which is most commonly used in currently available
> sensor hubs.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
This is dependent on defines that don't exist. I'm guessing they are later
in the series, so please fix this up.

Jonathan
> ---
>  drivers/iio/magnetometer/hid-sensor-magn-3d.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
> index ff7b9da..db9f27b 100644
> --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c
> +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
> @@ -262,6 +262,18 @@ static int magn_3d_parse_report(struct platform_device *pdev,
>  			st->magn[1].index, st->magn[1].report_id,
>  			st->magn[2].index, st->magn[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_ORIENTATION,
> +			&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;
>  }
>  
> 

  reply	other threads:[~2013-11-05 22:05 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
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 [this message]
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=52797A03.2020309@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 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).