Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2ce589e authored by Oliver Wang's avatar Oliver Wang Committed by Bingzhe Cai
Browse files

input: sensors: add board specific configurations for mmc3416x



Add board specific configurations to MEMSIC mmc3416x magnetic
field sensor driver to make it compatible with current kernel and
HAL architecture.

CRs-fixed: 652454
Change-Id: I390fa35f4185e94c00de497e951de6ace0034fac
Signed-off-by: default avatarOliver Wang <mengmeng@codeaurora.org>
parent 792ce78d
Loading
Loading
Loading
Loading
+58 −0
Original line number Diff line number Diff line
MEMSIC MMC3416x 3-axis magnetic sensor

The MEMSIC 3-axis magnetic sensor is a complete 3-axis magnetic sensor with
on-chip signal processing and intergrated i2c bus. It can be connected to host
processor via i2c. It can measure magnetic fields within the full scale range
from -16 Gauss to +16 Gauss.

Required properties:

 - compatible		: Should be "memsic,mmc3416x".
 - reg			: i2c address of the device.
 - vdd-supply		: Analog power supply needed to power up the device.
 - vio-supply		: Digital IO power supply needed for IO and I2C.
 - memsic,dir		: String value of the direction of the ecompass sensor
	chip. There are 8 patterns of direction:


       x > 0 /___________o
               /        /|
              /        / |* 1st pin is here
             /________/ /|
             |_______/|/ |/ z > 0
                    /
                  |/ y > 0


		The above graph shows the coordinate of the sensor chip. Specify the
		following string to memsic,dir to convert it into Android coordinate.
		Note the definition of sensor placement on target board is relative to
		Android portrait mode.

						left	right	up	down
		obverse-x-axis-forward	Y+	Y-	X+	X-
		obverse-x-axis-rightward	X-	X+	Y+	Y-
		obverse-x-axis-backward	Y-	Y+	X-	X+
		obverse-x-axis-leftward	X+	X-	Y-	Y+
		reverse-x-axis-forward	Y-	Y+	X+	X-
		reverse-x-axis-rightward	X-	X+	Y-	Y+
		reverse-x-axis-backward	Y+	Y-	X-	X+
		reverse-x-axis-leftward	X+	X-	Y+	Y-

Optional properites:

 - memsic,auto-report	: Boolean value to indicate if enable auto-report mode.

 Example:
	A chip on 8916 platform with the pattern as the above graph:
	&i2c_0 { /* BLSP1 QUP2 */
		memsic@30 {
				compatible = "memsic,mmc3416x";
				reg = <0x30>;
				vdd-supply = <&pm8916_l17>;
				vio-supply = <&pm8916_l6>;
				memsic,dir = "obverse-x-axis-forward";
				memsic,auto-report;
		};
	};
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ linux Linux-specific binding
kionix	Kionix Inc.
marvell	Marvell Technology Group Ltd.
maxim	Maxim Integrated Products
memsic	MEMSIC, Inc
mosaixtech	Mosaix Technologies, Inc.
national	National Semiconductor
nintendo	Nintendo
+500 −475

File changed.

Preview size limit exceeded, changes collapsed.