Skip to content

Commit

Permalink
staging: iio: ak8975: Add ak8975 magnetometer sensor
Browse files Browse the repository at this point in the history
This is for the Asahi Kasei AK8975 3-axis magnetometer.  It resides within
the magnetometer section of the IIO subsystem, and implements the raw
magn_x,y,z_raw attributes, as well as magn_x,y,z_scale attributes for
converting to Gauss.

Changed to use the magn_x,y,z_scale attributes, and made those attributes
give the scale factor to conert to Gauss.  Also applied more fixes from
feedback.

Keeping mode as an unsigned long.  I'm going to add proper power management
at some point anyway, which would deprecate this attribute.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Andrew Chew authored and Greg Kroah-Hartman committed Sep 14, 2010
1 parent 7223234 commit 3285aae
Show file tree
Hide file tree
Showing 3 changed files with 569 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/staging/iio/magnetometer/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
#
comment "Magnetometer sensors"

config SENSORS_AK8975
tristate "Asahi Kasei AK8975 3-Axis Magnetometer"
depends on I2C
help
Say yes here to build support for Asahi Kasei AK8975 3-Axis
Magnetometer.

To compile this driver as a module, choose M here: the module
will be called ak8975.

config SENSORS_HMC5843
tristate "Honeywell HMC5843 3-Axis Magnetometer"
depends on I2C
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/iio/magnetometer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
# Makefile for industrial I/O Magnetometer sensors
#

obj-$(CONFIG_SENSORS_AK8975) += ak8975.o
obj-$(CONFIG_SENSORS_HMC5843) += hmc5843.o
Loading

0 comments on commit 3285aae

Please sign in to comment.