DASH: Bring up-to-date with sonyxperiadev repo

Patchset 2: logic update for AOSP

dash: wrapper: change NO_RATE to -1

0xffffffff as NO_RATE for 64bit rate is not good.
so fix it.

Signed-off-by: neil gao <neil.gao@sonymobile.com>
Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

dash: wrapper: Add error handling

add error handling in init function.

Signed-off-by: neil gao <neil.gao@sonyericsson.com>
Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

bma250: adjust mindelay to 5ms.

Signed-off-by: Hisakazu Furuie <hisakazu.x.furuie@sonymobile.com>
Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

sensors: bma250na_input: change of the calculation point.

When read function returns negative value,
the value was changed into a positive number by calculation.
We change the position of the division to solve this problem.

Signed-off-by: chikaharu gonnokami <chikaharu.x.gonnokami@sonyericsson.com>
Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

sensors: lsm33dlhx_acc: Irq mode not used

Signed-off-by: Stefan Karlsson <stefan3.karlsson@sonymobile.com>
Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

sensors: apds970x: Add flag to call only once for proximity sensor

Threshold and number of burst are changed dynamically
for simulating hysteresis, but after it is deactivated
during detection, the changed values are kept
and are treated as default in the next time.
So add initialization flag and
let default values not be updated anymore.

Signed-off-by: chikaharu gonnokami <chikaharu.x.gonnokami@sonyericsson.com>
Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

sensors: apds970x: remove delay function in dash

When a big value is set in this delay processing point,
handling of whole dash is delayed.
This processing is deleted to revise the problem.

Signed-off-by: chikaharu gonnokami <chikaharu.x.gonnokami@sonymobile.com>
Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

apds970x: Change timing of getting parameter from proximity sensor driver

Currently, sensor HAL gets parameter defined in board file if the
initialization runs before loading product specific configuration
on boot sequence.
So need to move the timing of getting parameters to activate function.

Signed-off-by: Tadashi,Kubo <tadashi.kubo@sonyericsson.com>
Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

sharp_gp2: remove deprecated scheduler_subscriber

Change-Id: I0404ed89c6727513c15a66b1be73d20566cdd71f
Category: development

Add sensors_input_cache for caching input devices

The input cache will keep a list of input devices for swift lookup of
device names. It also includes some optimizations for startup time.

This code was moved to its own file from sensor_util.

Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

Add sensors_sysfs for generic sysfs handling

Many sensor user-space drivers needs to update sysfs parameter for
their underlaying kernel driver. This patch adds a generic handler
for sysfs parameters.

Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

Adapt some sensor to use the new sysfs helper module

	modified:   sensors/bma250_input.c
	modified:   sensors/bma250na_input.c
	modified:   sensors/bmp180_input.c
	modified:   sensors/lps331ap_input.c

Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

apds970x: support EV_MSC input events

Need to support both EV_ABS and EV_MSC

Signed-off-by: Aleksej Makarov <aleksej.makarov@sonymobile.com>
Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

apds970x: enable wakelocks

Since kernel 3.4 no timed wake-lock is used on
input events by default, needs to be enabled via
ioctl.

Signed-off-by: Aleksej Makarov <aleksej.makarov@sonymobile.com>
Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

sensors: apds970x: don't overwrite Nburst setting

Sensors HAL should not overwrite Nburst setting which
can be device/product specific or even pre-calibrated
value

Signed-off-by: Aleksej Makarov <aleksej.makarov@sonymobile.com>
Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

Fixed compile errors

Some LOGx needed renaming to ALOGx and a semi-colon was missing.

	modified:   sensors/apds970x.c
	modified:   sensors/bma250_input.c
	modified:   sensors_input_cache.c
	modified:   sensors_sysfs.c

Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

sensor_util: remove obsolete open_input_dev_by_name_store_nr

The function open_input_dev_by_name_store_nr() is obsoleted by the
sysfs handler. All references has been removed:

	modified:   sensors/bma250_input.c
	modified:   sensors/bma250na_input.c
	modified:   sensors/bmp180_input.c
	modified:   sensors/lps331ap_input.c
	modified:   sensors/sensor_util.c
	modified:   sensors/sensor_util.h

Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

sensors_wrapper: move NO_RATE to header file

Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

Add AKM8972 compass support

This patch adds a user-space driver for AKM8972 and AKM8975
compass sensors. The fusion library is replaced with a dummy
implementation.

Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

Conflicts:

	sensors/Sensors.mk

Change-Id: Ia3e9ff2dccd0059fa00ff68d9c1cb08a788fd9aa

Add mpu3050 triple axis gyroscope support

This patch adds a user-space driver for the MPU3050 gyroscope.
The fusion library is replaced with a dummy implementation.

Change-Id: Ib83a14d4fa6a8c18754befd323fd3ce826d991d7
Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>

Fix sensors_worker for big delays.

This patch fixes sensors_worker for delays greater than or equal to one
second.

Signed-off-by: David Frey <david.frey@sensirion.com>

Change-Id: I317dc03fe0a2ff42e4bb962230fd95675610e189
DASH: bma150 & bma250: adjust mindelay to 5ms

Fix accelerometer lag on all Xperia 2011 devices.

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I4cc9ada39b87adc4a109cb179be8e47a416d79df