diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/als_notify.h | 36 | ||||
| -rw-r--r-- | include/linux/iio/m4sensorhub/m4sensorhub_fusion.h | 4 | ||||
| -rw-r--r-- | include/linux/iio/m4sensorhub/m4sensorhub_pedometer.h | 1 | ||||
| -rw-r--r-- | include/linux/ipv6.h | 1 | ||||
| -rw-r--r-- | include/linux/m4sensorhub.h | 7 | ||||
| -rw-r--r-- | include/linux/m4sensorhub/MemMapLog.h | 111 | ||||
| -rw-r--r-- | include/linux/m4sensorhub/m4sensorhub_reg_enum.h | 8 | ||||
| -rw-r--r-- | include/linux/power/max17042_battery.h | 3 |
8 files changed, 114 insertions, 57 deletions
diff --git a/include/linux/als_notify.h b/include/linux/als_notify.h new file mode 100644 index 00000000000..1c35ca54727 --- /dev/null +++ b/include/linux/als_notify.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2014 Motorola Mobility LLC. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef ALS_NOTIFY_H +#define ALS_NOTIFY_H + +#ifdef __KERNEL__ + +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif + +enum als_state { + ALS_ENABLED = (UINT16_MAX + 1), + ALS_DISABLED +}; + +extern void als_register_notify(struct notifier_block *nb); +extern void als_unregister_notify(struct notifier_block *nb); +extern void als_notify_subscriber(unsigned long event); +#endif /* __KERNEL__ */ + +#endif /* ALS_NOTIFY_H */ diff --git a/include/linux/iio/m4sensorhub/m4sensorhub_fusion.h b/include/linux/iio/m4sensorhub/m4sensorhub_fusion.h index 57680018826..6748393e0e5 100644 --- a/include/linux/iio/m4sensorhub/m4sensorhub_fusion.h +++ b/include/linux/iio/m4sensorhub/m4sensorhub_fusion.h @@ -26,6 +26,9 @@ enum m4sensorhub_fusion_iio_type { FUSION_TYPE_ROTATION = 0, FUSION_TYPE_ORIENTATION = 1, + FUSION_TYPE_GRAVITY = 2, + FUSION_TYPE_LINEAR_ACCELERATION = 3, + M4FUS_NUM_FUSION_BUFFERS }; struct m4sensorhub_fusion_iio_data { @@ -38,6 +41,5 @@ struct m4sensorhub_fusion_iio_data { #define M4FUS_DATA_STRUCT_SIZE_BITS \ (sizeof(struct m4sensorhub_fusion_iio_data) * 8) -#define M4FUS_NUM_FUSION_BUFFERS 2 #endif /* _M4SENSORHUB_FUSION_IIO_H */ diff --git a/include/linux/iio/m4sensorhub/m4sensorhub_pedometer.h b/include/linux/iio/m4sensorhub/m4sensorhub_pedometer.h index 2e4d6cd9bec..28af1e76359 100644 --- a/include/linux/iio/m4sensorhub/m4sensorhub_pedometer.h +++ b/include/linux/iio/m4sensorhub/m4sensorhub_pedometer.h @@ -30,6 +30,7 @@ struct m4sensorhub_pedometer_iio_data { uint16_t current_speed; uint32_t healthy_minutes; uint32_t calories; + uint32_t calories_normr; long long timestamp; } __packed; diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 850e95bc766..867833ba6bd 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -36,6 +36,7 @@ struct ipv6_devconf { __s32 accept_ra_rt_info_max_plen; #endif #endif + __s32 accept_ra_rt_table; __s32 proxy_ndp; __s32 accept_source_route; #ifdef CONFIG_IPV6_OPTIMISTIC_DAD diff --git a/include/linux/m4sensorhub.h b/include/linux/m4sensorhub.h index 5bc54f0885b..5eb2ec0586f 100644 --- a/include/linux/m4sensorhub.h +++ b/include/linux/m4sensorhub.h @@ -73,6 +73,7 @@ enum m4sensorhub_panichdl_index { PANICHDL_ALS_RESTORE, PANICHDL_MPU9150_RESTORE, PANICHDL_PEDOMETER_RESTORE, + PANICHDL_EXTERN_RESTORE, /* * Please add enum before PANICHDL_IRQ_RESTORE * to make sure IRQ restore will be called last. @@ -241,5 +242,11 @@ bool m4sensorhub_preflash_callbacks_exist(void); /* For FW flash core */ int m4sensorhub_irq_disable_all(struct m4sensorhub_data *m4sensorhub); +/* External System Calls for Non-M4 Drivers */ +int m4sensorhub_extern_init(struct m4sensorhub_data *m4); /* Init for core */ +int m4sensorhub_extern_set_audio_status(uint8_t status); +int m4sensorhub_extern_set_display_status(uint8_t status); +int m4sensorhub_get_current_mode(void); + #endif /* __KERNEL__ */ #endif /* __M4SENSORHUB_H__ */ diff --git a/include/linux/m4sensorhub/MemMapLog.h b/include/linux/m4sensorhub/MemMapLog.h index 9aab2f4cea8..2b7882a4df4 100644 --- a/include/linux/m4sensorhub/MemMapLog.h +++ b/include/linux/m4sensorhub/MemMapLog.h @@ -1,53 +1,58 @@ -/**********************************************************************
-*
-* Copyright (C) 2012 Motorola, Inc.
-*
-**********************************************************************
-File : MemMapLog.h
-Purpose :
-**********************************************************************/
-#ifndef __MEMMAP_LOG_H__
-#define __MEMMAP_LOG_H__
-/****************************** Defines *******************************/
-struct memMapLog
-{
- u64 logEnable;
- u8 isLogImmediate;
-};
-
-#define LOG_MAX 24
-#define LOG_LEVELS_MAX 4
-
-static char acLogTags[LOG_MAX][40] = {
- "LOG_GENERAL",
- "LOG_TIMER",
- "LOG_ACCEL",
- "LOG_TEMPERATURE",
- "LOG_PRESSURE",
- "LOG_PEDOMETER",
- "LOG_TCMD",
- "LOG_GYRO",
- "LOG_COMPASS",
- "LOG_FUSION",
- "LOG_METS",
- "LOG_GESTURE",
- "LOG_POWER",
- "LOG_CORRELATION",
- "LOG_GPS",
- "LOG_DL",
- "LOG_AUDIO",
- "LOG_DISP",
- "LOG_WRIST",
- "LOG_PASSIVE",
- "LOG_EMG"
- "LOG_HR",
- "LOG_ALS"
-};
-
-static char acLogLevels[LOG_LEVELS_MAX][15] = {
- "LOG_DISABLE",
- "LOG_ERROR",
- "LOG_VERBOSE",
- "LOG_DEBUG"
-};
-#endif /* __MEMMAP_LOG_H__ */
+/********************************************************************** +* +* Copyright (C) 2012 Motorola, Inc. +* +********************************************************************** +File : MemMapLog.h +Purpose : +**********************************************************************/ +#ifndef __MEMMAP_LOG_H__ +#define __MEMMAP_LOG_H__ +/****************************** Defines *******************************/ +#define LOG_EN_SIZE 2 +/* Number of log tags per element of logenable array */ +#define LOG_TAGS_PER_ENABLE 16 +#define LOG_MAX 23 +#define LOG_NO_OF_BITS_PER_TAG 2 +/*This is set to 0x03 since each logtag uses 2 bits in logenable */ +#define LOG_TAG_MASK 0x03 +#define LOG_LEVELS_MAX 4 + +struct memMapLog { + u32 logEnable[LOG_EN_SIZE]; + u8 isLogImmediate; +}; + +static char acLogTags[LOG_MAX][40] = { + "LOG_GENERAL", + "LOG_TIMER", + "LOG_ACCEL", + "LOG_TEMPERATURE", + "LOG_PRESSURE", + "LOG_PEDOMETER", + "LOG_TCMD", + "LOG_GYRO", + "LOG_COMPASS", + "LOG_FUSION", + "LOG_METS", + "LOG_GESTURE", + "LOG_POWER", + "LOG_CORRELATION", + "LOG_GPS", + "LOG_DL", + "LOG_AUDIO", + "LOG_DISP", + "LOG_WRIST", + "LOG_PASSIVE", + "LOG_EMG", + "LOG_HR", + "LOG_ALS", +}; + +static char acLogLevels[LOG_LEVELS_MAX][15] = { + "LOG_DISABLE", + "LOG_ERROR", + "LOG_VERBOSE", + "LOG_DEBUG" +}; +#endif /* __MEMMAP_LOG_H__ */ diff --git a/include/linux/m4sensorhub/m4sensorhub_reg_enum.h b/include/linux/m4sensorhub/m4sensorhub_reg_enum.h index 040df03a2ed..1399e104cc5 100644 --- a/include/linux/m4sensorhub/m4sensorhub_reg_enum.h +++ b/include/linux/m4sensorhub/m4sensorhub_reg_enum.h @@ -81,9 +81,9 @@ enum m4sensorhub_reg { M4SH_REG_FUSION_LOCALX, M4SH_REG_FUSION_LOCALY, M4SH_REG_FUSION_LOCALZ, - M4SH_REG_FUSION_WORLDX, - M4SH_REG_FUSION_WORLDY, - M4SH_REG_FUSION_WORLDZ, + M4SH_REG_FUSION_GRAVITYX, + M4SH_REG_FUSION_GRAVITYY, + M4SH_REG_FUSION_GRAVITYZ, M4SH_REG_FUSION_ROTATIONVECTOR, M4SH_REG_FUSION_HEADING, M4SH_REG_FUSION_HEADING_ACCURACY, @@ -106,6 +106,8 @@ enum m4sensorhub_reg { M4SH_REG_METS_METS, M4SH_REG_METS_CALORIES, M4SH_REG_METS_HEALTHYMINUTES, + M4SH_REG_METS_METS_NO_RMR, + M4SH_REG_METS_CALORIES_NO_RMR, M4SH_REG_USERSETTINGS_SCREENSTATUS, M4SH_REG_USERSETTINGS_USERAGE, M4SH_REG_USERSETTINGS_USERGENDER, diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h index 77542380c52..d3214b54fd2 100644 --- a/include/linux/power/max17042_battery.h +++ b/include/linux/power/max17042_battery.h @@ -120,6 +120,7 @@ enum max17042_register { enum max17047_register { MAX17047_QRTbl00 = 0x12, MAX17047_FullSOCThr = 0x13, + MAX17047_Config_Ver = 0x20, /* Reserved register */ MAX17047_QRTbl10 = 0x22, MAX17047_QRTbl20 = 0x32, MAX17047_V_empty = 0x3A, @@ -139,6 +140,8 @@ struct max17042_reg_data { }; struct max17042_config_data { + /* Increment version for new config data to be programed */ + u16 version; /* External current sense resistor value in milli-ohms */ u32 cur_sense_val; |