From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [irda-users] [PATCH] OMAP IrDA driver Date: Fri, 5 Dec 2008 12:32:18 -0800 Message-ID: <20081205203216.GJ9714@atomide.com> References: <5d5443650812042234y6301148at6658f4855500b105@mail.gmail.com> <5d5443650812050148n2b3fca72m272a1af33629c478@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mho-01-bos.mailhop.org ([63.208.196.178]:57748 "EHLO mho-01-bos.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752660AbYLEUcX (ORCPT ); Fri, 5 Dec 2008 15:32:23 -0500 Content-Disposition: inline In-Reply-To: <5d5443650812050148n2b3fca72m272a1af33629c478@mail.gmail.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Trilok Soni Cc: samuel@sortiz.org, linux-kernel@vger.kernel.org, irda-users@lists.sourceforge.net, Andrew Morton , linux-omap@vger.kernel.org Hi, Just one comment below. * Trilok Soni [081205 01:48]: > Hi Samuel, > > On Fri, Dec 5, 2008 at 2:58 PM, wrote: > > > > Hi, > > > > On Fri, 5 Dec 2008 12:04:29 +0530, "Trilok Soni" > > wrote: > >> This time adding LKML too. > > Could you please inline the patch so that we can have an easier review ? > > I don't have proper git-send-email integration with gmail, so I am > going to copy/paste this patch here: > diff --git a/drivers/net/irda/omap-ir.c b/drivers/net/irda/omap-ir.c > new file mode 100644 > index 0000000..bf29585 > --- /dev/null > +++ b/drivers/net/irda/omap-ir.c > @@ -0,0 +1,893 @@ > + > +/* > + * Set the IrDA communications speed. > + * Interrupt have to be disabled here. > + */ > +static int omap_irda_startup(struct net_device *dev) > +{ > + struct omap_irda *omap_ir = netdev_priv(dev); > + > + /* FIXME: use clk_* apis for UART3 clock*/ > + /* Enable UART3 clock and set UART3 to IrDA mode */ > + if (machine_is_omap_h2() || machine_is_omap_h3()) > + omap_writel(omap_readl(MOD_CONF_CTRL_0) | (1 << 31) | (1 << 15), > + MOD_CONF_CTRL_0); > + > + /* Only for H2? > + */ > + if (omap_ir->pdata->transceiver_mode && machine_is_omap_h2()) { > + /* Is it select_irda on H2 ? */ > + omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, > + FUNC_MUX_CTRL_A); > + omap_ir->pdata->transceiver_mode(omap_ir->dev, IR_SIRMODE); > + } > + It would be best to get rid of the machine_is this or that code in the drivers, and pass the necessary flags in the platform_data. Regards, Tony