diff options
| author | Evan Wilson <evan@oliodevices.com> | 2015-12-11 16:55:48 -0800 |
|---|---|---|
| committer | Evan Wilson <evan@oliodevices.com> | 2015-12-11 16:55:48 -0800 |
| commit | 606779d73f51a0ebe81f691bd7c173fc1740be24 (patch) | |
| tree | 42e68bd40f3a375dfbb5ba940c6de9b4591f9016 | |
| parent | b6602fe7788593d7c5e02ae7bb5616ebc6f63f2c (diff) | |
| parent | b258e74fe4251438954e0fc08575f4b15ab35605 (diff) | |
| download | olio-linux-3.10-606779d73f51a0ebe81f691bd7c173fc1740be24.tar.xz olio-linux-3.10-606779d73f51a0ebe81f691bd7c173fc1740be24.zip | |
Merge remote-tracking branch 'olio/android-3.10-bringup' into 1.1.45
Conflicts:
drivers/iio/imu/st_lsm6ds3/st_lsm6ds3_core.c
drivers/iio/imu/st_lsm6ds3/st_lsm6ds3_trigger.c
drivers/power/bq27x00_battery.c
Change-Id: Iafb1129617680cd2705bc05eb49faaafff325692
| -rw-r--r-- | arch/arm/boot/dts/omap3.dtsi | 9 | ||||
| -rw-r--r-- | arch/arm/boot/dts/omap3_h1.dts | 152 | ||||
| -rw-r--r-- | arch/arm/configs/omap3_h1_defconfig | 21 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3h1.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/opp.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/opp3xxx_data.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/pm.c | 13 | ||||
| -rw-r--r-- | drivers/cpufreq/omap-cpufreq.c | 7 | ||||
| -rw-r--r-- | drivers/leds/leds-lm3530.c | 6 | ||||
| -rw-r--r-- | drivers/mfd/tps65910.c | 21 | ||||
| -rw-r--r-- | drivers/power/bq27x00_battery.c | 1 | ||||
| -rw-r--r-- | drivers/video/omap2/omapfb/omapfb-main.c | 31 |
12 files changed, 195 insertions, 74 deletions
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index cae4e9725d0..36a93cc41c0 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -208,7 +208,7 @@ <&omap3_pmx_core 26 0xd9 1>, <&omap3_pmx_core 28 0xc1 4>; }; -/* + /* uart1: serial@4806a000 { compatible = "ti,omap3-uart"; ti,hwmods = "uart1"; @@ -225,7 +225,8 @@ compatible = "ti,omap3-uart"; ti,hwmods = "uart3"; clock-frequency = <48000000>; - }; */ + }; + */ i2c1: i2c@48070000 { compatible = "ti,omap3-i2c"; @@ -266,7 +267,7 @@ dma-names = "tx0", "rx0", "tx1", "rx1", "tx2", "rx2", "tx3", "rx3"; }; - /* + mcspi2: spi@4809a000 { compatible = "ti,omap2-mcspi"; #address-cells = <1>; @@ -302,7 +303,7 @@ dmas = <&sdma 70>, <&sdma 71>; dma-names = "tx0", "rx0"; }; - */ + mmc1: mmc@4809c000 { compatible = "ti,omap3-hsmmc"; ti,hwmods = "mmc1"; diff --git a/arch/arm/boot/dts/omap3_h1.dts b/arch/arm/boot/dts/omap3_h1.dts index ab2a48631e4..72f1bf0f11b 100644 --- a/arch/arm/boot/dts/omap3_h1.dts +++ b/arch/arm/boot/dts/omap3_h1.dts @@ -20,11 +20,10 @@ cpu@0 { device_type = "cpu"; operating-points = < - /* kHz uV */ - 300000 975000 - 600000 1150000 - 800000 1275000 - /* 1000000 1337500 */ + /* kHz uV (from opp3xxx_data.c) */ + 300000 1012500 + 600000 1200000 + 800000 1325000 >; cpu0-supply = <&omap_tps65910>; /* OPP tolerance in percentage */ @@ -41,6 +40,13 @@ regulator-boot-on; }; + /* omap_pimic is used by the omap-pmic-regulator driver - a + * generic framework for omap interfacing with i2c drivers, based + * on the TWL framework. + * + * This is the two regulators needed by the AM3603. + */ + omap_pimic { omap_tps65910: omap_vdd1 { compatible = "ti,omap-tps65910-vdd1"; @@ -54,7 +60,7 @@ ti,vp = <&vp_core>; }; }; - + pad-wkup { /* on omap, the irqs are calculated as follows: * for the 96 intc IRQs @@ -75,6 +81,7 @@ /* listed below will be reported as the wakeup reason */ /* */ /* off IRQ handle */ + ti,pad_irq = <0x150 88 1>, /* 72 + 16, uart1 - BT input */ <0x9f6 143 1>, /* mpu6515 irq pin - is this offset correct? */ <0x9ea 122 1>, /* bq27400 chg irq8 */ @@ -92,13 +99,15 @@ &vc { ti,i2c-high-speed; ti,i2c-pad-load = <3>; - vc_mpu{ + + vc_mpu { ti,master-channel; }; - vc_core{ + vc_core { ti,use-master-slave-addr; }; + }; &glbl_prm { @@ -149,13 +158,14 @@ 0x1a0 0x000 /* MCSPI1_CS1, MODE0 | OUTPUT */ /* CKE pin for memory */ - 0x232 0x000 /* SDRC_CKE0, MODE0 | OUTPUT */ - 0x234 0x000 /* SDRC_CKE1, MODE0 | OUTPUT */ + 0x232 0x000 /* SDRC_CKE0, MODE0 | OUTPUT */ + 0x234 0x000 /* SDRC_CKE1, MODE0 | OUTPUT */ /* touch reset */ 0x0f2 0x11c /* CAM_D6, MODE4 | INPUT_PULLUP */ - 0x1b0 0xc100 /* SYS_NIRQ, MODE0 | INPUT | OFFWAKEUP */ + 0x5ba 0x004 /* ETK_D7, MODE4 | OUTPUT (from GL susp) */ + 0x1b0 0xc100 /* SYS_NIRQ, MODE0 | INPUT | OFFWAKEUP */ 0x0dc 0x004 /* CAM_HS, MODE4 | OUTPUT */ @@ -214,15 +224,28 @@ >; }; + /* + i2c1_pins: pinmux_i2c1_pins { + pinctrl-single,pins = < + 0x18a 0x118 */ /* I2C1_SCL, MODE0 | INPUT_PULLUP */ + /* 0x18c 0x118 */ /* I2C1_SCA, MODE0 | INPUT_PULLUP */ + /* >; + }; + */ + i2c1_pins: pinmux_i2c1_pins { pinctrl-single,pins = < - 0x18a 0x118 /* I2C1_SCL, MODE0 | INPUT_PULLUP */ - 0x18c 0x118 /* I2C1_SCA, MODE0 | INPUT_PULLUP */ + 0x188 0x118 /* I2C1_SCL, MODE0 | INPUT_PULLUP */ + 0x18c 0x118 /* I2C1_SCL, MODE0 | INPUT_PULLUP */ >; }; - - + i2c2_pins: pinmux_i2c2_pins { + pinctrl-single,pins = < + 0x18e 0x118 /* I2C2_SCL, MODE0 | INPUT_PULLUP */ + 0x190 0x118 /* I2C2_SDA, MODE0 | INPUT_PULLUP */ + >; + }; }; &omap3_pmx_wkup { /* pinmux@0x48002a00 */ @@ -233,6 +256,7 @@ pinctrl-single,pins = < 0x006 0x008 /* SYS_CLKREQ, MODE0 | PULLDOWN */ 0x018 0x000 /* SYS_OFF_MODE, MODE0 */ + /* Fuel gauge interrupt */ 0x01a 0x4104 /* SYS_CLKOUT1, MODE4 | OMAP_PIN_INPUT */ @@ -272,13 +296,23 @@ interrupts = <7>; /* SYS_NIRQ */ interrupt-parent = <&intc>; - #interrupt-cells = <2>; +#interrupt-cells = <2>; interrupt-controller; + /* This is from HEAD */ + /* ti,en-ck32k-xtal; */ + + /* set SR_CTL_I2C_SEL - access to smartreflex registers by control i2c */ + /* ti,system-power-controller; */ + + /* This is from GL's suspend branch */ + /* crystal oscillator is installed on the board */ + ti,en-ck32k-xtal; ti,en-dev-slp; ti,sleepsig-pol; ti,clkout32k-keepon; + /* set SR_CTL_I2C_SEL - access to smartreflex registers by control i2c */ ti,system-power-controller; @@ -292,88 +326,95 @@ vccio-supply = <&vbat>; regulators { - vrtc_reg: regulator@0 { + vrtc_reg: regulator@0 { regulator-always-on; ti,regulator-ext-sleep-control = <8>; }; - /* DSS is on this one */ - vio_reg: regulator@1 { - regulator-name = "vdds_dsi"; + /* DSS is on this one (and much else) */ + vio_reg: regulator@1 { + regulator-name = "vdds_dsi"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; }; - /* Leave one and two on for reliable wake-up */ - - vdd1_reg: regulator@2 { + /* Leave one and two on for reliable wake-up */ + vdd1_reg: regulator@2 { /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ /* - regulator-boot-on; - regulator-always-on; + regulator-boot-on; + regulator-always-on; */ /* external sleep control by means of SYS_OFF_MODE signal */ - regulator-name = "vdd_mpu_iva"; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <1350000>; + /* regulator-name = "vdd_mpu_iva"; */ + regulator-name = "vdd_mpu_iva"; + regulator-min-microvolt = <975000>; + regulator-max-microvolt = <1275000>; + ti,regulator-ext-sleep-control = <8>; }; - vdd2_reg: regulator@3 { + vdd2_reg: regulator@3 { /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ /* - regulator-boot-on; - regulator-always-on; + + regulator-name = "vdd_core"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1200000>; + + regulator-boot-on; + regulator-always-on; */ /* external sleep control by means of SYS_OFF_MODE signal */ + regulator-name = "vdd_core"; regulator-min-microvolt = <900000>; regulator-max-microvolt = <1200000>; ti,regulator-ext-sleep-control = <8>; }; - /* not used, I think */ - vdd3_reg: regulator@4 { - status = "disabled"; + /* not used, I think */ + vdd3_reg: regulator@4 { + status = "disabled"; ti,regulator-ext-sleep-control = <8>; }; - /* This is the accelerometer. We always want it on. */ - vdig1_reg: regulator@5 { + /* This is the accelerometer. We always want it on. */ + vdig1_reg: regulator@5 { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; - regulator-always-on; + regulator-always-on; }; /* vdig2_reg: regulator@6 {}; unused */ - vdig2_reg: regulator@6 { + vdig2_reg: regulator@6 { status = "disabled"; ti,regulator-ext-sleep-control = <8>; }; - /* Nobody is explicitly using this rail, but it seems like it goes to - * VDDA_DPLL_PER on the chip. So we need it. - */ - vpll_reg: regulator@7 { + /* Nobody is explicitly using this rail, but it seems like + * it goes to VDDA_DPLL_PER on the chip. So we need it. + */ + vpll_reg: regulator@7 { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; ti,regulator-ext-sleep-control = <8>; }; /* vdac_reg: regulator@8 {}; unused */ - vdac_reg: regulator@8 { + vdac_reg: regulator@8 { status = "disabled"; ti,regulator-ext-sleep-control = <8>; }; - vaux1_reg: regulator@9 { /* not used, 2.85V by default */ - status = "disabled"; + vaux1_reg: regulator@9 { /* not used, 2.85V by default */ + status = "disabled"; ti,regulator-ext-sleep-control = <8>; }; - vaux2_reg: regulator@10 { - regulator-name = "vaux2"; + vaux2_reg: regulator@10 { + regulator-name = "vaux2"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; @@ -382,25 +423,26 @@ /* This is Bluetooth - never turn it off */ - vaux33_reg: regulator@11 { - regulator-name = "vaux33"; + vaux33_reg: regulator@11 { + regulator-name = "vaux33"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; /* ti,regulator-ext-sleep-control = <8>; */ }; - /* This one goes to both SPI (for DSS) and touch. How can I - * specify two consumers in DT? (vdd for dss, avdd for touch). - */ - vmmc_reg: regulator@12 { + /* This one goes to both SPI (for DSS) and touch. How can I + * specify two consumers in DT? (vdd for dss, avdd for touch). + */ + vmmc_reg: regulator@12 { + regulator-name = "avdd"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; /*ti,regulator-ext-sleep-control = <8>;*/ }; }; -}; + }; /* leave gpio bank interface clocks on during suspend @@ -441,5 +483,3 @@ &mmc3 { status = "disabled"; }; - - diff --git a/arch/arm/configs/omap3_h1_defconfig b/arch/arm/configs/omap3_h1_defconfig index 49c06ba4cec..a71a3d77132 100644 --- a/arch/arm/configs/omap3_h1_defconfig +++ b/arch/arm/configs/omap3_h1_defconfig @@ -481,7 +481,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_GOV_USERSPACE=y # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set CONFIG_GENERIC_CPUFREQ_CPU0=y @@ -1719,7 +1719,7 @@ CONFIG_MFD_TPS65910=y # CONFIG_MFD_WM8994 is not set CONFIG_REGULATOR=y CONFIG_REGULATOR_DEBUG=y -CONFIG_REGULATOR_DUMMY=y +# CONFIG_REGULATOR_DUMMY is not set CONFIG_REGULATOR_FIXED_VOLTAGE=y # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set @@ -1816,6 +1816,8 @@ CONFIG_PANEL_ILI_9342=y # CONFIG_BACKLIGHT_LCD_SUPPORT is not set # CONFIG_ADF is not set CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y # CONFIG_FB_SSD1307 is not set CONFIG_SOUND=y @@ -2765,6 +2767,21 @@ CONFIG_HAVE_ARCH_KGDB=y # CONFIG_DEBUG_USER is not set # CONFIG_DEBUG_RODATA is not set # CONFIG_DEBUG_LL is not set +# CONFIG_DEBUG_OMAP2PLUS_UART is not set +# CONFIG_DEBUG_ICEDCC is not set +# CONFIG_DEBUG_SEMIHOSTING is not set +# CONFIG_DEBUG_OMAP2UART1 is not set +# CONFIG_DEBUG_OMAP2UART2 is not set +# CONFIG_DEBUG_OMAP2UART3 is not set +# CONFIG_DEBUG_OMAP3UART3 is not set +# CONFIG_DEBUG_OMAP4UART3 is not set +# CONFIG_DEBUG_OMAP3UART4 is not set +# CONFIG_DEBUG_OMAP4UART4 is not set +# CONFIG_DEBUG_TI81XXUART1 is not set +# CONFIG_DEBUG_TI81XXUART2 is not set +# CONFIG_DEBUG_TI81XXUART3 is not set +# CONFIG_DEBUG_AM33XXUART1 is not set +# CONFIG_DEBUG_ZOOM_UART is not set CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" # CONFIG_PID_IN_CONTEXTIDR is not set diff --git a/arch/arm/mach-omap2/board-omap3h1.c b/arch/arm/mach-omap2/board-omap3h1.c index 14a0008d0b9..ad40bd6d90e 100644 --- a/arch/arm/mach-omap2/board-omap3h1.c +++ b/arch/arm/mach-omap2/board-omap3h1.c @@ -91,6 +91,7 @@ #define LCD_RESET_GPIO 122 #endif + #define BACKLIGHT_PWM_GPIO 128 static struct of_device_id omap_dt_match_table[] __initdata = { @@ -269,7 +270,7 @@ static struct omap_musb_board_data musb_board_data = { static struct nop_usb_xceiv_platform_data nop_plat_data = { .type = USB_PHY_TYPE_USB2, .clk_rate = 60000000, /* 60 MHz */ - .needs_vcc = 1, + .needs_vcc = 0, .needs_reset = 0, }; @@ -479,6 +480,7 @@ static struct platform_device *omap3h1_devices[] __initdata = { static void __init omap3_h1_init(void) { + /* Read what we can from the device tree */ of_platform_populate(NULL, omap_dt_match_table, NULL, NULL); diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c index 82fd8c72f75..56e5ad35b17 100644 --- a/arch/arm/mach-omap2/opp.c +++ b/arch/arm/mach-omap2/opp.c @@ -41,8 +41,10 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def, { int i, r; +#ifndef CONFIG_MACH_OMAP3_H1 /* olio has a partial DT */ if (of_have_populated_dt()) return -EINVAL; +#endif if (!opp_def || !opp_def_size) { pr_err("%s: invalid params!\n", __func__); diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c index f715f6ffd1d..fcede945353 100644 --- a/arch/arm/mach-omap2/opp3xxx_data.c +++ b/arch/arm/mach-omap2/opp3xxx_data.c @@ -196,7 +196,7 @@ int __init omap3_opp_init(void) return r; if (cpu_is_omap3630()) -#ifdef CONFIG_MACH_OMAP3_H1_DVT2 +#ifdef CONFIG_MACH_OMAP3_H1 r = omap_init_opp_table(omap36xx_olioh1_opp_def_list, ARRAY_SIZE(omap36xx_olioh1_opp_def_list)); #else diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index b06b22c3f64..a6c441842cc 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -276,13 +276,20 @@ static inline void omap_init_cpufreq(void) devinfo.name = "omap-cpufreq"; else devinfo.name = "cpufreq-cpu0"; + + /* OLIO test - we want to use the omap driver. + * Will hardcoding this work? - YES, it does. + */ + devinfo.name = "omap-cpufreq"; + platform_device_register_full(&devinfo); } static int __init omap2_common_pm_init(void) { - if (!of_have_populated_dt()) - omap2_init_processor_devices(); + /* if (!of_have_populated_dt()) OLIO TEST */ + omap2_init_processor_devices(); + omap_pm_if_init(); return 0; @@ -296,6 +303,7 @@ int __init omap2_common_pm_late_init(void) * a completely different mechanism. * Disable this part if a DT blob is available. */ + if (!of_have_populated_dt()) { /* Init the voltage layer */ @@ -308,7 +316,6 @@ int __init omap2_common_pm_late_init(void) /* Smartreflex device init */ omap_devinit_smartreflex(); - } else { struct device_node *np; np = of_find_node_by_name(NULL, "omap_pimic"); diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c index 0279d18a57f..3bdb1d9c786 100644 --- a/drivers/cpufreq/omap-cpufreq.c +++ b/drivers/cpufreq/omap-cpufreq.c @@ -246,16 +246,19 @@ static struct cpufreq_driver omap_driver = { static int omap_cpufreq_probe(struct platform_device *pdev) { + printk ("%s: OLIO: Entered\n", __FUNCTION__); + mpu_dev = get_cpu_device(0); if (!mpu_dev) { pr_warning("%s: unable to get the mpu device\n", __func__); return -EINVAL; } - mpu_reg = regulator_get(mpu_dev, "vcc"); + mpu_reg = regulator_get(mpu_dev, "vdd_mpu_iva"); /* OLIO: Orig "vcc" */ if (IS_ERR(mpu_reg)) { - pr_warning("%s: unable to get MPU regulator\n", __func__); + pr_warning("%s: unable to get MPU regulator, will try again in a bit\n", __func__); mpu_reg = NULL; + return -EPROBE_DEFER; } else { /* * Ensure physical regulator is present. diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c index fda0efb4f88..89499d369ea 100644 --- a/drivers/leds/leds-lm3530.c +++ b/drivers/leds/leds-lm3530.c @@ -449,7 +449,11 @@ static int lm3530_probe(struct i2c_client *client, i2c_set_clientdata(client, drvdata); - drvdata->regulator = devm_regulator_get(&client->dev, "vin"); + /* OLIO: The regulator name should be passed through the platform_data + * structure. Fixme. + */ + + drvdata->regulator = devm_regulator_get(&client->dev, "vdds_dsi"); if (IS_ERR(drvdata->regulator)) { dev_err(&client->dev, "regulator get failed\n"); err = PTR_ERR(drvdata->regulator); diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c index 1e7ef2a2e35..0e0412b3bfb 100644 --- a/drivers/mfd/tps65910.c +++ b/drivers/mfd/tps65910.c @@ -363,8 +363,13 @@ static int tps65910_sleepinit(struct tps65910 *tps65910, dev = tps65910->dev; - if (!pmic_pdata->en_dev_slp) - return 0; + /* set polarity of SLLEEPSIG requst ot enter OFF mode */ + ret = tps65910_reg_set_bits(tps65910, TPS65910_DEVCTRL2, + DEVCTRL2_SLEEPSIG_POL_MASK); + if (ret < 0) { + dev_err(dev, "set sleepsig_pol failed: %d\n", ret); + goto err_sleep_init; + } /* * set polarity of SLLEEPSIG requst to enter OFF mode @@ -385,6 +390,18 @@ static int tps65910_sleepinit(struct tps65910 *tps65910, goto err_sleep_init; } + ret = tps65910_reg_set_bits(tps65910, TPS65910_SLEEP_KEEP_RES_ON, + SLEEP_KEEP_RES_ON_CLKOUT32K_KEEPON_MASK); + if (ret < 0) { + dev_err(dev, "set sleep_keep_res_on failed: %d\n", ret); + goto err_sleep_init; + } + +/* Return if there is no sleep keepon data. */ +/* This can't really happen... */ +/* if (pmic_pdata.slp_keepon) */ +/* return 0; */ + if (pmic_pdata->slp_keepon.therm_keepon) { ret = tps65910_reg_set_bits(tps65910, TPS65910_SLEEP_KEEP_RES_ON, diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c index 646ed08b95c..c26859a2f84 100644 --- a/drivers/power/bq27x00_battery.c +++ b/drivers/power/bq27x00_battery.c @@ -1430,6 +1430,7 @@ static irqreturn_t bq27x00_chg_isr(int irq, void *dev) { wake_lock_timeout(&chg_wake_lock, msecs_to_jiffies(500)); /* dev_dbg(ps->dev, "%s: Updating battery status\n", __func__); Don't do i/o in interrupt! */ + bq27x00_external_power_changed(ps); return IRQ_HANDLED; diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 13733c8bb1b..98c645429bd 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -2640,8 +2640,8 @@ static int omapfb_probe(struct platform_device *pdev) r = omapfb_init_display(fbdev, def_display); if (r) { dev_err(fbdev->dev, - "failed to initialize default " - "display\n"); + "failed to initialize default " + "display\n"); goto cleanup; } } @@ -2687,9 +2687,36 @@ static int __exit omapfb_remove(struct platform_device *pdev) return 0; } +/* Need to add suspend / wake pair of functions here. + * All we really need is for the suspend function to clear the screen + * to black. + */ + +static int omapfb_suspend (struct platform_device * pdev, pm_message_t state) +{ + struct omapfb2_device *fbdev = platform_get_drvdata(pdev); + struct fb_info * fbi; + + fbi = fbdev->fbs[0]; + + if (fbi != NULL) + omapfb_clear_fb(fbi); + + return 0; +} + +static int omapfb_resume (struct platform_device * pdev) +{ + /* No need to do anything, I think */ + + return 0; +} + static struct platform_driver omapfb_driver = { .probe = omapfb_probe, .remove = __exit_p(omapfb_remove), + .suspend = omapfb_suspend, + .resume = omapfb_resume, .driver = { .name = "omapfb", .owner = THIS_MODULE, |