diff options
| -rw-r--r-- | arch/arm/boot/dts/omap3_h1.dts | 5 | ||||
| -rw-r--r-- | drivers/mfd/tps65910.c | 8 | ||||
| -rw-r--r-- | drivers/rtc/rtc-tps65910.c | 20 | 
3 files changed, 22 insertions, 11 deletions
| diff --git a/arch/arm/boot/dts/omap3_h1.dts b/arch/arm/boot/dts/omap3_h1.dts index 7c3b4ebd314..41b52faec8e 100644 --- a/arch/arm/boot/dts/omap3_h1.dts +++ b/arch/arm/boot/dts/omap3_h1.dts @@ -101,7 +101,7 @@  			<0x9f6  143 1>, /* mpu6515 irq pin - is this offset correct?      */  			/* <0x9ea  122 1>, */ /* bq27400 chg irq8 - needed here? */  			<0x9f4  123 1>, /* BT host wake          */ -			<0x1b0  23  1>; /* sys_nirq              */ +			<0x1b0  23  1>; /* sys_nirq / gpio 0 - rtc alarm  */  	};  	sound { @@ -181,7 +181,8 @@  			0x0f2 0x11c	/* CAM_D6, MODE4 | INPUT_PULLUP */  			0x5ba 0x004	/* ETK_D7, MODE4 | OUTPUT (from GL susp) */ -			0x1b0 0xc100	/* SYS_NIRQ, MODE0 | INPUT | OFFWAKEUP */ +			                 +			0x1b0 0x4118    /* 0xc100 SYS_NIRQ, MODE0 | INPUT | OFFWAKEUP */  			0x0dc 0x004	/* CAM_HS, MODE4 | OUTPUT */ diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c index 0e0412b3bfb..f40d98b892c 100644 --- a/drivers/mfd/tps65910.c +++ b/drivers/mfd/tps65910.c @@ -226,6 +226,8 @@ static struct regmap_irq_chip tps65910_irq_chip = {  	.ack_base = TPS65910_INT_STS,  }; +#if 0 +  static int tps65910_irq;  static int tps65910_irq_pm_notifier(struct notifier_block *notifier, @@ -249,6 +251,8 @@ static struct notifier_block tps65910_irq_pm_notifier_block = {  	.notifier_call = tps65910_irq_pm_notifier,  }; +#endif +  static int tps65910_irq_init(struct tps65910 *tps65910, int irq,  		    struct tps65910_platform_data *pdata)  { @@ -275,8 +279,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); +	// 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); diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c index 2e4894b4732..c81f14a3ed1 100644 --- a/drivers/rtc/rtc-tps65910.c +++ b/drivers/rtc/rtc-tps65910.c @@ -201,6 +201,12 @@ static irqreturn_t tps65910_rtc_interrupt(int irq, void *rtc)  	u32 rtc_reg;  	wake_lock_timeout(&rtc_wake_lock, msecs_to_jiffies(2000)); +	 +	/* OLIO: The tps65910 manual states that this needs to be  +	 * read twice, to get proper values. +	 */ + +	ret = regmap_read(tps->regmap, TPS65910_RTC_STATUS, &rtc_reg);  	ret = regmap_read(tps->regmap, TPS65910_RTC_STATUS, &rtc_reg);  	if (ret)  		return IRQ_NONE; @@ -247,11 +253,11 @@ static int tps65910_rtc_probe(struct platform_device *pdev)  	/* Clear pending interrupts */  	ret = regmap_read(tps65910->regmap, TPS65910_RTC_STATUS, &rtc_reg);  	if (ret < 0) -      goto fail_end; +		goto fail_end;  	ret = regmap_write(tps65910->regmap, TPS65910_RTC_STATUS, rtc_reg);  	if (ret < 0) -        goto fail_end; +		goto fail_end;  	dev_dbg(&pdev->dev, "Enabling rtc-tps65910.\n"); @@ -259,19 +265,19 @@ static int tps65910_rtc_probe(struct platform_device *pdev)  	ret = regmap_update_bits(tps65910->regmap, TPS65910_DEVCTRL,  		DEVCTRL_RTC_PWDN_MASK, 0 << DEVCTRL_RTC_PWDN_SHIFT);  	if (ret < 0) -        goto fail_end; +		goto fail_end;  	rtc_reg = TPS65910_RTC_CTRL_STOP_RTC;  	ret = regmap_write(tps65910->regmap, TPS65910_RTC_CTRL, rtc_reg);  	if (ret < 0) -        goto fail_end; +		goto fail_end;  	irq  = platform_get_irq(pdev, 0);  	if (irq <= 0) {  		dev_warn(&pdev->dev, "Wake up is not possible as irq = %d\n",                   irq); -        ret = -ENXIO; -        goto fail_end; +		ret = -ENXIO; +		goto fail_end;  	}  	ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, @@ -283,7 +289,7 @@ static int tps65910_rtc_probe(struct platform_device *pdev)  	}  	tps_rtc->irq = irq; -    device_init_wakeup(&pdev->dev, 1); +	device_init_wakeup(&pdev->dev, 1);  	tps_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,  		&tps65910_rtc_ops, THIS_MODULE); |