blob: 8b6e345dae7a9b155c709db8747a8255e721955e [file] [log] [blame]
Nest Magwheel
=============
The magwheel driver outputs the changing position of the Nest dial/wheel by
reading the direction of the magnetic field from a magnetic strip
with repeating North/South poles.
Required Properties:
-------------------
- compatible: "nestlabs,vf610-adc-magwheel";
- vref-supply: The regulator supply ADC refrence voltage.
- reg: Offset and length of the register set for the device
- interrupts: Should contain the interrupt for the device
- nestlabs,adc-channels-used: List of two channels used from an ADC that are
connected to the two outputs of the hall effect sensor.
- nestlabs,adc-channel-midpoints = (See Below)
adc-channels-midpoints must be physically tested to find the middle ADC value
for the two channels (halfway between the max and min).
I believe that if the magnetic strip is the same and the sensor
is the same, then these two values will be the same enough to be ok.
A small bit off will be ok. What will happen is that the North to South
part of the strip might move more/less then the South to North part.
But if this difference is small it won't be noticeable.
The reason that the two midpoints aren't the same is because the two sensors
are at different distances from the magnetic strip.
Example:
magwheel: adc@02280000 {
compatible = "nestlabs,vf610-adc-magwheel";
vref-supply = <&vgen6_reg>;
reg = <0x02280000 0x4000>;
interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
nestlabs,adc-channels-used = <1 2>;
nestlabs,adc-channel-midpoints = <1965 2038>;
status = "okay";
};