Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1502674ybk; Sat, 16 May 2020 13:25:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWC55OAHBpcsMFf0qbf0vEApMZNaR9vGebry5tjxCc1cl7W/F5k2UNDgoKn4fDohR9WuGm X-Received: by 2002:a17:906:eda5:: with SMTP id sa5mr8396328ejb.289.1589660715875; Sat, 16 May 2020 13:25:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589660715; cv=none; d=google.com; s=arc-20160816; b=uKdvVPuDG+IXyEJ4odhNXsZm1R+C4EBkqZbH3Q37TDVzgYdPWq0haWU4vpf+LXkOUc uGNoMvMs0XRETIZ8Q60hPGP1/ssYwMIpNy5wPqB0zil/dh3QYxTW93uBQrYTrR1MbuWP 9jNvObeNwtNCZe3n6k9iCrQRfwLf+n6PGaDBZC0lBdMsr37HgwIBRyFnU8AbDfhEmhlQ YRO1hls60NPN/YNZz/fPgZfvLrmn8ACodyV6CIV8Un4pUYQ4uc/XvHObxnLyU2fKzfxU R9CXkuHsc4f+c0cN7rP9CIXSmLJla1MIebF3XONZiJlxJmvMm9P6uf2f9pgR22uawc7x 2KEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=3SYs9+WOp3cN/MPJ0Tpha3UrTSGXDjP6IWIAoNQONuw=; b=YaVsXbn7a2dkq9DEKB2D3IgsrjYHWKsxinSNTJ4b5iEFWBrWyjOLd9Rh0POAidG34s eYh8KFtGfqVT/ICk0WghENVFHIFDN92k1U9RwNRTardVtYspAki4HRMGI8UeC+Y2GzEN BGyJv67vgYWlAvZMCJ6X5Juz9Q2nH0txaRjUsK9N5whz9swZaAQvOhJAuRlEmXDmMGjy 0oW7JdKbH6ykyjPvQ5Gj2zGNpRsr25zj/ANWC1TQUq+epTLWS5iLEgasJAnX6I4ZGkfe c5hSUahO+SQrgRpkOBQN7oe455We8B5OntIs0Vu3N1dDloqkywjBlCwOglTJwz7kWSNP bJCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x18si3720502ejs.38.2020.05.16.13.24.25; Sat, 16 May 2020 13:25:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726584AbgEPUO7 (ORCPT + 99 others); Sat, 16 May 2020 16:14:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726360AbgEPUO7 (ORCPT ); Sat, 16 May 2020 16:14:59 -0400 Received: from bmailout1.hostsharing.net (bmailout1.hostsharing.net [IPv6:2a01:37:1000::53df:5f64:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07060C061A0C for ; Sat, 16 May 2020 13:14:58 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id EE8FE3000253D; Sat, 16 May 2020 22:14:56 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id C5026AF8E5; Sat, 16 May 2020 22:14:56 +0200 (CEST) Date: Sat, 16 May 2020 22:14:56 +0200 From: Lukas Wunner To: Heiko Stuebner Cc: gregkh@linuxfoundation.org, jslaby@suse.com, andriy.shevchenko@linux.intel.com, matwey.kornilov@gmail.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, christoph.muellner@theobroma-systems.com, giulio.benetti@micronovasrl.com, Heiko Stuebner Subject: Re: [PATCH v2 6/7] serial: 8250: Support separate rs485 rx-enable GPIO Message-ID: <20200516201456.pieoebueqkq7q7ov@wunner.de> References: <20200325231422.1502366-1-heiko@sntech.de> <20200325231422.1502366-7-heiko@sntech.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200325231422.1502366-7-heiko@sntech.de> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 26, 2020 at 12:14:21AM +0100, Heiko Stuebner wrote: > --- a/drivers/tty/serial/serial_core.c > +++ b/drivers/tty/serial/serial_core.c > @@ -3356,6 +3356,18 @@ int uart_get_rs485_mode(struct uart_port *port) > rs485conf->flags |= SER_RS485_TERMINATE_BUS; > } > > + port->rs485_re_gpio = devm_gpiod_get(dev, "rs485-rx-enable", > + GPIOD_FLAGS_BIT_DIR_OUT); I think you want to use GPIOD_OUT_HIGH here so that rs485 reception is enabled by default and only disabled at runtime when sending (if half-duplex mode is used). Thanks, Lukas