BigW Consortium Gitlab

Commit 7da9bbf6 by Ashish Syal

Merge remote-tracking branch 'origin/master'

parents e76da17b f378cead
sources: sources:
{ {
bq27xxx_battery_i2c.c bq27xxx_battery_i2c.c
devres_backport.c devres_backport.c
bq27xxx_battery_source.c bq27xxx_battery_source.c
power_supply_backport.c power_supply_backport.c
} }
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
#include "bq27xxx_battery.h" #include "bq27xxx_battery.h"
#include "bq27426-platform-data.h" #include "bq27426-platform-data.h"
#include "device_backport.h"
static DEFINE_IDR(battery_id); static DEFINE_IDR(battery_id);
static DEFINE_MUTEX(battery_mutex); static DEFINE_MUTEX(battery_mutex);
......
...@@ -58,6 +58,8 @@ ...@@ -58,6 +58,8 @@
//#include "power_supply_backport.h" //#include "power_supply_backport.h"
#include "bq27xxx_battery.h" #include "bq27xxx_battery.h"
#include "bq27426-platform-data.h" #include "bq27426-platform-data.h"
#include <linux/version.h>
#define BQ27XXX_MANUFACTURER "Texas Instruments" #define BQ27XXX_MANUFACTURER "Texas Instruments"
/* BQ27XXX Flags */ /* BQ27XXX Flags */
...@@ -1915,7 +1917,11 @@ int bq27xxx_battery_setup(struct bq27xxx_device_info *di, struct bq27426_platfor ...@@ -1915,7 +1917,11 @@ int bq27xxx_battery_setup(struct bq27xxx_device_info *di, struct bq27426_platfor
di->bat.external_power_changed = bq27xxx_external_power_changed; di->bat.external_power_changed = bq27xxx_external_power_changed;
dev_info(di->dev, " in the setup fourth break"); dev_info(di->dev, " in the setup fourth break");
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)
ret = power_supply_register(di->dev, &di->bat);
#else
ret = power_supply_register_no_ws(di->dev, &di->bat); ret = power_supply_register_no_ws(di->dev, &di->bat);
#endif
if (ret != 0) { if (ret != 0) {
dev_err(di->dev, "failed to register battery\n"); dev_err(di->dev, "failed to register battery\n");
return ret; return ret;
......
#include <linux/version.h> #include <linux/version.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
...@@ -65,5 +65,3 @@ char *devm_kasprintf(struct device *dev, gfp_t gfp, const char *fmt, ...) ...@@ -65,5 +65,3 @@ char *devm_kasprintf(struct device *dev, gfp_t gfp, const char *fmt, ...)
EXPORT_SYMBOL_GPL(devm_kasprintf); EXPORT_SYMBOL_GPL(devm_kasprintf);
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) */ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) */
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -2,6 +2,7 @@ cflags: ...@@ -2,6 +2,7 @@ cflags:
{ {
-DDEBUG -DDEBUG
-I${MANGOH_ROOT}/linux_kernel_modules/ltc294x -I${MANGOH_ROOT}/linux_kernel_modules/ltc294x
-I${MANGOH_ROOT}/linux_kernel_modules/bq27xxx
-I${MANGOH_ROOT}/linux_kernel_modules/bq24296 -I${MANGOH_ROOT}/linux_kernel_modules/bq24296
-I${MANGOH_ROOT}/linux_kernel_modules/iot_slot -I${MANGOH_ROOT}/linux_kernel_modules/iot_slot
-I${MANGOH_ROOT}/linux_kernel_modules/led -I${MANGOH_ROOT}/linux_kernel_modules/led
...@@ -35,6 +36,7 @@ requires: ...@@ -35,6 +36,7 @@ requires:
$CURDIR/../led/led $CURDIR/../led/led
$CURDIR/../bq24296/bq24296 $CURDIR/../bq24296/bq24296
$CURDIR/../ltc294x/ltc294x $CURDIR/../ltc294x/ltc294x
$CURDIR/../bq27xxx/bq27xxx_battery
$CURDIR/../bmp280/bmp280-i2c $CURDIR/../bmp280/bmp280-i2c
$CURDIR/../bmi160/bmi160-i2c $CURDIR/../bmi160/bmi160-i2c
} }
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "ltc294x-platform-data.h" #include "ltc294x-platform-data.h"
#include "bq24190-platform-data.h" #include "bq24190-platform-data.h"
#include "bq27xxx_battery.h"
#include "mangoh_red_mux.h" #include "mangoh_red_mux.h"
#include "mangoh_common.h" #include "mangoh_common.h"
...@@ -177,8 +178,14 @@ static struct i2c_board_info ltc2942_battery_gauge_devinfo = { ...@@ -177,8 +178,14 @@ static struct i2c_board_info ltc2942_battery_gauge_devinfo = {
.platform_data = &ltc2942_battery_gauge_platform_data, .platform_data = &ltc2942_battery_gauge_platform_data,
}; };
static struct bq27426_platform_data bq27426_battery_gauge_platform_data = {
.energy_full_design_uwh = 1600000,
.charge_full_design_uah = 440000,
.voltage_min_design_uv = 3300000,
};
static struct i2c_board_info bq27426_battery_gauge_devinfo = { static struct i2c_board_info bq27426_battery_gauge_devinfo = {
I2C_BOARD_INFO("bq27426", 0x55), I2C_BOARD_INFO("bq27426", 0x55),
.platform_data = &bq27426_battery_gauge_platform_data,
}; };
static struct i2c_board_info mangoh_red_battery_charger_devinfo = { static struct i2c_board_info mangoh_red_battery_charger_devinfo = {
......
...@@ -140,17 +140,14 @@ static struct i2c_board_info mangoh_yellow_rtc_devinfo = { ...@@ -140,17 +140,14 @@ static struct i2c_board_info mangoh_yellow_rtc_devinfo = {
static struct i2c_board_info mangoh_yellow_battery_charger_devinfo = { static struct i2c_board_info mangoh_yellow_battery_charger_devinfo = {
I2C_BOARD_INFO("bq25601", 0x6b), I2C_BOARD_INFO("bq25601", 0x6b),
}; };
static struct bq27426_platform_data mangoh_yellow_battery_gauge_platform_data = { static struct bq27426_platform_data mangoh_yellow_battery_gauge_platform_data = {
.energy_full_design_uwh = 1600000, .energy_full_design_uwh = 1600000,
.charge_full_design_uah = 440000, .charge_full_design_uah = 440000,
.voltage_min_design_uv = 3300000, .voltage_min_design_uv = 3300000,
}; };
static struct i2c_board_info mangoh_yellow_battery_gauge_devinfo = { static struct i2c_board_info mangoh_yellow_battery_gauge_devinfo = {
I2C_BOARD_INFO("bq27426", 0x55), I2C_BOARD_INFO("bq27426", 0x55),
.platform_data = &mangoh_yellow_battery_gauge_platform_data, .platform_data = &mangoh_yellow_battery_gauge_platform_data,
}; };
static struct i2c_board_info mangoh_yellow_magnetometer_devinfo = { static struct i2c_board_info mangoh_yellow_magnetometer_devinfo = {
I2C_BOARD_INFO("bmm150", 0x10), I2C_BOARD_INFO("bmm150", 0x10),
...@@ -169,7 +166,7 @@ static struct platform_device mangoh_yellow_expander = { ...@@ -169,7 +166,7 @@ static struct platform_device mangoh_yellow_expander = {
.dev = { .dev = {
.platform_data = &mangoh_yellow_expander_platform_data, .platform_data = &mangoh_yellow_expander_platform_data,
.release = mangoh_yellow_expander_release, .release = mangoh_yellow_expander_release,
}, },
}; };
/* /*
......
File mode changed from 100644 to 100755
...@@ -121,8 +121,16 @@ static int time_check(void *data) ...@@ -121,8 +121,16 @@ static int time_check(void *data)
long long delta_ns; long long delta_ns;
ktime_get_real_ts(&before); ktime_get_real_ts(&before);
while (timeout > 0) while (timeout > 0) {
/* schedule_timeout requires the task state to be set
* to either TASK_INTERRUPTIBLE or TASK_UNINTERRUPTIBLE,
* otherwise the kernel will not put the task on the sleep list.
* If you have any critical processing you need done in rtc
* then just change this to TASK_UNINTERRUPTIBLE - i.e no signals.
*/
set_current_state(TASK_INTERRUPTIBLE);
timeout = schedule_timeout(timeout); timeout = schedule_timeout(timeout);
}
ktime_get_real_ts(&after); ktime_get_real_ts(&after);
delta_ns = timespec_to_ns(&after) - timespec_to_ns(&before); delta_ns = timespec_to_ns(&after) - timespec_to_ns(&before);
......
...@@ -134,6 +134,7 @@ kernelModules: ...@@ -134,6 +134,7 @@ kernelModules:
$CURDIR/linux_kernel_modules/led/led $CURDIR/linux_kernel_modules/led/led
$CURDIR/linux_kernel_modules/bq24296/bq24296 $CURDIR/linux_kernel_modules/bq24296/bq24296
$CURDIR/linux_kernel_modules/ltc294x/ltc294x $CURDIR/linux_kernel_modules/ltc294x/ltc294x
$CURDIR/linux_kernel_modules/bq27xxx/bq27xxx_battery
$CURDIR/linux_kernel_modules/cp2130/cp2130 $CURDIR/linux_kernel_modules/cp2130/cp2130
$CURDIR/linux_kernel_modules/bmp280/bmp280-i2c $CURDIR/linux_kernel_modules/bmp280/bmp280-i2c
$CURDIR/linux_kernel_modules/bmp280/bmp280 $CURDIR/linux_kernel_modules/bmp280/bmp280
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment