Skip to contentSkip to conversation

iio: magn: add a driver for AK8974

PATCH Sebastian Reichel 2 participants 3 messages Jul 20, 2016 – Jul 22, 2016 IIO

lore
Share & tools
lore

Sebastian Reichel

author Tested-by
#0 lore raw

Hi,

Quoted 10 lines

This adds a driver for the Asahi Kasei AK8975 and its sibling AMI305 magnetometers. It was deployed on scale in 2009 on a multitude of devices. It is distincly different from AK8973 and AK8975 and needs its own driver.

This patch is based on the long lost work of Samu Onkalo at Nokia, who made a misc character device driver for the Maemo/MeeGo Nokia devices, before the time of the IIO subsystem. It was mounted in e.g. the Nokia N950, N8, N86, N97 etc. It is also mounted on the ST-Ericsson HREF reference designs.

Do you have plans to take over the axis rotation support from Samu Onkalo's driver? The Nokia vendor kernel had Y and Z axis inverted. Below is what N950 readings look like:

n950# cat in_magn_[xyz]_raw
154
-9
-65

P.S.: Sorry for missing Reply-To. I was not subscribed to linux-iio until now.

-- Sebastian

#1 lore raw
Quoted 2 lines · Sebastian Reichel

Thanks! If you have hints on how to scale the raw values to Gauss, please help. (Been looking at the Mer sensorfw repo to no avail...)

What userspace do you use on this device?

Quoted 3 lines

Do you have plans to take over the axis rotation support from Samu Onkalo's driver? The Nokia vendor kernel had Y and Z axis inverted.

Oh I didn't think of adding that. IIO has a standard rotation matrix lib and binding, used in e.g. AK8975. I'll add it and resend.

Yours,
Linus Walleij

#2 lore raw

Hi,

Quoted 7 lines · Linus Walleij
Quoted 2 lines · Sebastian Reichel

Thanks! If you have hints on how to scale the raw values to Gauss, please help. (Been looking at the Mer sensorfw repo to no avail...)

Sorry, I don't have any hints.

Quoted 1 line

What userspace do you use on this device?

I have Debian on the emmc (it's not yet ready for daily use). Mainline status of N950 is documented here:
http://elinux.org/N950

Quoted 7 lines
Quoted 3 lines

Do you have plans to take over the axis rotation support from Samu Onkalo's driver? The Nokia vendor kernel had Y and Z axis inverted.

Oh I didn't think of adding that. IIO has a standard rotation matrix lib and binding, used in e.g. AK8975. I'll add it and resend.

Thanks.

-- Sebastian