Skip to content

Commit

Permalink
iio: ak8975: Add AK8975C device id
Browse files Browse the repository at this point in the history
Signed-off-by: David Heidelberg <[email protected]>
  • Loading branch information
Decatf authored and okias committed Feb 23, 2021
1 parent c60c8db commit 8eefd5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/iio/magnetometer/ak8975.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
*/
#define AK8975_REG_WIA 0x00
#define AK8975_DEVICE_ID 0x48
#define AK8975C_DEVICE_ID 0x7F

#define AK8975_REG_INFO 0x01

Expand Down Expand Up @@ -437,7 +438,7 @@ static int ak8975_who_i_am(struct i2c_client *client,
return ret;
}

if (wia_val[0] != AK8975_DEVICE_ID)
if (wia_val[0] != AK8975_DEVICE_ID && wia_val[0] != AK8975C_DEVICE_ID)
return -ENODEV;

switch (type) {
Expand Down

0 comments on commit 8eefd5b

Please sign in to comment.