Re: [PATCH] T2: Remove redundant clear and restore of the COR flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Klaus Pedersen <klaus.k.pedersen@xxxxxxxxx> [080118 09:46]:
> The T2 Clear-On-Read (COR) feature works by clearing all pending 
> irqs when the ISR register is read. It should be needless to say
> that this feature isn't compatible with shared interrupts, unless 
> the value of the ISR is read only once for each interrupt.
> 
> It is therefor safe to assume that COR is not used - because if a
> driver uses the feature, that driver will clear the interrupts
> belonging to other drivers.
> 
> This patch removes the redundant clearing and restoring of the COR
> bit in REG_PWR_SIH_CTRL.
> 
> 
> Signed-off-by: Klaus Pedersen <klaus.k.pedersen@xxxxxxxxx>
> ---
>  drivers/i2c/chips/twl4030_usb.c |    8 --------
>  1 files changed, 0 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/i2c/chips/twl4030_usb.c b/drivers/i2c/chips/twl4030_usb.c
> index 52bb071..b3365f6 100644
> --- a/drivers/i2c/chips/twl4030_usb.c
> +++ b/drivers/i2c/chips/twl4030_usb.c
> @@ -480,12 +480,6 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
>  {
>  	int ret = IRQ_NONE;
>  	u8 val;
> -	u8 sih_ctrl;
> -
> -	/* save previous value of SIH_CTRL and disable clear_on_read */
> -	twl4030_i2c_read_u8(TWL4030_MODULE_INT, &sih_ctrl, REG_PWR_SIH_CTRL);
> -	twl4030_i2c_write_u8(TWL4030_MODULE_INT, (sih_ctrl & ~COR),
> -			     REG_PWR_SIH_CTRL);
>  
>  	if (twl4030_i2c_read_u8(TWL4030_MODULE_INT, &val, REG_PWR_ISR1) < 0) {
>  		printk(KERN_ERR "twl4030_usb: i2c read failed,"
> @@ -515,8 +509,6 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
>  	ret = IRQ_HANDLED;
>  
>  done:
> -	/* restore previous value of SIH_CTRL */
> -	twl4030_i2c_write_u8(TWL4030_MODULE_INT, sih_ctrl, REG_PWR_SIH_CTRL);
>  	return ret;
>  }

Pushing today.

Tony
-
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux