Skip to content
Commit 1c7be4c2 authored by Cristina Moraru's avatar Cristina Moraru Committed by Jonathan Cameron
Browse files

iio: hmc5843: Add attributes for measurement config of bias current



Change static attribute meas_conf for bias current configuration
to channel attribute in_magn_meas_conf and also add
in_magn_meas_conf_available attribute to view available configurations.

This patch solves functionality bug: driver was using same function
hmc5843_set_measurement_configuration for setting bias current config
for all device types but the function was returning -EINVAL for any
setting >= 0x03 although, for sensor HMC5983, value 3 is valid.

API for setting bias measurement configuration:

normal - 	Normal measurement configuration (default):
		In normal measurement configuration the device
		follows normal measurement flow. Pins BP and BN
		are left floating and high impedance.

positivebias - 	Positive bias configuration: In positive bias
		configuration, a positive current is forced across
		the resistive load on pins BP and BN.

negativebias - 	Negative bias configuration. In negative bias
		configuration, a negative current is forced across
		the resistive load on pins BP and BN.

disabled     - 	Only available on HMC5983. Magnetic sensor is disabled.
		Temperature sensor is enabled.

Signed-off-by: default avatarCristina Moraru <cristina.moraru09@gmail.com>
Cc: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 0d43b346
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment