On Tue, 2012-03-20 at 18:45 +0530, mythripk@xxxxxx wrote: > From: Mythri P K <mythripk@xxxxxx> > > Add support for DSS_HDMI interrupt handling in HDMI driver > by registering for the same. This is the path for many necessary HDMI > interrupts such as PLL lock/unlock, PHY connect/disconnet, video frame > done etc. > > Signed-off-by: Mythri P K <mythripk@xxxxxx> > --- > drivers/video/omap2/dss/dss_features.c | 1 + > drivers/video/omap2/dss/hdmi.c | 21 +++++++++++++++++++++ > drivers/video/omap2/dss/ti_hdmi.h | 3 +++ > drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | 13 +++++++++++++ > 4 files changed, 38 insertions(+), 0 deletions(-) > > diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c > index ce14aa6..29c5548 100644 > --- a/drivers/video/omap2/dss/dss_features.c > +++ b/drivers/video/omap2/dss/dss_features.c > @@ -566,6 +566,7 @@ static const struct ti_hdmi_ip_ops omap4_hdmi_functions = { > .dump_core = ti_hdmi_4xxx_core_dump, > .dump_pll = ti_hdmi_4xxx_pll_dump, > .dump_phy = ti_hdmi_4xxx_phy_dump, > + .irq_handle = ti_hdmi_4xxx_intr_handler, > #if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \ > defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE) > .audio_enable = ti_hdmi_4xxx_wp_audio_enable, > diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c > index c4b4f69..14e90b5 100644 > --- a/drivers/video/omap2/dss/hdmi.c > +++ b/drivers/video/omap2/dss/hdmi.c > @@ -67,6 +67,8 @@ static struct { > struct platform_device *pdev; > struct hdmi_ip_data ip_data; > > + int irq; > + spinlock_t irq_lock; > struct clk *sys_clk; > } hdmi; > > @@ -790,6 +792,19 @@ static void hdmi_put_clocks(void) > clk_put(hdmi.sys_clk); > } > > +static irqreturn_t hdmi_irq_handler(int irq, void *arg) > +{ > + unsigned long flags; > + > + spin_lock_irqsave(&hdmi.irq_lock, flags); > + > + hdmi.ip_data.ops->irq_handle(&hdmi.ip_data); > + > + spin_unlock_irqrestore(&hdmi.irq_lock, flags); So what is this spinlock supposed to protect? This is the only place you use it. > + > + return IRQ_HANDLED; > +} I think all this code should be in the ti_hdmi_4xxx_ip.c, as it's dealing with on omap4 hdmi interrupt. Tomi
Attachment:
signature.asc
Description: This is a digitally signed message part