From: Kevin Hilman <khilman@ti.com> To: Shubhrajyoti Datta <omaplinuxkernel@gmail.com> Cc: Shubhrajyoti <shubhrajyoti@ti.com>, linux-serial@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org, "Govindraj.R" <govindraj.raja@ti.com> Subject: Re: [PATCH 2/7] UART: OMAP: Cut the clock in the error cases Date: Fri, 20 Apr 2012 06:46:13 -0700 [thread overview] Message-ID: <8762cuqzx6.fsf@ti.com> (raw) In-Reply-To: <CAM=Q2cvRs2z7sf1ZeU-tMAZLgjPSM5V2fABLyj7087drThf44A@mail.gmail.com> (Shubhrajyoti Datta's message of "Fri, 20 Apr 2012 18:50:25 +0530") Shubhrajyoti Datta <omaplinuxkernel@gmail.com> writes: > On Wed, Apr 18, 2012 at 8:43 PM, Shubhrajyoti <shubhrajyoti@ti.com> wrote: >>> >>> Kevin >> Yes agree completely. Will describe that in the changelog. >> -- > Does the following changelog look ok? A little better, but still doesn't explain things so that someone who is not intimately familar with the driver can understand the auto-suspend version is needed in the one case. Possibly explaining in more detail what would happen if the normal put is used here instead of the autosuspend version might help. Kevin > From 37fdc2d40c9b2b19b8c5a9a4b8f7dd547d420f55 Mon Sep 17 00:00:00 2001 > From: Shubhrajyoti D <shubhrajyoti@ti.com> > Date: Wed, 4 Apr 2012 16:32:37 +0530 > Subject: [PATCH] UART: OMAP: call pm_runtime_put/autosuspend in the error cases > > In the error cases the runtime_put call is missed. This patch intends to fix the > same. In case dma request fails, we fall back to the nondma mode so after > enabling the threshold call put_autosuspend. > > Cc: Govindraj.R <govindraj.raja@ti.com> > Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> > --- > drivers/tty/serial/omap-serial.c | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c > index fe099bb..10e80bb 100644 > --- a/drivers/tty/serial/omap-serial.c > +++ b/drivers/tty/serial/omap-serial.c > @@ -319,6 +319,8 @@ static void serial_omap_start_tx(struct uart_port *port) > > if (ret < 0) { > serial_omap_enable_ier_thri(up); > + pm_runtime_mark_last_busy(&up->pdev->dev); > + pm_runtime_put_autosuspend(&up->pdev->dev); > return; > } > } > @@ -1029,8 +1031,10 @@ static int serial_omap_poll_get_char(struct > uart_port *port) > > pm_runtime_get_sync(&up->pdev->dev); > status = serial_in(up, UART_LSR); > - if (!(status & UART_LSR_DR)) > + if (!(status & UART_LSR_DR)) { > + pm_runtime_put(&up->pdev->dev); > return NO_POLL_CHAR; > + } > > status = serial_in(up, UART_RX); > pm_runtime_put(&up->pdev->dev);
WARNING: multiple messages have this Message-ID (diff)
From: khilman@ti.com (Kevin Hilman) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/7] UART: OMAP: Cut the clock in the error cases Date: Fri, 20 Apr 2012 06:46:13 -0700 [thread overview] Message-ID: <8762cuqzx6.fsf@ti.com> (raw) In-Reply-To: <CAM=Q2cvRs2z7sf1ZeU-tMAZLgjPSM5V2fABLyj7087drThf44A@mail.gmail.com> (Shubhrajyoti Datta's message of "Fri, 20 Apr 2012 18:50:25 +0530") Shubhrajyoti Datta <omaplinuxkernel@gmail.com> writes: > On Wed, Apr 18, 2012 at 8:43 PM, Shubhrajyoti <shubhrajyoti@ti.com> wrote: >>> >>> Kevin >> Yes agree completely. Will describe that in the changelog. >> -- > Does the following changelog look ok? A little better, but still doesn't explain things so that someone who is not intimately familar with the driver can understand the auto-suspend version is needed in the one case. Possibly explaining in more detail what would happen if the normal put is used here instead of the autosuspend version might help. Kevin > From 37fdc2d40c9b2b19b8c5a9a4b8f7dd547d420f55 Mon Sep 17 00:00:00 2001 > From: Shubhrajyoti D <shubhrajyoti@ti.com> > Date: Wed, 4 Apr 2012 16:32:37 +0530 > Subject: [PATCH] UART: OMAP: call pm_runtime_put/autosuspend in the error cases > > In the error cases the runtime_put call is missed. This patch intends to fix the > same. In case dma request fails, we fall back to the nondma mode so after > enabling the threshold call put_autosuspend. > > Cc: Govindraj.R <govindraj.raja@ti.com> > Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> > --- > drivers/tty/serial/omap-serial.c | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c > index fe099bb..10e80bb 100644 > --- a/drivers/tty/serial/omap-serial.c > +++ b/drivers/tty/serial/omap-serial.c > @@ -319,6 +319,8 @@ static void serial_omap_start_tx(struct uart_port *port) > > if (ret < 0) { > serial_omap_enable_ier_thri(up); > + pm_runtime_mark_last_busy(&up->pdev->dev); > + pm_runtime_put_autosuspend(&up->pdev->dev); > return; > } > } > @@ -1029,8 +1031,10 @@ static int serial_omap_poll_get_char(struct > uart_port *port) > > pm_runtime_get_sync(&up->pdev->dev); > status = serial_in(up, UART_LSR); > - if (!(status & UART_LSR_DR)) > + if (!(status & UART_LSR_DR)) { > + pm_runtime_put(&up->pdev->dev); > return NO_POLL_CHAR; > + } > > status = serial_in(up, UART_RX); > pm_runtime_put(&up->pdev->dev);
next prev parent reply other threads:[~2012-04-20 13:46 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-04-16 15:06 [PATCH 0/7] UART: OMAP: Updates Shubhrajyoti D 2012-04-16 15:06 ` Shubhrajyoti D 2012-04-16 15:06 ` [PATCH 1/7] ARM: OMAP: UART: Make context_loss_cnt signed Shubhrajyoti D 2012-04-16 15:06 ` Shubhrajyoti D 2012-04-16 15:06 ` [PATCH 2/7] UART: OMAP: Cut the clock in the error cases Shubhrajyoti D 2012-04-16 15:06 ` Shubhrajyoti D 2012-04-18 0:06 ` Kevin Hilman 2012-04-18 0:06 ` Kevin Hilman 2012-04-18 6:44 ` Shubhrajyoti 2012-04-18 6:44 ` Shubhrajyoti 2012-04-18 14:00 ` Kevin Hilman 2012-04-18 14:00 ` Kevin Hilman 2012-04-18 15:13 ` Shubhrajyoti 2012-04-18 15:13 ` Shubhrajyoti 2012-04-20 13:20 ` Shubhrajyoti Datta 2012-04-20 13:20 ` Shubhrajyoti Datta 2012-04-20 13:46 ` Kevin Hilman [this message] 2012-04-20 13:46 ` Kevin Hilman 2012-04-16 15:06 ` [PATCH 3/7] UART: OMAP: fix software flow control Shubhrajyoti D 2012-04-16 15:06 ` Shubhrajyoti D 2012-04-16 15:06 ` [PATCH 4/7] UART: OMAP: Remove the default setting of special character Shubhrajyoti D 2012-04-16 15:06 ` Shubhrajyoti D 2012-04-16 15:06 ` [PATCH 5/7] UART: OMAP: Prevent cutting of clocks if put_sync immediately follows Shubhrajyoti D 2012-04-16 15:06 ` Shubhrajyoti D 2012-04-16 15:07 ` [PATCH 6/7] UART: OMAP: Remove the hardcode serial_omap_console_ports array Shubhrajyoti D 2012-04-16 15:07 ` Shubhrajyoti D 2012-04-16 15:07 ` [PATCH 7/7] UART: OMAP: Trivial optimisation of the probe and remove Shubhrajyoti D 2012-04-16 15:07 ` Shubhrajyoti D
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=8762cuqzx6.fsf@ti.com \ --to=khilman@ti.com \ --cc=govindraj.raja@ti.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=linux-serial@vger.kernel.org \ --cc=omaplinuxkernel@gmail.com \ --cc=shubhrajyoti@ti.com \ --cc=stable@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.