BigW Consortium Gitlab

Commit 9f01dc92 by Ashish Syal

Merge branch 'yellow_kernel_modules'

parents 72350539 bb2f2955
......@@ -91,6 +91,20 @@ red_wp77xx: legato_wp77xx
MANGOH_BOARD=RED \
mksys -t wp77xx $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH.sdef
.PHONY: yellow_wp85
yellow_wp85: legato_wp85
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp85 dir) \
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp85 prefix) \
MANGOH_BOARD=YELLOW \
mksys -t wp85 $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH.sdef
.PHONY: yellow_wp750x
yellow_wp750x: legato_wp750x
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp750x dir) \
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp750x prefix) \
MANGOH_BOARD=YELLOW \
mksys -t wp750x $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH.sdef
.PHONY: yellow_wp76xx
yellow_wp76xx: legato_wp76xx
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp76xx dir) \
......@@ -98,6 +112,13 @@ yellow_wp76xx: legato_wp76xx
MANGOH_BOARD=YELLOW \
mksys -t wp76xx $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_YELLOW) mangOH.sdef
.PHONY: yellow_wp77xx
yellow_wp77xx: legato_wp77xx
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp77xx dir) \
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp77xx prefix) \
MANGOH_BOARD=YELLOW \
mksys -t wp77xx $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_YELLOW) mangOH.sdef
.PHONY: clean
clean:
rm -rf build
menuconfig POWER_SUPPLY
bool "Power supply class support"
help
Say Y here to enable power supply class support. This allows
power supply (batteries, AC, USB) monitoring by userspace
via sysfs and uevent (if available) and/or APM kernel interface
(if selected below).
if POWER_SUPPLY
config CHARGER_BQ25601
tristate "TI BQ25601 battery charger driver"
depends on I2C && GPIOLIB
help
Say Y to enable support for the TI BQ25601 battery charger.
endif # POWER_SUPPLY
Driver files were copied from https://github.com/tibms/kernel-3.18/tree/pmic in revision 8094dd062881463a0866fe93cc890c8b946e1d21
sources:
{
bq2560x_charger.c
}
/*
* BQ2560x battery charging driver
*
* Copyright (C) 2013 Texas Instruments
*
* This package 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 PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef _LINUX_BQ2560X_I2C_H
#define _LINUX_BQ2560X_I2C_H
#include <linux/power_supply.h>
struct bq2560x_charge_param {
int vlim;
int ilim;
int ichg;
int vreg;
};
enum stat_ctrl {
STAT_CTRL_STAT,
STAT_CTRL_ICHG,
STAT_CTRL_INDPM,
STAT_CTRL_DISABLE,
};
enum vboost {
BOOSTV_4850 = 4850,
BOOSTV_5000 = 5000,
BOOSTV_5150 = 5150,
BOOSTV_5300 = 5300,
};
enum iboost {
BOOSTI_500 = 500,
BOOSTI_1200 = 1200,
};
enum vac_ovp {
VAC_OVP_5500 = 5500,
VAC_OVP_6200 = 6200,
VAC_OVP_10500 = 10500,
VAC_OVP_14300 = 14300,
};
struct bq2560x_platform_data {
struct bq2560x_charge_param usb;
struct bq2560x_charge_param ta;
int iprechg;
int iterm;
enum stat_ctrl statctrl;
enum vboost boostv; // options are 4850,
enum iboost boosti; // options are 500mA, 1200mA
enum vac_ovp vac_ovp;
};
#endif
\ No newline at end of file
#ifndef __BQ2560X_HEADER__
#define __BQ2560X_HEADER__
/* Register 00h */
#define BQ2560X_REG_00 0x00
#define REG00_ENHIZ_MASK 0x80
#define REG00_ENHIZ_SHIFT 7
#define REG00_HIZ_ENABLE 1
#define REG00_HIZ_DISABLE 0
#define REG00_STAT_CTRL_MASK 0x60
#define REG00_STAT_CTRL_SHIFT 5
#define REG00_STAT_CTRL_STAT 0
#define REG00_STAT_CTRL_ICHG 1
#define REG00_STAT_CTRL_IINDPM 2
#define REG00_STAT_CTRL_DISABLE 3
#define REG00_IINLIM_MASK 0x1F
#define REG00_IINLIM_SHIFT 0
#define REG00_IINLIM_LSB 100
#define REG00_IINLIM_BASE 100
/* Register 01h */
#define BQ2560X_REG_01 0x01
#define REG01_PFM_DIS_MASK 0x80
#define REG01_PFM_DIS_SHIFT 7
#define REG01_PFM_ENABLE 0
#define REG01_PFM_DISABLE 1
#define REG01_WDT_RESET_MASK 0x40
#define REG01_WDT_RESET_SHIFT 6
#define REG01_WDT_RESET 1
#define REG01_OTG_CONFIG_MASK 0x20
#define REG01_OTG_CONFIG_SHIFT 5
#define REG01_OTG_ENABLE 1
#define REG01_OTG_DISABLE 0
#define REG01_CHG_CONFIG_MASK 0x10
#define REG01_CHG_CONFIG_SHIFT 4
#define REG01_CHG_DISABLE 0
#define REG01_CHG_ENABLE 1
#define REG01_SYS_MINV_MASK 0x0E
#define REG01_SYS_MINV_SHIFT 1
#define REG01_MIN_VBAT_SEL_MASK 0x01
#define REG01_MIN_VBAT_SEL_SHIFT 0
#define REG01_MIN_VBAT_2P8V 0
#define REG01_MIN_VBAT_2P5V 1
/* Register 0x02*/
#define BQ2560X_REG_02 0x02
#define REG02_BOOST_LIM_MASK 0x80
#define REG02_BOOST_LIM_SHIFT 7
#define REG02_BOOST_LIM_0P5A 0
#define REG02_BOOST_LIM_1P2A 1
#define REG02_Q1_FULLON_MASK 0x40
#define REG02_Q1_FULLON_SHIFT 6
#define REG02_Q1_FULLON_ENABLE 1
#define REG02_Q1_FULLON_DISABLE 0
#define REG02_ICHG_MASK 0x3F
#define REG02_ICHG_SHIFT 0
#define REG02_ICHG_BASE 0
#define REG02_ICHG_LSB 60
/* Register 0x03*/
#define BQ2560X_REG_03 0x03
#define REG03_IPRECHG_MASK 0xF0
#define REG03_IPRECHG_SHIFT 4
#define REG03_IPRECHG_BASE 60
#define REG03_IPRECHG_LSB 60
#define REG03_ITERM_MASK 0x0F
#define REG03_ITERM_SHIFT 0
#define REG03_ITERM_BASE 60
#define REG03_ITERM_LSB 60
/* Register 0x04*/
#define BQ2560X_REG_04 0x04
#define REG04_VREG_MASK 0xF8
#define REG04_VREG_SHIFT 3
#define REG04_VREG_BASE 3856
#define REG04_VREG_LSB 32
#define REG04_TOPOFF_TIMER_MASK 0x06
#define REG04_TOPOFF_TIMER_SHIFT 1
#define REG04_TOPOFF_TIMER_DISABLE 0
#define REG04_TOPOFF_TIMER_15M 1
#define REG04_TOPOFF_TIMER_30M 2
#define REG04_TOPOFF_TIMER_45M 3
#define REG04_VRECHG_MASK 0x01
#define REG04_VRECHG_SHIFT 0
#define REG04_VRECHG_100MV 0
#define REG04_VRECHG_200MV 1
/* Register 0x05*/
#define BQ2560X_REG_05 0x05
#define REG05_EN_TERM_MASK 0x80
#define REG05_EN_TERM_SHIFT 7
#define REG05_TERM_ENABLE 1
#define REG05_TERM_DISABLE 0
#define REG05_WDT_MASK 0x30
#define REG05_WDT_SHIFT 4
#define REG05_WDT_DISABLE 0
#define REG05_WDT_40S 1
#define REG05_WDT_80S 2
#define REG05_WDT_160S 3
#define REG05_WDT_BASE 0
#define REG05_WDT_LSB 40
#define REG05_EN_TIMER_MASK 0x08
#define REG05_EN_TIMER_SHIFT 3
#define REG05_CHG_TIMER_ENABLE 1
#define REG05_CHG_TIMER_DISABLE 0
#define REG05_CHG_TIMER_MASK 0x04
#define REG05_CHG_TIMER_SHIFT 2
#define REG05_CHG_TIMER_5HOURS 0
#define REG05_CHG_TIMER_10HOURS 1
#define REG05_TREG_MASK 0x02
#define REG05_TREG_SHIFT 1
#define REG05_TREG_90C 0
#define REG05_TREG_110C 1
#define REG05_JEITA_ISET_MASK 0x01
#define REG05_JEITA_ISET_SHIFT 0
#define REG05_JEITA_ISET_50PCT 0
#define REG05_JEITA_ISET_20PCT 1
/* Register 0x06*/
#define BQ2560X_REG_06 0x06
#define REG06_OVP_MASK 0xC0
#define REG06_OVP_SHIFT 0x6
#define REG06_OVP_5P5V 0
#define REG06_OVP_6P2V 1
#define REG06_OVP_10P5V 2
#define REG06_OVP_14P3V 3
#define REG06_BOOSTV_MASK 0x30
#define REG06_BOOSTV_SHIFT 4
#define REG06_BOOSTV_4P85V 0
#define REG06_BOOSTV_5V 1
#define REG06_BOOSTV_5P15V 2
#define REG06_BOOSTV_5P3V 3
#define REG06_VINDPM_MASK 0x0F
#define REG06_VINDPM_SHIFT 0
#define REG06_VINDPM_BASE 3900
#define REG06_VINDPM_LSB 100
/* Register 0x07*/
#define BQ2560X_REG_07 0x07
#define REG07_FORCE_DPDM_MASK 0x80
#define REG07_FORCE_DPDM_SHIFT 7
#define REG07_FORCE_DPDM 1
#define REG07_TMR2X_EN_MASK 0x40
#define REG07_TMR2X_EN_SHIFT 6
#define REG07_TMR2X_ENABLE 1
#define REG07_TMR2X_DISABLE 0
#define REG07_BATFET_DIS_MASK 0x20
#define REG07_BATFET_DIS_SHIFT 5
#define REG07_BATFET_OFF 1
#define REG07_BATFET_ON 0
#define REG07_JEITA_VSET_MASK 0x10
#define REG07_JEITA_VSET_SHIFT 4
#define REG07_JEITA_VSET_4100 0
#define REG07_JEITA_VSET_VREG 1
#define REG07_BATFET_DLY_MASK 0x08
#define REG07_BATFET_DLY_SHIFT 3
#define REG07_BATFET_DLY_0S 0
#define REG07_BATFET_DLY_10S 1
#define REG07_BATFET_RST_EN_MASK 0x04
#define REG07_BATFET_RST_EN_SHIFT 2
#define REG07_BATFET_RST_DISABLE 0
#define REG07_BATFET_RST_ENABLE 1
#define REG07_VDPM_BAT_TRACK_MASK 0x03
#define REG07_VDPM_BAT_TRACK_SHIFT 0
#define REG07_VDPM_BAT_TRACK_DISABLE 0
#define REG07_VDPM_BAT_TRACK_200MV 1
#define REG07_VDPM_BAT_TRACK_250MV 2
#define REG07_VDPM_BAT_TRACK_300MV 3
/* Register 0x08*/
#define BQ2560X_REG_08 0x08
#define REG08_VBUS_STAT_MASK 0xE0
#define REG08_VBUS_STAT_SHIFT 5
#define REG08_VBUS_TYPE_NONE 0
#define REG08_VBUS_TYPE_USB 1
#define REG08_VBUS_TYPE_ADAPTER 3
#define REG08_VBUS_TYPE_OTG 7
#define REG08_CHRG_STAT_MASK 0x18
#define REG08_CHRG_STAT_SHIFT 3
#define REG08_CHRG_STAT_IDLE 0
#define REG08_CHRG_STAT_PRECHG 1
#define REG08_CHRG_STAT_FASTCHG 2
#define REG08_CHRG_STAT_CHGDONE 3
#define REG08_PG_STAT_MASK 0x04
#define REG08_PG_STAT_SHIFT 2
#define REG08_POWER_GOOD 1
#define REG08_THERM_STAT_MASK 0x02
#define REG08_THERM_STAT_SHIFT 1
#define REG08_VSYS_STAT_MASK 0x01
#define REG08_VSYS_STAT_SHIFT 0
#define REG08_IN_VSYS_STAT 1
/* Register 0x09*/
#define BQ2560X_REG_09 0x09
#define REG09_FAULT_WDT_MASK 0x80
#define REG09_FAULT_WDT_SHIFT 7
#define REG09_FAULT_WDT 1
#define REG09_FAULT_BOOST_MASK 0x40
#define REG09_FAULT_BOOST_SHIFT 6
#define REG09_FAULT_CHRG_MASK 0x30
#define REG09_FAULT_CHRG_SHIFT 4
#define REG09_FAULT_CHRG_NORMAL 0
#define REG09_FAULT_CHRG_INPUT 1
#define REG09_FAULT_CHRG_THERMAL 2
#define REG09_FAULT_CHRG_TIMER 3
#define REG09_FAULT_BAT_MASK 0x08
#define REG09_FAULT_BAT_SHIFT 3
#define REG09_FAULT_BAT_OVP 1
#define REG09_FAULT_NTC_MASK 0x07
#define REG09_FAULT_NTC_SHIFT 0
#define REG09_FAULT_NTC_NORMAL 0
#define REG09_FAULT_NTC_WARM 2
#define REG09_FAULT_NTC_COOL 3
#define REG09_FAULT_NTC_COLD 5
#define REG09_FAULT_NTC_HOT 6
/* Register 0x0A */
#define BQ2560X_REG_0A 0x0A
#define REG0A_VBUS_GD_MASK 0x80
#define REG0A_VBUS_GD_SHIFT 7
#define REG0A_VBUS_GD 1
#define REG0A_VINDPM_STAT_MASK 0x40
#define REG0A_VINDPM_STAT_SHIFT 6
#define REG0A_VINDPM_ACTIVE 1
#define REG0A_IINDPM_STAT_MASK 0x20
#define REG0A_IINDPM_STAT_SHIFT 5
#define REG0A_IINDPM_ACTIVE 1
#define REG0A_TOPOFF_ACTIVE_MASK 0x08
#define REG0A_TOPOFF_ACTIVE_SHIFT 3
#define REG0A_TOPOFF_ACTIVE 1
#define REG0A_ACOV_STAT_MASK 0x04
#define REG0A_ACOV_STAT_SHIFT 2
#define REG0A_ACOV_ACTIVE 1
#define REG0A_VINDPM_INT_MASK 0x02
#define REG0A_VINDPM_INT_SHIFT 1
#define REG0A_VINDPM_INT_ENABLE 0
#define REG0A_VINDPM_INT_DISABLE 1
#define REG0A_IINDPM_INT_MASK 0x01
#define REG0A_IINDPM_INT_SHIFT 0
#define REG0A_IINDPM_INT_ENABLE 0
#define REG0A_IINDPM_INT_DISABLE 1
#define REG0A_INT_MASK_MASK 0x03
#define REG0A_INT_MASK_SHIFT 0
#define BQ2560X_REG_0B 0x0B
#define REG0B_REG_RESET_MASK 0x80
#define REG0B_REG_RESET_SHIFT 7
#define REG0B_REG_RESET 1
#define REG0B_PN_MASK 0x78
#define REG0B_PN_SHIFT 3
#define REG0B_DEV_REV_MASK 0x03
#define REG0B_DEV_REV_SHIFT 0
#endif
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/version.h>
#include "expander.h"
/*
*-----------------------------------------------------------------------------
* Constants
*-----------------------------------------------------------------------------
*/
#define GENERIC_LED (4)
#define PCM_SEL (5)
#define SDIO_SEL (6)
#define TRI_LED_BLU (7)
#define TRI_LED_GRN (15)
#define TRI_LED_RED (10)
#define BUZZER (0)
struct expander_device {
struct platform_device *pdev;
atomic_t generic_led_val, pcm_sel_val, sdio_sel_val, buzzer_val,
tri_led_blu_val, tri_led_red_val, tri_led_grn_val;
int gpio_expander_base;
};
#define CREATE_SYSFS_DEFN(_var, _offset) \
static ssize_t _var##_show(struct device *dev, \
struct device_attribute *attr, \
char *buf) \
{ \
struct expander_device* exp = dev_get_drvdata(dev); \
return sprintf(buf, "%d\n", atomic_read(&exp->_var##_val)); \
}\
static int _var##_store(struct device *dev, \
struct device_attribute *attr, \
const char *buf, size_t count) \
{ \
struct expander_device* exp = dev_get_drvdata(dev); \
u8 val; \
int ret; \
\
ret = kstrtou8(buf, 10, &val); \
if (ret || val > 1) \
return -EINVAL; \
\
gpio_set_value_cansleep(exp->gpio_expander_base + _offset, val); \
atomic_set(&exp->_var##_val, val); \
\
return count; \
} \
static DEVICE_ATTR_RW(_var)
CREATE_SYSFS_DEFN(generic_led, GENERIC_LED);
CREATE_SYSFS_DEFN(pcm_sel, PCM_SEL);
CREATE_SYSFS_DEFN(sdio_sel, SDIO_SEL);
CREATE_SYSFS_DEFN(tri_led_blu, TRI_LED_BLU);
CREATE_SYSFS_DEFN(tri_led_red, TRI_LED_RED);
CREATE_SYSFS_DEFN(tri_led_grn, TRI_LED_GRN);
CREATE_SYSFS_DEFN(buzzer, BUZZER);
static void gpio_initial_status(struct platform_device *pdev,
struct device_attribute *attr,
int function_number,int function_val,
atomic_t *atomic_val)
{
struct expander_device* exp = dev_get_drvdata(&pdev->dev);
devm_gpio_request(&pdev->dev, exp->gpio_expander_base+function_number,
dev_name(&pdev->dev));
atomic_set(atomic_val, function_val);
gpio_direction_output(exp->gpio_expander_base+function_number,
function_val);
device_create_file(&pdev->dev, attr);
}
static void gpio_final_status(struct platform_device *pdev,
struct device_attribute *attr,
int function_number,int function_val)
{
struct expander_device* exp = dev_get_drvdata(&pdev->dev);
device_remove_file(&pdev->dev, attr);
gpio_set_value_cansleep(exp->gpio_expander_base+function_number, function_val);
}
static int expander_probe(struct platform_device *pdev)
{
struct expander_device* dev;
int ret = 0;
struct expander_platform_data *pdata = dev_get_platdata(&pdev->dev);
dev_info(&pdev->dev, "%s(): probe\n", __func__);
if (!pdata) {
ret = -EINVAL;
dev_err(&pdev->dev, "Required platform data not provided\n");
goto done;
}
/* Create the driver data and remove the allocated memory when driver
is removed */
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
if (!dev) {
ret = -ENOMEM;
goto done;
}
dev->pdev = pdev;
dev->gpio_expander_base = pdata->gpio_expander_base;
gpio_initial_status(pdev,&dev_attr_generic_led, GENERIC_LED, 0, &dev->generic_led_val);
gpio_initial_status(pdev,&dev_attr_pcm_sel, PCM_SEL, 0, &dev->pcm_sel_val);
gpio_initial_status(pdev,&dev_attr_sdio_sel, SDIO_SEL, 0, &dev->sdio_sel_val);
gpio_initial_status(pdev,&dev_attr_tri_led_blu, TRI_LED_BLU, 0, &dev->tri_led_blu_val);
gpio_initial_status(pdev,&dev_attr_tri_led_red, TRI_LED_RED, 0, &dev->tri_led_red_val);
gpio_initial_status(pdev,&dev_attr_tri_led_grn, TRI_LED_GRN, 0, &dev->tri_led_grn_val);
gpio_initial_status(pdev,&dev_attr_buzzer, BUZZER, 0, &dev->buzzer_val);
platform_set_drvdata(pdev, dev);
done:
return ret;
}
static int expander_remove(struct platform_device *pdev)
{
// struct expander_device* dev = dev_get_drvdata(&pdev->dev);
dev_info(&pdev->dev, "%s(): remove\n", __func__);
/* remove sysfs files & set final state values for gpio expander*/
gpio_final_status(pdev,&dev_attr_generic_led, GENERIC_LED, 0);
gpio_final_status(pdev,&dev_attr_pcm_sel, PCM_SEL, 0);
gpio_final_status(pdev,&dev_attr_sdio_sel, SDIO_SEL, 0);
gpio_final_status(pdev,&dev_attr_tri_led_blu, TRI_LED_BLU, 0);
gpio_final_status(pdev,&dev_attr_tri_led_red, TRI_LED_RED, 0);
gpio_final_status(pdev,&dev_attr_tri_led_grn, TRI_LED_GRN, 0);
gpio_final_status(pdev,&dev_attr_buzzer, BUZZER, 0);
return 0;
}
static const struct platform_device_id yellow_expander_ids[] = {
{"expander", (kernel_ulong_t)0},
{},
};
MODULE_DEVICE_TABLE(platform, yellow_expander_ids);
static struct platform_driver expander_driver = {
.probe = expander_probe,
.remove = expander_remove,
.driver = {
.name = "expander",
.owner = THIS_MODULE,
.bus = &platform_bus_type,
},
.id_table = yellow_expander_ids,
};
static int __init expander_init(void)
{
platform_driver_register(&expander_driver);
return 0;
}
static void __exit expander_exit(void)
{
platform_driver_unregister(&expander_driver);
}
module_init(expander_init);
module_exit(expander_exit);
MODULE_ALIAS("platform:expander");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Sierra Wireless");
MODULE_DESCRIPTION("EXPANDER driver");
MODULE_VERSION("0.1");
#ifndef EXPANDER_H
#define EXPANDER_H
struct expander_platform_data {
int gpio_expander_base;
};
#endif /* EXPANDER_H */
sources:
{
expander.c
}
cflags:
{
// -DDEBUG
}
params:
{
}
......@@ -5,6 +5,14 @@
/* TODO: There should be a better way to convert from WP GPIO numbers to real GPIO numbers */
#if defined(CONFIG_ARCH_MSM9615) /* For WPX5XX */
//#include "/opt/swi/y22-ext-SWI9X15Y_07.13.05.00/sysroots/armv7a-neon-poky-linux-gnueabi/usr/src/kernel/arch/arm/mach-msm/board-9615.h"
#include <../arch/arm/mach-msm/board-9615.h>
#elif defined(CONFIG_ARCH_MDM9607) /* For WP76XX */
#include <../arch/arm/mach-msm/include/mach/swimcu.h>
#endif
#if defined(CONFIG_ARCH_MSM9615)
#define PRIMARY_I2C_BUS (0)
#define PRIMARY_SPI_BUS (0)
......@@ -14,7 +22,10 @@
#define CF3_GPIO8 (29)
#define CF3_GPIO2 (59)
#define CF3_GPIO33 (78)
#define CF3_GPIO36 SWIMCU_GPIO_TO_SYS(2)
#elif defined(CONFIG_ARCH_MDM9607) /* For WP76XX */
#define PRIMARY_I2C_BUS (4)
#define PRIMARY_SPI_BUS (1)
......@@ -24,6 +35,7 @@
#define CF3_GPIO8 (58)
#define CF3_GPIO2 (38)
#define CF3_GPIO33 (78)
#define CF3_GPIO36 SWIMCU_GPIO_TO_SYS(2)
#endif
#endif /* MANGOH_COMMON_H */
cflags:
{
-I${MANGOH_ROOT}/linux_kernel_modules/expander
-I${MANGOH_ROOT}/linux_kernel_modules/opt300x
}
sources:
......@@ -10,7 +11,7 @@ sources:
params:
{
revision = "dv1"
revision = "dev"
}
......@@ -18,7 +19,14 @@ requires:
{
kernelModules:
{
$CURDIR/../bme680/bme680-i2c
$CURDIR/../bmi088/bmi088-i2c
$CURDIR/../bmi160/bmi160-i2c
// $CURDIR/../bme680/bme680-i2c
$CURDIR/../rtc-pcf85063/rtc-pcf85063
$CURDIR/../bq25601/bq25601
// $CURDIR/../bq27426/bq27426-i2c
// $CURDIR/../bmm150/bmm150-i2c
$CURDIR/../opt300x/opt300x
$CURDIR/../expander/expander
}
}
#
# Light sensors
#
# When adding new entries keep the list in alphabetical order
menu "Light sensors"
config OPT3001
tristate "Texas Instruments OPT3001 Light Sensor"
depends on I2C
help
If you say Y or M here, you get support for Texas Instruments
OPT3001 Ambient Light Sensor.
If built as a dynamically linked module, it will be called
opt3001.
endmenu
Driver files were copied from https://github.com/torvalds/linux/tree/master/drivers/iio/light in revision 4.18.10
......@@ -8,6 +8,6 @@ requires:
kernelModules:
{
$CURDIR/../rtc-pcf85063/rtc-pcf85063
$CURDIR/../mangoh/mangoh_yellow
$CURDIR/../mangoh/mangoh_yellow_dev
}
}
......@@ -61,7 +61,6 @@ apps:
$LEGATO_ROOT/apps/tools/devMode
#if ${MANGOH_BOARD} = YELLOW
$MANGOH_ROOT/samples/BoschSensorsMonitor/boschSensorsMonitor
#endif
}
......@@ -107,6 +106,7 @@ kernelModules:
* Dependencies of the above kernel modules - must be listed explicitly in the SDEF due to the
* way that Legato kernel module dependencies work
*/
$CURDIR/linux_kernel_modules/led/led
$CURDIR/linux_kernel_modules/bq24296/bq24296
$CURDIR/linux_kernel_modules/ltc294x/ltc294x
......@@ -160,13 +160,26 @@ kernelModules:
$CURDIR/linux_kernel_modules/lsm6ds3/lsm6ds3-i2c
$CURDIR/linux_kernel_modules/lsm6ds3/lsm6ds3
#elif ${MANGOH_BOARD} = YELLOW
$CURDIR/linux_kernel_modules/mangoh/mangoh_yellow_dv1
$CURDIR/linux_kernel_modules/mangoh/mangoh_yellow_dev
#if ${MANGOH_KERNEL_LACKS_IIO} = 1
$CURDIR/linux_kernel_modules/iio/iio-triggered-buffer
$CURDIR/linux_kernel_modules/iio/iio-kfifo-buf
$CURDIR/linux_kernel_modules/iio/iio
#endif // MANGOH_KERNEL_LACKS_IIO
// $CURDIR/linux_kernel_modules/bme680/bme680-i2c
// $CURDIR/linux_kernel_modules/bme680/bme680
$CURDIR/linux_kernel_modules/bmi160/bmi160-i2c
$CURDIR/linux_kernel_modules/bmi160/bmi160
$CURDIR/linux_kernel_modules/rtc-pcf85063/rtc-pcf85063
$CURDIR/linux_kernel_modules/rtc_sync/rtc_sync
$CURDIR/linux_kernel_modules/bq25601/bq25601
// $CURDIR/linux_kernel_modules/bq27426/bq27426-i2c
// $CURDIR/linux_kernel_modules/bmm150/bmm150-i2c
$CURDIR/linux_kernel_modules/opt300x/opt300x
$CURDIR/linux_kernel_modules/expander/expander
/*
* Dependencies of the above kernel modules - must be listed explicitly in the SDEF due to the
* way that Legato kernel module dependencies work
*/
$CURDIR/linux_kernel_modules/bme680/bme680-i2c
$CURDIR/linux_kernel_modules/bmi088/bmi088-i2c
#endif // MANGOH_BOARD
}
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