From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: FW: [RFC][PATCH]: Adding support for omap-serail driver Date: Fri, 11 Sep 2009 14:25:30 -0700 Message-ID: <8763bp5g39.fsf@deeprootsystems.com> References: <87ws46aj2a.fsf@deeprootsystems.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-px0-f189.google.com ([209.85.216.189]:44113 "EHLO mail-px0-f189.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755433AbZIKVZa (ORCPT ); Fri, 11 Sep 2009 17:25:30 -0400 Received: by pxi27 with SMTP id 27so1084959pxi.15 for ; Fri, 11 Sep 2009 14:25:33 -0700 (PDT) In-Reply-To: (Govindraj's message of "Fri\, 11 Sep 2009 11\:45\:02 +0530") Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Govindraj Cc: HU TAO-TGHK48 , linux-omap@vger.kernel.org Govindraj writes: > Hi, > >> >> FWIW, as the author of much of the PM hacker in mach-omap2/serial.c, I >> agree with Tao. >> >> The only reason for the PM hackery in mach-omap2/serial.c is because >> of the limitations of the 8250 driver. >> > > I have an query, > > We have following functionality in serial.c: > 1.) Enabling and disabling uart clocks. > 2.) Adding rx wakeup capabilities. > 3.) Preparing UARTs for idle mode. > 4.) Context save and restore. > > What functionality should be retained in serial.c file? > > AFAIK currently no serial driver has incorporated their platform > specific PM functionality like context_save and restore into their > serial driver, shouldn't these things be retained into > */mach-omap2/serial.c ? Only SoC and/or board-specific settings should be done in serial.c (setup of base addresses, IRQs, DMA channels, etc.) The driver is an OMAP specific driver, but should be general enough to independent of any board/SoC specifics. IMO, all of 1-4 above above belong in the driver. Evenutally the enabling/disabling of clocks will be handled by the runtime PM layer, but the driver will have a similar enable/disable API. Kevin