Question: How do we control sensors directly (bypassing DSPS) through the apps processor on 8x60 ?
Answer: There are two steps to be done for this:
1) Disabling of DSPS: This is done through disabling the parameter "CONFIG_MSM_DSPS" either in the file msm8660-perf_defconfig or the file msm8660_defconfig file. The file is selected depending upon the "KERNEL_DEFCONFIG" configuration specified in the makefile "AndroidBoard.mk" located at /device/qcom/msm8660_surf.
After changing the file above, a clean build must be done.
2) Voting for turning on the voltage regulators S3 and L5: The sensor drivers will need to vote to turn these regulators on. The voting can be handled in /kernel/arch/arm/mach-msm/board-msm8x60.c. For eg: if a BMA150 Linux kernel is being ported, the board file board-msm8x60.c should be modified according to the following patch:
https://www.codeaurora.org/patches/quic/la/PATCH_M8660AAABQNLYA1080_5904_turning_s3_l5_ON_for_sensor_control_20110401.tar.gz
The patch above should be referred to for any modifications.
static struct bma150_platform_data bma150_data = {
.power_on = sensors_ldo_enable,
.power_off = sensors_ldo_disable,
};
static struct i2c_board_info msm_i2c_bma150_info[] = {
{
I2C_BOARD_INFO("bma150", 0x38),
.flags = I2C_CLIENT_WAKE,
.irq = MSM_GPIO_TO_INT(BMA150_GPIO_INT),
.platform_data = &bma150_data,
}
};
Notes: The solution is based on 8x60 FFA sensor design � BMA150 controlled by GSBI12. For different sensor design, a different sensor driver and platform data structure should be created. Similarly, a different i2c_board_info structure should be created.
No comments:
Post a Comment