MLK-11468 input: mma8450: evbug module will keep print message.
authorFugang Duan <b38611@freescale.com>
Tue, 1 Sep 2015 03:11:27 +0000 (11:11 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:48:18 +0000 (14:48 -0500)
commitd14a049cde0f550d2cb13cba8635b0853ea5c41d
tree988e68054c7f982dee49f3f2989aa0c508e0ede3
parent2b60951c71e924268449807388f2c48117b81993
MLK-11468 input: mma8450: evbug module will keep print message.

evbug will open the mma8450 on i.MX6SL_EVK and mma8450 will work in 2G mode by default.
That is the reason why mma8450 logs will be printed out. The main changes is below:

 * Remove the open(), close() hook out of the drivers. The open() and close()
   hook in input framwork is defined as void type. It isn't strictly safe in
   logic when some error happends. So remove them out.
 * Modify the mma8450 to standby mode by default. It will be more power saving
   and there would be no log printing out after booting up.
 * Provide the sys interface to modify the mma8450 work modes. Then the higher
   layer can modify the the mma8450 work mode via the interface. It would be
   much safer.There would be a sclaemode interface in the folder of
   /sys/devices/soc0/soc.1/2100000.aips-bus/21a0000.i2c/i2c-0/0-001c/scalemode
   User can use cat to read the current scalemode and echo to write. The mode
   is defined as: MODE_STANDBY: 0  MODE_2G:1  MODE_4G:2  MODE_8G:3
 * Add mutex to protect and some error handling.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit c51a786078fd569ce95eb6dcf09c76d1b3c0f172)
drivers/input/misc/mma8450.c