Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72dc9238 authored by Daqing Chen's avatar Daqing Chen
Browse files

input: sensors: fix akm8963 sensor check status



When akm8963 report data is read, fix the checking of the hardware
status. Now it is just checking the hardware status is overflow or not.

Change-Id: I41f4d400379c85e21b28529fb3469a6a9a9d19e3
CRs-Fixed: 725779
Signed-off-by: default avatarDaqing Chen <chendaqing@codeaurora.org>
parent 6ef179b1
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -48,10 +48,7 @@
#define AKM8963_VDD_MAX_UV	3300000
#define AKM8963_VIO_MIN_UV	1750000
#define AKM8963_VIO_MAX_UV	1950000
#define STATUS_ERROR(st)	(((st) & (AKM8963_ST1_DRDY | \
				AKM8963_ST1_DOR  | \
				AKM8963_ST2_HOLF)) \
				!= AKM8963_ST1_DRDY)
#define STATUS_ERROR(st)	(((st)&0x08) != 0x0)
#define REG_CNTL1_MODE(reg_cntl1)	(reg_cntl1 & 0x0F)

/* Save last device state for power down */
@@ -1753,7 +1750,7 @@ static void akm_dev_poll(struct work_struct *work)
		goto exit;
	}

	tmp = 0xFF & (dat_buf[7] + dat_buf[0]);
	tmp = 0xF & (dat_buf[7] + dat_buf[0]);
	if (STATUS_ERROR(tmp)) {
		dev_warn(&akm->i2c->dev, "Status error(0x%x). Reset...\n",
				tmp);