diff options
| author | Roger Monk <r-monk@ti.com> | 2010-02-10 22:51:45 +0000 |
|---|---|---|
| committer | Koen Kooi <koen@openembedded.org> | 2010-04-12 19:43:19 +0200 |
| commit | 7176279b74b61c8b6144c2d14b9e97560a60fb00 (patch) | |
| tree | ed3c7f6862c21aa7deadec48bbb6f2c2cdaae524 /recipes/linux/linux-davinci | |
| parent | 9f68ac692a56c028fe191b4fb37a356ddc326677 (diff) | |
linux-davinci: Start using multi-kernel flow for da850-omapl138-evm
* Main defconfig now has more options 'angstrom'-like
* Note USB gadget disabled while debugging
* Update to latest master da850-omapl138 kernel + config mods
* All configs add ts driver added (since now multifunction device)
* Added 'stats' version with extra pm config options (kernel stats/etc)
* new config for uicapture + lcd display
* More options + OHCI enabled in 'regular' config
* Remove da850-omapl138 merged patches
* Add new patches for Hawkboard Kernel
* Introduce board file for hawkboard
* Remove machine patch
* Config update
* All peripherals sanity tested
* OK - Console, Enet, Audio, Display, USB OHCI, Video Capture, MMC, NAND, SATA
* Some Issues - USB OTG disconnect problems
* KO - RTC, (PM, etc)
* increase kernel partition to 4MiB for hawkboard
* dm6467t-evm is SOC_FAMILY=dm6467
Signed-off-by: Roger Monk <r-monk@ti.com>
Signed-off-by: Koen Kooi <k-kooi@ti.com>
Diffstat (limited to 'recipes/linux/linux-davinci')
19 files changed, 9096 insertions, 2548 deletions
diff --git a/recipes/linux/linux-davinci/0001-CheckRegisterForDCDC.patch b/recipes/linux/linux-davinci/0001-CheckRegisterForDCDC.patch deleted file mode 100644 index 656a09e8c4..0000000000 --- a/recipes/linux/linux-davinci/0001-CheckRegisterForDCDC.patch +++ /dev/null @@ -1,93 +0,0 @@ -From: Anuj Aggarwal <anuj.aggarwal@ti.com> -Date: Fri, 18 Dec 2009 11:18:43 +0000 (+0530) -Subject: Regulator: Check which register needs to be read for DCDC2/3 -X-Git-Url: http://arago-project.org/git/people/?p=sekhar%2Flinux-omapl1.git;a=commitdiff_plain;h=9f8ddc15520a7d5bb27bb660215d3a153ea39c00 - -Regulator: Check which register needs to be read for DCDC2/3 - -In TPS6507x, for DCDC2/3, either DEFDCDC2_LOW or DEFDCDC2_HIGH -can be read depending on the status of DEFDCDC2 pin. Since this -pin cannot be read through register, this information is passed -through board-evm file and the driver appropriately checks it -before reading the LOW / HIGH register. - -Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com> -Signed-off-by: Sekhar Nori <nsekhar@ti.com> ---- - -diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x-regulator.c -index f8a6dfb..602a194 100644 ---- a/drivers/regulator/tps6507x-regulator.c -+++ b/drivers/regulator/tps6507x-regulator.c -@@ -159,13 +159,15 @@ struct tps_info { - unsigned max_uV; - u8 table_len; - const u16 *table; -+ /* HIGH register is used to control the output voltage for DCDC2/3 */ -+ unsigned reg_high:1; - }; - - struct tps_pmic { - struct regulator_desc desc[TPS6507X_NUM_REGULATOR]; - struct i2c_client *client; - struct regulator_dev *rdev[TPS6507X_NUM_REGULATOR]; -- const struct tps_info *info[TPS6507X_NUM_REGULATOR]; -+ struct tps_info *info[TPS6507X_NUM_REGULATOR]; - struct mutex io_lock; - }; - -@@ -352,10 +354,16 @@ static int tps6507x_dcdc_get_voltage(struct regulator_dev *dev) - reg = TPS6507X_REG_DEFDCDC1; - break; - case TPS6507X_DCDC_2: -- reg = TPS6507X_REG_DEFDCDC2_LOW; -+ if (tps->info[dcdc]->reg_high) -+ reg = TPS6507X_REG_DEFDCDC2_HIGH; -+ else -+ reg = TPS6507X_REG_DEFDCDC2_LOW; - break; - case TPS6507X_DCDC_3: -- reg = TPS6507X_REG_DEFDCDC3_LOW; -+ if (tps->info[dcdc]->reg_high) -+ reg = TPS6507X_REG_DEFDCDC3_HIGH; -+ else -+ reg = TPS6507X_REG_DEFDCDC3_LOW; - break; - default: - return -EINVAL; -@@ -381,10 +389,16 @@ static int tps6507x_dcdc_set_voltage(struct regulator_dev *dev, - reg = TPS6507X_REG_DEFDCDC1; - break; - case TPS6507X_DCDC_2: -- reg = TPS6507X_REG_DEFDCDC2_LOW; -+ if (tps->info[dcdc]->reg_high) -+ reg = TPS6507X_REG_DEFDCDC2_HIGH; -+ else -+ reg = TPS6507X_REG_DEFDCDC2_LOW; - break; - case TPS6507X_DCDC_3: -- reg = TPS6507X_REG_DEFDCDC3_LOW; -+ if (tps->info[dcdc]->reg_high) -+ reg = TPS6507X_REG_DEFDCDC3_HIGH; -+ else -+ reg = TPS6507X_REG_DEFDCDC3_LOW; - break; - default: - return -EINVAL; -@@ -542,7 +556,7 @@ static - int tps_6507x_probe(struct i2c_client *client, const struct i2c_device_id *id) - { - static int desc_id; -- const struct tps_info *info = (void *)id->driver_data; -+ struct tps_info *info = (void *)id->driver_data; - struct regulator_init_data *init_data; - struct regulator_dev *rdev; - struct tps_pmic *tps; -@@ -573,6 +587,7 @@ int tps_6507x_probe(struct i2c_client *client, const struct i2c_device_id *id) - for (i = 0; i < TPS6507X_NUM_REGULATOR; i++, info++, init_data++) { - /* Register the regulators */ - tps->info[i] = info; -+ tps->info[i]->reg_high = (unsigned) init_data->driver_data; - tps->desc[i].name = info->name; - tps->desc[i].id = desc_id++; - tps->desc[i].n_voltages = num_voltages[i]; diff --git a/recipes/linux/linux-davinci/0001-tps6507x_regulator_refactor.patch b/recipes/linux/linux-davinci/0001-tps6507x_regulator_refactor.patch deleted file mode 100644 index dfa356f682..0000000000 --- a/recipes/linux/linux-davinci/0001-tps6507x_regulator_refactor.patch +++ /dev/null @@ -1,222 +0,0 @@ -Index: kernel/drivers/regulator/tps6507x-regulator.c -=================================================================== ---- kernel.orig/drivers/regulator/tps6507x-regulator.c 2010-01-26 14:28:42.000000000 -0700 -+++ kernel/drivers/regulator/tps6507x-regulator.c 2010-01-26 14:32:05.000000000 -0700 -@@ -24,65 +24,7 @@ - #include <linux/regulator/machine.h> - #include <linux/i2c.h> - #include <linux/delay.h> -- --/* Register definitions */ --#define TPS6507X_REG_PPATH1 0X01 --#define TPS6507X_REG_INT 0X02 --#define TPS6507X_REG_CHGCONFIG0 0X03 --#define TPS6507X_REG_CHGCONFIG1 0X04 --#define TPS6507X_REG_CHGCONFIG2 0X05 --#define TPS6507X_REG_CHGCONFIG3 0X06 --#define TPS6507X_REG_REG_ADCONFIG 0X07 --#define TPS6507X_REG_TSCMODE 0X08 --#define TPS6507X_REG_ADRESULT_1 0X09 --#define TPS6507X_REG_ADRESULT_2 0X0A --#define TPS6507X_REG_PGOOD 0X0B --#define TPS6507X_REG_PGOODMASK 0X0C --#define TPS6507X_REG_CON_CTRL1 0X0D --#define TPS6507X_REG_CON_CTRL2 0X0E --#define TPS6507X_REG_CON_CTRL3 0X0F --#define TPS6507X_REG_DEFDCDC1 0X10 --#define TPS6507X_REG_DEFDCDC2_LOW 0X11 --#define TPS6507X_REG_DEFDCDC2_HIGH 0X12 --#define TPS6507X_REG_DEFDCDC3_LOW 0X13 --#define TPS6507X_REG_DEFDCDC3_HIGH 0X14 --#define TPS6507X_REG_DEFSLEW 0X15 --#define TPS6507X_REG_LDO_CTRL1 0X16 --#define TPS6507X_REG_DEFLDO2 0X17 --#define TPS6507X_REG_WLED_CTRL1 0X18 --#define TPS6507X_REG_WLED_CTRL2 0X19 -- --/* CON_CTRL1 bitfields */ --#define TPS6507X_CON_CTRL1_DCDC1_ENABLE BIT(4) --#define TPS6507X_CON_CTRL1_DCDC2_ENABLE BIT(3) --#define TPS6507X_CON_CTRL1_DCDC3_ENABLE BIT(2) --#define TPS6507X_CON_CTRL1_LDO1_ENABLE BIT(1) --#define TPS6507X_CON_CTRL1_LDO2_ENABLE BIT(0) -- --/* DEFDCDC1 bitfields */ --#define TPS6507X_DEFDCDC1_DCDC1_EXT_ADJ_EN BIT(7) --#define TPS6507X_DEFDCDC1_DCDC1_MASK 0X3F -- --/* DEFDCDC2_LOW bitfields */ --#define TPS6507X_DEFDCDC2_LOW_DCDC2_MASK 0X3F -- --/* DEFDCDC2_HIGH bitfields */ --#define TPS6507X_DEFDCDC2_HIGH_DCDC2_MASK 0X3F -- --/* DEFDCDC3_LOW bitfields */ --#define TPS6507X_DEFDCDC3_LOW_DCDC3_MASK 0X3F -- --/* DEFDCDC3_HIGH bitfields */ --#define TPS6507X_DEFDCDC3_HIGH_DCDC3_MASK 0X3F -- --/* TPS6507X_REG_LDO_CTRL1 bitfields */ --#define TPS6507X_REG_LDO_CTRL1_LDO1_MASK 0X0F -- --/* TPS6507X_REG_DEFLDO2 bitfields */ --#define TPS6507X_REG_DEFLDO2_LDO2_MASK 0X3F -- --/* VDCDC MASK */ --#define TPS6507X_DEFDCDCX_DCDC_MASK 0X3F -+#include <linux/mfd/tps6507x.h> - - /* DCDC's */ - #define TPS6507X_DCDC_1 0 -Index: kernel/drivers/regulator/Kconfig -=================================================================== ---- kernel.orig/drivers/regulator/Kconfig 2010-01-26 14:28:42.000000000 -0700 -+++ kernel/drivers/regulator/Kconfig 2010-01-26 14:32:05.000000000 -0700 -@@ -159,6 +159,7 @@ - config REGULATOR_TPS6507X - tristate "TI TPS6507X Power regulators" - depends on I2C -+ depends on CPU_FREQ - help - This driver supports TPS6507X voltage regulator chips. TPS6507X provides - three step-down converters and two general-purpose LDO voltage regulators. -Index: kernel/include/linux/mfd/tps6507x.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ kernel/include/linux/mfd/tps6507x.h 2010-01-26 14:32:05.000000000 -0700 -@@ -0,0 +1,134 @@ -+/* linux/mfd/tps6507x.h -+ * -+ * Functions to access TPS65070 power management chip. -+ * -+ * Copyright (c) 2009 RidgeRun (todd.fischer@ridgerun.com) -+ * -+ * -+ * For licencing details see kernel-base/COPYING -+ */ -+ -+#ifndef __LINUX_MFD_TPS6507X_H -+#define __LINUX_MFD_TPS6507X_H -+ -+/* -+ * ---------------------------------------------------------------------------- -+ * Registers, all 8 bits -+ * ---------------------------------------------------------------------------- -+ */ -+ -+ -+/* Register definitions */ -+#define TPS6507X_REG_PPATH1 0X01 -+#define TPS6507X_CHG_USB BIT(7) -+#define TPS6507X_CHG_AC BIT(6) -+#define TPS6507X_CHG_USB_PW_ENABLE BIT(5) -+#define TPS6507X_CHG_AC_PW_ENABLE BIT(4) -+#define TPS6507X_CHG_AC_CURRENT BIT(2) -+#define TPS6507X_CHG_USB_CURRENT BIT(0) -+ -+#define TPS6507X_REG_INT 0X02 -+#define TPS6507X_REG_MASK_AC_USB BIT(7) -+#define TPS6507X_REG_MASK_TSC BIT(6) -+#define TPS6507X_REG_MASK_PB_IN BIT(5) -+#define TPS6507X_REG_TSC_INT BIT(3) -+#define TPS6507X_REG_PB_IN_INT BIT(2) -+#define TPS6507X_REG_AC_USB_APPLIED BIT(1) -+#define TPS6507X_REG_AC_USB_REMOVED BIT(0) -+ -+#define TPS6507X_REG_CHGCONFIG0 0X03 -+ -+#define TPS6507X_REG_CHGCONFIG1 0X04 -+#define TPS6507X_CON_CTRL1_DCDC1_ENABLE BIT(4) -+#define TPS6507X_CON_CTRL1_DCDC2_ENABLE BIT(3) -+#define TPS6507X_CON_CTRL1_DCDC3_ENABLE BIT(2) -+#define TPS6507X_CON_CTRL1_LDO1_ENABLE BIT(1) -+#define TPS6507X_CON_CTRL1_LDO2_ENABLE BIT(0) -+ -+#define TPS6507X_REG_CHGCONFIG2 0X05 -+ -+#define TPS6507X_REG_CHGCONFIG3 0X06 -+ -+#define TPS6507X_REG_ADCONFIG 0X07 -+#define TPS6507X_ADCONFIG_AD_ENABLE BIT(7) -+#define TPS6507X_ADCONFIG_START_CONVERSION BIT(6) -+#define TPS6507X_ADCONFIG_CONVERSION_DONE BIT(5) -+#define TPS6507X_ADCONFIG_VREF_ENABLE BIT(4) -+#define TPS6507X_ADCONFIG_INPUT_AD_IN1 0 -+#define TPS6507X_ADCONFIG_INPUT_AD_IN2 1 -+#define TPS6507X_ADCONFIG_INPUT_AD_IN3 2 -+#define TPS6507X_ADCONFIG_INPUT_AD_IN4 3 -+#define TPS6507X_ADCONFIG_INPUT_TS_PIN 4 -+#define TPS6507X_ADCONFIG_INPUT_BAT_CURRENT 5 -+#define TPS6507X_ADCONFIG_INPUT_AC_VOLTAGE 6 -+#define TPS6507X_ADCONFIG_INPUT_SYS_VOLTAGE 7 -+#define TPS6507X_ADCONFIG_INPUT_CHARGER_VOLTAGE 8 -+#define TPS6507X_ADCONFIG_INPUT_BAT_VOLTAGE 9 -+#define TPS6507X_ADCONFIG_INPUT_THRESHOLD_VOLTAGE 10 -+#define TPS6507X_ADCONFIG_INPUT_ISET1_VOLTAGE 11 -+#define TPS6507X_ADCONFIG_INPUT_ISET2_VOLTAGE 12 -+#define TPS6507X_ADCONFIG_INPUT_REAL_TSC 14 -+#define TPS6507X_ADCONFIG_INPUT_TSC 15 -+ -+#define TPS6507X_REG_TSCMODE 0X08 -+#define TPS6507X_TSCMODE_X_POSITION 0 -+#define TPS6507X_TSCMODE_Y_POSITION 1 -+#define TPS6507X_TSCMODE_PRESSURE 2 -+#define TPS6507X_TSCMODE_X_PLATE 3 -+#define TPS6507X_TSCMODE_Y_PLATE 4 -+#define TPS6507X_TSCMODE_STANDBY 5 -+#define TPS6507X_TSCMODE_ADC_INPUT 6 -+#define TPS6507X_TSCMODE_DISABLE 7 -+ -+#define TPS6507X_REG_ADRESULT_1 0X09 -+ -+#define TPS6507X_REG_ADRESULT_2 0X0A -+#define TPS6507X_REG_ADRESULT_2_MASK (BIT(1) | BIT(0)) -+ -+#define TPS6507X_REG_PGOOD 0X0B -+ -+#define TPS6507X_REG_PGOODMASK 0X0C -+ -+#define TPS6507X_REG_CON_CTRL1 0X0D -+#define TPS6507X_CON_CTRL1_DCDC1_ENABLE BIT(4) -+#define TPS6507X_CON_CTRL1_DCDC2_ENABLE BIT(3) -+#define TPS6507X_CON_CTRL1_DCDC3_ENABLE BIT(2) -+#define TPS6507X_CON_CTRL1_LDO1_ENABLE BIT(1) -+#define TPS6507X_CON_CTRL1_LDO2_ENABLE BIT(0) -+ -+#define TPS6507X_REG_CON_CTRL2 0X0E -+ -+#define TPS6507X_REG_CON_CTRL3 0X0F -+ -+#define TPS6507X_REG_DEFDCDC1 0X10 -+#define TPS6507X_DEFDCDC1_DCDC1_EXT_ADJ_EN BIT(7) -+#define TPS6507X_DEFDCDC1_DCDC1_MASK 0X3F -+ -+#define TPS6507X_REG_DEFDCDC2_LOW 0X11 -+#define TPS6507X_DEFDCDC2_LOW_DCDC2_MASK 0X3F -+ -+#define TPS6507X_REG_DEFDCDC2_HIGH 0X12 -+#define TPS6507X_DEFDCDC2_HIGH_DCDC2_MASK 0X3F -+ -+#define TPS6507X_REG_DEFDCDC3_LOW 0X13 -+#define TPS6507X_DEFDCDC3_LOW_DCDC3_MASK 0X3F -+ -+#define TPS6507X_REG_DEFDCDC3_HIGH 0X14 -+#define TPS6507X_DEFDCDC3_HIGH_DCDC3_MASK 0X3F -+ -+#define TPS6507X_REG_DEFSLEW 0X15 -+ -+#define TPS6507X_REG_LDO_CTRL1 0X16 -+#define TPS6507X_REG_LDO_CTRL1_LDO1_MASK 0X0F -+ -+#define TPS6507X_REG_DEFLDO2 0X17 -+#define TPS6507X_REG_DEFLDO2_LDO2_MASK 0X3F -+ -+#define TPS6507X_REG_WLED_CTRL1 0X18 -+ -+#define TPS6507X_REG_WLED_CTRL2 0X19 -+ -+/* VDCDC MASK */ -+#define TPS6507X_DEFDCDCX_DCDC_MASK 0X3F -+ -+#endif /* __LINUX_MFD_TPS6507X_H */ diff --git a/recipes/linux/linux-davinci/0002-DefDcDcTiedhigh.patch b/recipes/linux/linux-davinci/0002-DefDcDcTiedhigh.patch deleted file mode 100644 index ff60c41fff..0000000000 --- a/recipes/linux/linux-davinci/0002-DefDcDcTiedhigh.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Sekhar Nori <nsekhar@ti.com> -Date: Mon, 21 Dec 2009 09:13:49 +0000 (+0530) -Subject: davinci: da850/omap-l138 evm: account for defdcdc{2,3} being tied high -X-Git-Url: http://arago-project.org/git/people/?p=sekhar%2Flinux-omapl1.git;a=commitdiff_plain;h=2aa1058a4db0681929ba09f50da89f4fe283e0bd - -davinci: da850/omap-l138 evm: account for defdcdc{2,3} being tied high - -Per the da850/omap-l138 Beta EVM SOM schematic, the defdcdc2 and -defdcdc3 lines are tied high by default. This leads to a 3.3V IO -and 1.2V CVDD voltage. - -For the TPS6507x driver, it means that the DEFDCDC_HIGH registers -need to be read/written instead of DEFDCDC_LOW register. The tps6507x -driver added this functionality recently. This patch passes the right -platform data to the TPS6507x which tells it that the HIGH register -needs to be read instead of the LOW register. - -Signed-off-by: Sekhar Nori <nsekhar@ti.com> ---- - -diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c -index 607dd2d..9ed07d6 100755 ---- a/arch/arm/mach-davinci/board-da850-evm.c -+++ b/arch/arm/mach-davinci/board-da850-evm.c -@@ -599,6 +599,7 @@ struct regulator_init_data tps65070_regulator_data[] = { - }, - .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc2_consumers), - .consumer_supplies = tps65070_dcdc2_consumers, -+ .driver_data = (void *) 1, - }, - - /* dcdc3 */ -@@ -612,6 +613,7 @@ struct regulator_init_data tps65070_regulator_data[] = { - }, - .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc3_consumers), - .consumer_supplies = tps65070_dcdc3_consumers, -+ .driver_data = (void *) 1, - }, - - /* ldo1 */ diff --git a/recipes/linux/linux-davinci/0002-tps6507x_regulator_da850_integration.patch b/recipes/linux/linux-davinci/0002-tps6507x_regulator_da850_integration.patch deleted file mode 100644 index 56d697d54b..0000000000 --- a/recipes/linux/linux-davinci/0002-tps6507x_regulator_da850_integration.patch +++ /dev/null @@ -1,83 +0,0 @@ -Index: kernel/arch/arm/mach-davinci/board-da850-evm.c -=================================================================== ---- kernel.orig/arch/arm/mach-davinci/board-da850-evm.c 2010-01-26 14:28:12.000000000 -0700 -+++ kernel/arch/arm/mach-davinci/board-da850-evm.c 2010-01-26 14:33:36.000000000 -0700 -@@ -17,6 +17,7 @@ - #include <linux/i2c.h> - #include <linux/i2c/at24.h> - #include <linux/i2c/pca953x.h> -+#include <linux/mfd/tps6507x.h> - #include <linux/gpio.h> - #include <linux/delay.h> - #include <linux/platform_device.h> -@@ -633,10 +634,14 @@ - }, - }; - -+static struct tps6507x_board tps_board = { -+ .tps6507x_pmic_init_data = &tps65070_regulator_data[0], -+}; -+ - static struct i2c_board_info __initdata da850evm_tps65070_info[] = { - { - I2C_BOARD_INFO("tps6507x", 0x48), -- .platform_data = &tps65070_regulator_data[0], -+ .platform_data = &tps_board, - }, - }; - -Index: kernel/drivers/regulator/tps6507x-regulator.c -=================================================================== ---- kernel.orig/drivers/regulator/tps6507x-regulator.c 2010-01-26 14:32:05.000000000 -0700 -+++ kernel/drivers/regulator/tps6507x-regulator.c 2010-01-26 14:33:36.000000000 -0700 -@@ -502,6 +502,7 @@ - struct regulator_init_data *init_data; - struct regulator_dev *rdev; - struct tps_pmic *tps; -+ struct tps6507x_board *tps_board; - int i; - - if (!i2c_check_functionality(client->adapter, -@@ -509,10 +510,21 @@ - return -EIO; - - /** -+ * tps_board points to tps6507x related constants -+ * coming from the board-evm file. -+ */ -+ -+ tps_board = (struct tps6507x_board *)client->dev.platform_data; -+ -+ if (!tps_board) -+ return -EIO; -+ -+ /** - * init_data points to array of regulator_init structures - * coming from the board-evm file. - */ -- init_data = client->dev.platform_data; -+ -+ init_data = tps_board->tps6507x_pmic_init_data; - - if (!init_data) - return -EIO; -Index: kernel/include/linux/mfd/tps6507x.h -=================================================================== ---- kernel.orig/include/linux/mfd/tps6507x.h 2010-01-26 14:32:05.000000000 -0700 -+++ kernel/include/linux/mfd/tps6507x.h 2010-01-26 14:33:36.000000000 -0700 -@@ -131,4 +131,15 @@ - /* VDCDC MASK */ - #define TPS6507X_DEFDCDCX_DCDC_MASK 0X3F - -+/** -+ * struct tps6507x_board - packages regulator and touchscreen init data -+ * @tps6507x_regulator_data: regulator initialization values -+ * -+ * Board data may be used to initialize regulator and touchscreen. -+ */ -+ -+struct tps6507x_board { -+ struct regulator_init_data *tps6507x_pmic_init_data; -+}; -+ - #endif /* __LINUX_MFD_TPS6507X_H */ diff --git a/recipes/linux/linux-davinci/0003-tps6507x_mfd_driver.patch b/recipes/linux/linux-davinci/0003-tps6507x_mfd_driver.patch deleted file mode 100644 index 418d867c63..0000000000 --- a/recipes/linux/linux-davinci/0003-tps6507x_mfd_driver.patch +++ /dev/null @@ -1,260 +0,0 @@ -Index: kernel/drivers/mfd/Kconfig -=================================================================== ---- kernel.orig/drivers/mfd/Kconfig 2010-01-26 14:28:36.000000000 -0700 -+++ kernel/drivers/mfd/Kconfig 2010-01-26 14:33:54.000000000 -0700 -@@ -92,6 +92,17 @@ - This driver can also be built as a module. If so, the module - will be called tps65010. - -+config TPS6507x -+ tristate "TPS6507x Power Management / Touch Screen chips" -+ depends on I2C -+ help -+ If you say yes here you get support for the TPS6507x series of -+ Power Management / Touch Screen chips. These include voltage -+ regulators, lithium ion/polymer battery charging, touch screen -+ and other features that are often used in portable devices. -+ This driver can also be built as a module. If so, the module -+ will be called tps6507x. -+ - config MENELAUS - bool "Texas Instruments TWL92330/Menelaus PM chip" - depends on I2C=y && ARCH_OMAP24XX -Index: kernel/drivers/mfd/Makefile -=================================================================== ---- kernel.orig/drivers/mfd/Makefile 2010-01-26 14:28:36.000000000 -0700 -+++ kernel/drivers/mfd/Makefile 2010-01-26 14:33:54.000000000 -0700 -@@ -24,6 +24,7 @@ - obj-$(CONFIG_MFD_WM8350_I2C) += wm8350-i2c.o - - obj-$(CONFIG_TPS65010) += tps65010.o -+obj-$(CONFIG_TPS6507x) += tps6507x.o - obj-$(CONFIG_MENELAUS) += menelaus.o - - obj-$(CONFIG_TWL4030_CORE) += twl-core.o twl4030-irq.o twl6030-irq.o -Index: kernel/drivers/mfd/tps6507x.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ kernel/drivers/mfd/tps6507x.c 2010-01-26 14:33:54.000000000 -0700 -@@ -0,0 +1,185 @@ -+/* -+ * tps6507x.c -- TPS6507x chip family multi-function driver -+ * -+ * Copyright (c) 2010 RidgeRun (todd.fischer@ridgerun.com) -+ * -+ * Author: Todd Fischer -+ * todd.fischer@ridgerun.com -+ * -+ * Credits: -+ * -+ * Using code from wm8350-i2c.c, Wolfson Microelectronics PLC. -+ * -+ * For licencing details see kernel-base/COPYING -+ * -+ */ -+ -+#include <linux/module.h> -+#include <linux/moduleparam.h> -+#include <linux/init.h> -+#include <linux/i2c.h> -+#include <linux/platform_device.h> -+#include <linux/mfd/tps6507x.h> -+ -+struct tps_sub_devices { -+ const char *name; -+ struct platform_device *pdev; -+}; -+ -+static struct tps_sub_devices tps6507x_sub_devices[] = { -+ { NULL, NULL } -+}; -+ -+static int tps6507x_i2c_read_device(struct tps6507x_dev *tps6507x, char reg, -+ int bytes, void *dest) -+{ -+ int ret; -+ -+ ret = i2c_master_send(tps6507x->i2c_client, ®, 1); -+ if (ret < 0) -+ return ret; -+ ret = i2c_master_recv(tps6507x->i2c_client, dest, bytes); -+ if (ret < 0) -+ return ret; -+ if (ret != bytes) -+ return -EIO; -+ return 0; -+} -+ -+static int tps6507x_i2c_write_device(struct tps6507x_dev *tps6507x, char reg, -+ int bytes, void *src) -+{ -+ /* we add 1 byte for device register */ -+ u8 msg[(TPS6507X_MAX_REGISTER << 1) + 1]; -+ int ret; -+ -+ if (bytes > ((TPS6507X_MAX_REGISTER << 1) + 1)) -+ return -EINVAL; -+ -+ msg[0] = reg; -+ memcpy(&msg[1], src, bytes); -+ ret = i2c_master_send(tps6507x->i2c_client, msg, bytes + 1); -+ if (ret < 0) -+ return ret; -+ if (ret != bytes + 1) -+ return -EIO; -+ return 0; -+} -+ -+/* -+ * Register a client device. This is non-fatal since there is no need to -+ * fail the entire device init due to a single platform device failing. -+ */ -+static void tps6507x_client_dev_register(struct tps6507x_dev *tps6507x, -+ const char *name, -+ struct platform_device **pdev) -+{ -+ int ret; -+ -+ *pdev = platform_device_alloc(name, -1); -+ if (*pdev == NULL) { -+ dev_err(tps6507x->dev, "Failed to allocate %s\n", name); -+ return; -+ } -+ -+ (*pdev)->dev.parent = tps6507x->dev; -+ platform_set_drvdata(*pdev, tps6507x); -+ ret = platform_device_add(*pdev); -+ if (ret != 0) { -+ dev_err(tps6507x->dev, "Failed to register %s: %d\n", name, ret); -+ platform_device_put(*pdev); -+ *pdev = NULL; -+ } -+} -+ -+int tps6507x_device_init(struct tps6507x_dev *tps6507x, int irq, -+ struct tps6507x_board *pdata) -+{ -+ int ret = 0; -+ struct tps_sub_devices *d = &tps6507x_sub_devices[0]; -+ -+ while (d->name) { -+ tps6507x_client_dev_register(tps6507x, d->name, &(d->pdev)); -+ d++; -+ } -+ -+ return ret; -+} -+ -+static int tps6507x_i2c_probe(struct i2c_client *i2c, -+ const struct i2c_device_id *id) -+{ -+ struct tps6507x_dev *tps6507x; -+ int ret = 0; -+ -+ tps6507x = kzalloc(sizeof(struct tps6507x_dev), GFP_KERNEL); -+ if (tps6507x == NULL) { -+ kfree(i2c); -+ return -ENOMEM; -+ } -+ -+ i2c_set_clientdata(i2c, tps6507x); -+ tps6507x->dev = &i2c->dev; -+ tps6507x->i2c_client = i2c; -+ tps6507x->read_dev = tps6507x_i2c_read_device; -+ tps6507x->write_dev = tps6507x_i2c_write_device; -+ mutex_init(&tps6507x->adc_mutex); -+ -+ ret = tps6507x_device_init(tps6507x, i2c->irq, i2c->dev.platform_data); -+ if (ret < 0) -+ goto err; -+ -+ return ret; -+ -+err: -+ kfree(tps6507x); -+ return ret; -+} -+ -+static int tps6507x_i2c_remove(struct i2c_client *i2c) -+{ -+ struct tps6507x_dev *tps6507x = i2c_get_clientdata(i2c); -+ struct tps_sub_devices *d = &tps6507x_sub_devices[0]; -+ -+ while (d->name) { -+ platform_device_unregister(d->pdev); -+ d++; -+ } -+ -+ kfree(tps6507x); -+ -+ return 0; -+} -+ -+static const struct i2c_device_id tps6507x_i2c_id[] = { -+ { "tps6507x", 0 }, -+ { } -+}; -+MODULE_DEVICE_TABLE(i2c, tps6507x_i2c_id); -+ -+ -+static struct i2c_driver tps6507x_i2c_driver = { -+ .driver = { -+ .name = "tps6507x", -+ .owner = THIS_MODULE, -+ }, -+ .probe = tps6507x_i2c_probe, -+ .remove = tps6507x_i2c_remove, -+ .id_table = tps6507x_i2c_id, -+}; -+ -+static int __init tps6507x_i2c_init(void) -+{ -+ return i2c_add_driver(&tps6507x_i2c_driver); -+} -+/* init early so consumer devices can complete system boot */ -+subsys_initcall(tps6507x_i2c_init); -+ -+static void __exit tps6507x_i2c_exit(void) -+{ -+ i2c_del_driver(&tps6507x_i2c_driver); -+} -+module_exit(tps6507x_i2c_exit); -+ -+MODULE_DESCRIPTION("TPS6507x chip family multi-function driver") -+MODULE_LICENSE("GPL"); -Index: kernel/include/linux/mfd/tps6507x.h -=================================================================== ---- kernel.orig/include/linux/mfd/tps6507x.h 2010-01-26 14:33:36.000000000 -0700 -+++ kernel/include/linux/mfd/tps6507x.h 2010-01-26 14:33:54.000000000 -0700 -@@ -131,6 +131,8 @@ - /* VDCDC MASK */ - #define TPS6507X_DEFDCDCX_DCDC_MASK 0X3F - -+#define TPS6507X_MAX_REGISTER 0X19 -+ - /** - * struct tps6507x_board - packages regulator and touchscreen init data - * @tps6507x_regulator_data: regulator initialization values -@@ -142,4 +144,22 @@ - struct regulator_init_data *tps6507x_pmic_init_data; - }; - -+/** -+ * struct tps6507x_dev - tps6507x sub-driver chip access routines -+ * @read_dev() - I2C register read function -+ * @write_dev() - I2C register write function -+ * -+ * Device data may be used to access the TPS6507x chip -+ */ -+ -+struct tps6507x_dev { -+ struct device *dev; -+ struct i2c_client *i2c_client; -+ int (*read_dev)(struct tps6507x_dev *tps6507x, char reg, int size, -+ void *dest); -+ int (*write_dev)(struct tps6507x_dev *tps6507x, char reg, int size, -+ void *src); -+ struct mutex adc_mutex; -+}; -+ - #endif /* __LINUX_MFD_TPS6507X_H */ diff --git a/recipes/linux/linux-davinci/0004-tps6507x_regulator_naming_change.patch b/recipes/linux/linux-davinci/0004-tps6507x_regulator_naming_change.patch deleted file mode 100644 index dfeb67553a..0000000000 --- a/recipes/linux/linux-davinci/0004-tps6507x_regulator_naming_change.patch +++ /dev/null @@ -1,421 +0,0 @@ -Index: kernel/drivers/regulator/tps6507x-regulator.c -=================================================================== ---- kernel.orig/drivers/regulator/tps6507x-regulator.c 2010-01-26 14:33:36.000000000 -0700 -+++ kernel/drivers/regulator/tps6507x-regulator.c 2010-01-26 14:34:00.000000000 -0700 -@@ -113,23 +113,23 @@ - struct mutex io_lock; - }; - --static inline int tps_6507x_read(struct tps_pmic *tps, u8 reg) -+static inline int tps6507x_pmic_read(struct tps_pmic *tps, u8 reg) - { - return i2c_smbus_read_byte_data(tps->client, reg); - } - --static inline int tps_6507x_write(struct tps_pmic *tps, u8 reg, u8 val) -+static inline int tps6507x_pmic_write(struct tps_pmic *tps, u8 reg, u8 val) - { - return i2c_smbus_write_byte_data(tps->client, reg, val); - } - --static int tps_6507x_set_bits(struct tps_pmic *tps, u8 reg, u8 mask) -+static int tps6507x_pmic_set_bits(struct tps_pmic *tps, u8 reg, u8 mask) - { - int err, data; - - mutex_lock(&tps->io_lock); - -- data = tps_6507x_read(tps, reg); -+ data = tps6507x_pmic_read(tps, reg); - if (data < 0) { - dev_err(&tps->client->dev, "Read from reg 0x%x failed\n", reg); - err = data; -@@ -137,7 +137,7 @@ - } - - data |= mask; -- err = tps_6507x_write(tps, reg, data); -+ err = tps6507x_pmic_write(tps, reg, data); - if (err) - dev_err(&tps->client->dev, "Write for reg 0x%x failed\n", reg); - -@@ -146,13 +146,13 @@ - return err; - } - --static int tps_6507x_clear_bits(struct tps_pmic *tps, u8 reg, u8 mask) -+static int tps6507x_pmic_clear_bits(struct tps_pmic *tps, u8 reg, u8 mask) - { - int err, data; - - mutex_lock(&tps->io_lock); - -- data = tps_6507x_read(tps, reg); -+ data = tps6507x_pmic_read(tps, reg); - if (data < 0) { - dev_err(&tps->client->dev, "Read from reg 0x%x failed\n", reg); - err = data; -@@ -160,7 +160,7 @@ - } - - data &= ~mask; -- err = tps_6507x_write(tps, reg, data); -+ err = tps6507x_pmic_write(tps, reg, data); - if (err) - dev_err(&tps->client->dev, "Write for reg 0x%x failed\n", reg); - -@@ -169,13 +169,13 @@ - return err; - } - --static int tps_6507x_reg_read(struct tps_pmic *tps, u8 reg) -+static int tps6507x_pmic_reg_read(struct tps_pmic *tps, u8 reg) - { - int data; - - mutex_lock(&tps->io_lock); - -- data = tps_6507x_read(tps, reg); -+ data = tps6507x_pmic_read(tps, reg); - if (data < 0) - dev_err(&tps->client->dev, "Read from reg 0x%x failed\n", reg); - -@@ -183,13 +183,13 @@ - return data; - } - --static int tps_6507x_reg_write(struct tps_pmic *tps, u8 reg, u8 val) -+static int tps6507x_pmic_reg_write(struct tps_pmic *tps, u8 reg, u8 val) - { - int err; - - mutex_lock(&tps->io_lock); - -- err = tps_6507x_write(tps, reg, val); -+ err = tps6507x_pmic_write(tps, reg, val); - if (err < 0) - dev_err(&tps->client->dev, "Write for reg 0x%x failed\n", reg); - -@@ -197,7 +197,7 @@ - return err; - } - --static int tps6507x_dcdc_is_enabled(struct regulator_dev *dev) -+static int tps6507x_pmic_dcdc_is_enabled(struct regulator_dev *dev) |
