Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1183952

Re: [PATCH 3/3] iio: magnetometer: mmc35240: fix SET/RESET sequence

From Jonathan Cameron <jic23@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3] iio: magnetometer: mmc35240: fix SET/RESET sequence
Date 2015-07-14 22:10 +0200
Message-ID <pMeGC-2db-17@gated-at.bofh.it> (permalink)
References <pM9QC-3qE-1@gated-at.bofh.it> <pM9QC-3qE-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 14 July 2015 15:56:54 BST, Daniel Baluta <daniel.baluta@intel.com> wrote:
>From: Viorel Suman <viorel.suman@intel.com>
>
>The RESET operation invoked in the last instance will align
>in the natural way all 3 axis and the chip top view.
What is the result of the bug?
Just trying to assess urgency of the patch!
>
>Signed-off-by: Viorel Suman <viorel.suman@intel.com>
>Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
>---
> drivers/iio/magnetometer/mmc35240.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/iio/magnetometer/mmc35240.c
>b/drivers/iio/magnetometer/mmc35240.c
>index f4d7495..a53efd2 100644
>--- a/drivers/iio/magnetometer/mmc35240.c
>+++ b/drivers/iio/magnetometer/mmc35240.c
>@@ -215,14 +215,15 @@ static int mmc35240_init(struct mmc35240_data
>*data)
> 
> 	/*
> 	 * make sure we restore sensor characteristics, by doing
>-	 * a RESET/SET sequence
>+	 * a SET/RESET sequence, the axis polarity being naturally
>+	 * aligned after RESET
> 	 */
>-	ret = mmc35240_hw_set(data, false);
>+	ret = mmc35240_hw_set(data, true);
> 	if (ret < 0)
> 		return ret;
> 	usleep_range(MMC53240_WAIT_SET_RESET, MMC53240_WAIT_SET_RESET + 1);
> 
>-	ret = mmc35240_hw_set(data, true);
>+	ret = mmc35240_hw_set(data, false);
> 	if (ret < 0)
> 		return ret;
> 

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] MMC35240 magneto fixes Daniel Baluta <daniel.baluta@intel.com> - 2015-07-14 17:00 +0200
  [PATCH 3/3] iio: magnetometer: mmc35240: fix SET/RESET sequence Daniel Baluta <daniel.baluta@intel.com> - 2015-07-14 17:00 +0200
    Re: [PATCH 3/3] iio: magnetometer: mmc35240: fix SET/RESET sequence Jonathan Cameron <jic23@kernel.org> - 2015-07-14 22:10 +0200
      Re: [PATCH 3/3] iio: magnetometer: mmc35240: fix SET/RESET sequence Jonathan Cameron <jic23@kernel.org> - 2015-07-19 13:00 +0200
  [PATCH 1/3] iio: magnetometer: mmc35240: Fix crash in pm suspend Daniel Baluta <daniel.baluta@intel.com> - 2015-07-14 17:00 +0200
    Re: [PATCH 1/3] iio: magnetometer: mmc35240: Fix crash in pm suspend Jonathan Cameron <jic23@kernel.org> - 2015-07-19 12:50 +0200
  [PATCH 2/3] iio: magnetometer: mmc35240: Fix SET/RESET mask Daniel Baluta <daniel.baluta@intel.com> - 2015-07-14 17:00 +0200
    Re: [PATCH 2/3] iio: magnetometer: mmc35240: Fix SET/RESET mask Jonathan Cameron <jic23@kernel.org> - 2015-07-19 13:00 +0200

csiph-web