Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp760775ybh; Wed, 18 Mar 2020 08:38:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vseF9FJZFGu0Cp/TDrc3txmpfMCHJhrfR9HukhIQ/PKm0NBYfJY0VYK2Iqix2gLvPATH2w+ X-Received: by 2002:aca:4986:: with SMTP id w128mr3563566oia.46.1584545907617; Wed, 18 Mar 2020 08:38:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584545907; cv=none; d=google.com; s=arc-20160816; b=qQPCRg9XWCG1sn08C7095UKBzQ8MfIENADvJUP1jJui0ycQS3Ebj13rNSxPbAH0bDc UhE7K0TKImg0PjJeNIMB+HjPWkqteEoUhm8yl+LhPeFFoaLyfcI9mvEt6PGFXTnsMTtO AGMeaosDaEBYjreGwAPwIUn26uUUZqK8SJSsGyoGSITPiMOSONSAW5gHlZR7jJSQRTPg 47o1YlAvSSs63XkDkNZpili4whYqVM/Q3a/Og4Eaa/qokDMuDUOHbk1ppQtog3kIFq3W T/630K84/ItrPjVglHBXp2g7rwyIxUeVIObCfrP/AzYoUSqZM4112HpL61Zo3SkWdRkW +aew== 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=F3MJAkSjBgFGr9qrG2n604DqYFaEpcspaZ5lSZ+HS2E=; b=mWRUP3fQ0Jz8U0KtrTr4VomNCODZkH5Gc4pBqmqrMzG8BMt1/hLkiOTXdBvxvjlf/Q q7+GErQFVTHmg4KzNEbzI397blWLj7dPONewLULFHeYpjFvUbkDgAfYTof3QmmNjEzDt Qelov9g/6oGTnb5f67kKhICASu/an6oaTokhh9cyxWZzPgRlFV3jtLokkIw/xgDi2bdl 0zSH0XiSEkQTw+nBvdwn68+UsYAjgtUfdY3sGfg3Nuu2aRwjKNh4lDM6h3WZS6kqaero TE7hxMgk2t4G9InFwQ4WSdRzRXKigJDBh0aR+n/vCvnniOaaBNSTbjkjFj9F87SmwRcc jSTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v20si3203214oif.63.2020.03.18.08.38.14; Wed, 18 Mar 2020 08:38:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727068AbgCRPh5 (ORCPT + 99 others); Wed, 18 Mar 2020 11:37:57 -0400 Received: from bmailout3.hostsharing.net ([176.9.242.62]:59691 "EHLO bmailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726911AbgCRPh4 (ORCPT ); Wed, 18 Mar 2020 11:37:56 -0400 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 bmailout3.hostsharing.net (Postfix) with ESMTPS id 9A356100DEC95; Wed, 18 Mar 2020 16:37:54 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 1CCF56052; Wed, 18 Mar 2020 16:37:54 +0100 (CET) Date: Wed, 18 Mar 2020 16:37:54 +0100 From: Lukas Wunner To: Andy Shevchenko , Heiko Stuebner Cc: gregkh@linuxfoundation.org, jslaby@suse.com, matwey.kornilov@gmail.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/7] serial: 8250: Add rs485 emulation to 8250_dw Message-ID: <20200318153754.dctd4q7e2fodeqsw@wunner.de> References: <20200318142640.982763-1-heiko@sntech.de> <20200318144320.GL1922688@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200318144320.GL1922688@smile.fi.intel.com> 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 Wed, Mar 18, 2020 at 04:43:20PM +0200, Andy Shevchenko wrote: > On Wed, Mar 18, 2020 at 03:26:33PM +0100, Heiko Stuebner wrote: > > This series tries to revive the work of Giulio Benetti from 2018 [0] > > which seemed to have stalled at that time. Oh dear. :-( This needs a rebase on current tty-next. Patch [7/7] is already in tty-next as commit fe7f0fa43cef ("serial: 8250: Support rs485 devicetree properties"). Patch [4/7] likewise. Note that it's not safe to call ->rs485_config() already in serial8250_register_8250_port() if the driver uses UPF_IOREMAP because ioremapping happens later via serial8250_config_port() -> serial8250_request_std_resource(), so you'll get an oops for those drivers when deasserting RTS early on. Been there... :-( Patch [6/7]: Ugh, another duplication of the ->rs485_config() callback. Just use the generic one introduced by commit 283e096ffb70 ("serial: 8250: Deduplicate ->rs485_config() callback") if possible. The other patches appear to handle chip-specific needs. It's now possible to implement these in ->rs485_start_tx() and ->rs485_stop_tx() hooks, as introduced by commit 058bc104f7ca ("serial: 8250: Generalize rs485 software emulation"). Refer to commit f93bf7589114 ("serial: 8250_bcm2835aux: Support rs485 software emulation") for an example. The DTR-for-RE thing seems a bit nonstandard, I'm not sure if this is eligible for mainline or if it's something that should be kept in your downstream tree. But no harm in submitting it to the list. Thanks, Lukas