From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Tomas Paukrt <tomaspaukrt@email.cz>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jiri Slaby <jirislaby@kernel.org>,
linux-serial@vger.kernel.org,
Lino Sanfilippo <LinoSanfilippo@gmx.de>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 1/2] serial: core: Add option to enable RS485 mode via GPIO
Date: Thu, 23 Nov 2023 14:14:47 +0000 [thread overview]
Message-ID: <2023112323-masculine-map-642d@gregkh> (raw)
In-Reply-To: <3Nj.ZZr}.5RaPRe7D8AB.1bMzDm@seznam.cz>
On Mon, Nov 20, 2023 at 10:45:20PM +0100, Tomas Paukrt wrote:
> Add an option to enable the RS485 mode at boot time based on
> the state of a GPIO pin (DIP switch or configuration jumper).
> The GPIO is defined by the device tree property "rs485-mode-gpio".
>
> Signed-off-by: Tomas Paukrt <tomaspaukrt@email.cz>
> ---
> drivers/tty/serial/serial_core.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
> index f1348a5..f1bf0b9 100644
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -3603,6 +3603,18 @@ int uart_get_rs485_mode(struct uart_port *port)
> }
>
> /*
> + * Enable the RS485 mode based on the state of a GPIO pin.
> + */
> + desc = devm_gpiod_get_optional(dev, "rs485-mode", GPIOD_IN);
> + if (IS_ERR(desc))
> + return dev_err_probe(dev, PTR_ERR(desc), "Cannot get rs485-mode-gpio\n");
> + if (desc) {
> + if (gpiod_get_value(desc))
> + rs485conf->flags |= SER_RS485_ENABLED;
> + devm_gpiod_put(dev, desc);
> + }
> +
> + /*
> * Disabling termination by default is the safe choice: Else if many
> * bus participants enable it, no communication is possible at all.
> * Works fine for short cables and users may enable for longer cables.
> --
> 2.7.4
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- This looks like a new version of a previously submitted patch, but you
did not list below the --- line any changes from the previous version.
Please read the section entitled "The canonical patch format" in the
kernel file, Documentation/process/submitting-patches.rst for what
needs to be done here to properly describe this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
next prev parent reply other threads:[~2023-11-23 17:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <VY.ZZnz.2Km1cHBSh2}.1bLIJa@seznam.cz>
[not found] ` <476876ca-806f-a5ad-1eeb-435c8a3111a2@gmx.de>
[not found] ` <2cZ.ZZqF.1YADr1CLFoQ.1bMn3d@seznam.cz>
[not found] ` <5a0321ac-e1e6-45e9-9faf-153db8d34980@kernel.org>
2023-11-20 21:45 ` [PATCH v3 1/2] serial: core: Add option to enable RS485 mode via GPIO Tomas Paukrt
2023-11-21 7:02 ` Krzysztof Kozlowski
2023-11-23 14:14 ` Greg Kroah-Hartman [this message]
2023-11-20 21:45 ` [PATCH v3 2/2] dt-bindings: serial: " Tomas Paukrt
2023-11-21 7:04 ` Krzysztof Kozlowski
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=2023112323-masculine-map-642d@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=LinoSanfilippo@gmx.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jirislaby@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=tomaspaukrt@email.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).