diff options
| -rw-r--r-- | arch/arm/boot/dts/omap3_h1.dts | 22 | ||||
| -rw-r--r-- | drivers/mfd/tps65910.c | 26 | 
2 files changed, 42 insertions, 6 deletions
| diff --git a/arch/arm/boot/dts/omap3_h1.dts b/arch/arm/boot/dts/omap3_h1.dts index af587d7f57f..a3e92d76f1f 100644 --- a/arch/arm/boot/dts/omap3_h1.dts +++ b/arch/arm/boot/dts/omap3_h1.dts @@ -100,7 +100,7 @@  		/* listed below will be reported as the wakeup reason */  		/*                                                    */  		/*             off  IRQ handle                        */ -		ti,pad_irq = <0x16e  90  1>, /* uart3 - serial rx     */ +		ti,pad_irq = <0x16e  90  0>, /* uart3 - serial rx     */                       <0x9f6  143 1>, /* mpu6515 irq pin - is this offset correct?      */                       <0x9f4  123 1>, /* BT host wake          */                       <0x1b0  23  1>; /* sys_nirq              */ @@ -109,6 +109,7 @@  	sound {  		compatible = "olio,omap-soc-omap3h1";  		olio,mcbsp = <&mcbsp3>; +		olio,mic_enable = <&gpio5 18 0>;  	};  }; @@ -131,7 +132,7 @@  	sys_off_mode;  	auto_off;  	auto_retention; -	offmodesetup_time = <3500>; +	offmodesetup_time = <6000>;  	clksetup_time = <1000>;  }; @@ -182,7 +183,7 @@  			0x0dc 0x004	/* CAM_HS, MODE4 | OUTPUT */ -                              /* USB */ +            /* USB */              0x172 0x100 /* HSUSB0_CLK,   (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)  */              0x174 0x000 /* HSUSB0_STP,   (OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT) */ @@ -206,7 +207,7 @@              0x0da 0x1604 /* DSS_DATA23, (IDIS | PI | M4 ) */              /* UART3 pins */ -            0x16e 0x4100  /* RX, input, off wake up   */ +            0x16e 0x100  /* RX, input, off wake up   */              0x170 0x000  /* TX, output */                  /* GPIO146, aka UART2TX, aka Microphone enable */ @@ -220,6 +221,14 @@               but this location makes it not function as an interrupt... ??? */              /* 0x9f6 0x4104 */    /* JTAG_EMU1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT |                                        OMAP_PIN_OFF_WAKEUPENABLE */ + +            /* UART 1 needs to be in safe mode for FCC tests */ +                              /* +                               0x14c 0x007 +                               0x14e 0x007 +                               0x150 0x007 +                               0x152 0x007 +                               */  	    >;  	}; @@ -306,6 +315,7 @@  	regulators {  		vrtc_reg: regulator@0 {  			regulator-always-on; +			ti,regulator-ext-sleep-control = <8>;  		};          /* DSS is on this one */ @@ -328,7 +338,7 @@  		    regulator-name = "vdd_mpu_iva";	              regulator-min-microvolt = <900000>;  			regulator-max-microvolt = <1350000>; -			/* ti,regulator-ext-sleep-control = <8>; */ +			ti,regulator-ext-sleep-control = <8>;  		};  		vdd2_reg: regulator@3 { @@ -341,7 +351,7 @@  			regulator-name = "vdd_core";  			regulator-min-microvolt = <900000>;  			regulator-max-microvolt = <1200000>; -			/* ti,regulator-ext-sleep-control = <8>; */ +			ti,regulator-ext-sleep-control = <8>;  		};        /* not used, I think */ diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c index 15f2c8dea2f..dbf85fc07d2 100644 --- a/drivers/mfd/tps65910.c +++ b/drivers/mfd/tps65910.c @@ -26,6 +26,7 @@  #include <linux/regmap.h>  #include <linux/mfd/tps65910.h>  #include <linux/of_device.h> +#include <linux/suspend.h>  static struct resource rtc_resources[] = {  	{ @@ -225,6 +226,29 @@ static struct regmap_irq_chip tps65910_irq_chip = {  	.ack_base = TPS65910_INT_STS,  }; +static int tps65910_irq; + +static int tps65910_irq_pm_notifier(struct notifier_block *notifier, +				    unsigned long pm_event, void *unused) +{ +	switch (pm_event) { +	case PM_SUSPEND_PREPARE: +		disable_irq(tps65910_irq); +		break; +	case PM_POST_SUSPEND: +		enable_irq(tps65910_irq); +		break; +	default: +		break; +	} + +	return NOTIFY_DONE; +} + +static struct notifier_block tps65910_irq_pm_notifier_block = { +	.notifier_call = tps65910_irq_pm_notifier, +}; +  static int tps65910_irq_init(struct tps65910 *tps65910, int irq,  		    struct tps65910_platform_data *pdata)  { @@ -251,6 +275,8 @@ static int tps65910_irq_init(struct tps65910 *tps65910, int irq,  	}  	tps65910->chip_irq = irq; +	tps65910_irq = irq; +	register_pm_notifier(&tps65910_irq_pm_notifier_block);  	ret = regmap_add_irq_chip(tps65910->regmap, tps65910->chip_irq,  		IRQF_ONESHOT, pdata->irq_base,  		tps6591x_irqs_chip, &tps65910->irq_data); |