From: Lukas Wunner <lukas@wunner.de>
To: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Cc: linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Shawn Guo" <shawnguo@kernel.org>, "Marek Vasut" <marex@denx.de>,
"Fabio Estevam" <festevam@denx.de>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"NXP Linux Team" <linux-imx@nxp.com>,
"Sergey Organov" <sorganov@gmail.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Rob Herring" <robh@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Tom Rix" <trix@redhat.com>,
"Thomas Gleixner" <tglx@linutronix.de>
Subject: Re: [PATCH V2] serial: imx: Ensure that imx_uart_rs485_config() is called with enabled clock
Date: Wed, 27 Dec 2023 19:43:20 +0100 [thread overview]
Message-ID: <20231227184320.GA23940@wunner.de> (raw)
In-Reply-To: <20231226113647.39376-1-cniedermaier@dh-electronics.com>
On Tue, Dec 26, 2023 at 12:36:47PM +0100, Christoph Niedermaier wrote:
> There are register accesses in the function imx_uart_rs485_config(). The
> clock must be enabled for these accesses. This was ensured by calling it
> via the function uart_rs485_config() in the probe() function within the
> range where the clock is enabled. With the commit 7c7f9bc986e6 ("serial:
> Deassert Transmit Enable on probe in driver-specific way") it was removed
> from the probe() function and is now only called through the function
> uart_add_one_port() which is located at the end of the probe() function.
> But the clock is already switched off in this area. To ensure that the
> clock is enabled during register access, move the disabling of the clock
> to the very end of the probe() function. To avoid leaking enabled clocks
> on error also add an error path for exiting with disabling the clock.
>
> Fixes: 7c7f9bc986e6 ("serial: Deassert Transmit Enable on probe in driver-specific way")
> Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: Lukas Wunner <lukas@wunner.de>
prev parent reply other threads:[~2023-12-27 18:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-26 11:36 [PATCH V2] serial: imx: Ensure that imx_uart_rs485_config() is called with enabled clock Christoph Niedermaier
2023-12-26 11:36 ` Christoph Niedermaier
2023-12-27 18:43 ` Lukas Wunner [this message]
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=20231227184320.GA23940@wunner.de \
--to=lukas@wunner.de \
--cc=cniedermaier@dh-electronics.com \
--cc=festevam@denx.de \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-serial@vger.kernel.org \
--cc=marex@denx.de \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=sorganov@gmail.com \
--cc=tglx@linutronix.de \
--cc=trix@redhat.com \
--cc=u.kleine-koenig@pengutronix.de \
/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: link
Be 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.