Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4230586pxb; Mon, 1 Feb 2021 16:34:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7yFHibTlCHc88Jyry94djUig1PSxrxL6u8UUjPy+YiSBL7kspKHBryjUxexbRpQ3F6/Yi X-Received: by 2002:a17:906:b217:: with SMTP id p23mr13533689ejz.126.1612226051414; Mon, 01 Feb 2021 16:34:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612226051; cv=none; d=google.com; s=arc-20160816; b=u/blhHDK/sQSyzDMEIt2C8gV/Y2pOJNQmdfd6h6z0LPy3SonGdNwZVmYbzWYJCpgRs Pt6tRLYf4TPsaf0SKfS2WWH3VvCYXt0JxI4EwVzAO7JURAablTsPogWmblh3Ft5cVhmt D4jVukkyqukQONTxM0DzQ1HWHrNDC4clztFU/WENw3zQeWRq2L35HTK7fAgfW6ng/0Pw WVnuQ3lQ0Q2DRtTCzLphXWvo1IQcTh3uJA6gRO5HRm4SgMDVybwp2WPb7pXY89BHhUOG gXDBj+vNeFfO/clopDDSmPcoBK9aMT2kz7C0hv5yBueTWyk4+7/5mOyv/Ko/3D0WnTWs kIHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=TqmVnyC5TR/EoBSjkZJBSN3GLCtaan7s8KgBSPP878c=; b=jcegAAwuXwyqdF67meGIZUbRNO0d3tFa3CRn7vYglf9N50gporCg4/yE7AyAEJ7iR5 ixkXwa2cAOmWz3kcOBMq27It7BieYXX1laFDwVXRaalIQSLxpIboeK0OeTBuFxntIMGp fnwDHxenwZZfr46Wf5DtacsmUff0IIRY8W47zQQMvimH0sMLgczHB+aWLL0hELpyqss7 z6JgEHauoX0QWEFyDeo8PnuEAM/9MUkKZk//tp82DdosXkSxwBdMYlvn4jrNVWVIpWIk uo2vtwVjKn7/g9YhRbnrJKamNyVrSMAr4R3dPg4iDKr3r1epZ4/N2BsIHAsznbRf1EDc m/Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=T1pv4HOL; 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 z4si1629231ede.430.2021.02.01.16.33.24; Mon, 01 Feb 2021 16:34:11 -0800 (PST) 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; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=T1pv4HOL; 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 S231317AbhBBAcC (ORCPT + 99 others); Mon, 1 Feb 2021 19:32:02 -0500 Received: from mail.micronovasrl.com ([212.103.203.10]:47292 "EHLO mail.micronovasrl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231341AbhBBAcB (ORCPT ); Mon, 1 Feb 2021 19:32:01 -0500 Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id 5D1AAB04845 for ; Tue, 2 Feb 2021 01:31:19 +0100 (CET) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:to:subject:subject; s=dkim; t= 1612225878; x=1613089879; bh=rhiVnujukiPvzaErM/MEb08eoHPbwq0Lwyc mjO9W3QI=; b=T1pv4HOLQMwtDZvVh0nVixyYcI4oW/FvBZX8GtGyvElzmFjOVvj WlDfxn/osTT7W9kAHX1lGiNg5w6Jwex+TI/tmR9LapCBm0Utvv+65NQ3cSBetxwr qCxh4Z10bu63AvbwdYXe/L+UTtTv/CRca+Z01zJ3v51QMP1Uwpii2WUg= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com X-Spam-Flag: NO X-Spam-Score: -1.753 X-Spam-Level: X-Spam-Status: No, score=-1.753 tagged_above=-10 required=4.5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, LOTS_OF_MONEY=0.001, MONEY_NOHTML=1.147, NICE_REPLY_A=-0.001] autolearn=no autolearn_force=no Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ljEC8mFXe5PK for ; Tue, 2 Feb 2021 01:31:18 +0100 (CET) Received: from [192.168.50.85] (146-241-184-239.dyn.eolo.it [146.241.184.239]) by mail.micronovasrl.com (Postfix) with ESMTPSA id F2C64B047FF; Tue, 2 Feb 2021 01:31:17 +0100 (CET) Subject: Re: [PATCH v3 5/5] serial: 8250_dw: add em485 support To: Andy Shevchenko , Heiko Stuebner Cc: gregkh@linuxfoundation.org, jslaby@suse.com, matwey.kornilov@gmail.com, lukas@wunner.de, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, christoph.muellner@theobroma-systems.com, Heiko Stuebner References: <20200517215610.2131618-1-heiko@sntech.de> <20200517215610.2131618-6-heiko@sntech.de> <20200518152103.GI1634618@smile.fi.intel.com> From: Giulio Benetti Message-ID: <1f7881b5-f900-dbbe-3f8d-f990d2bdf5a7@micronovasrl.com> Date: Tue, 2 Feb 2021 01:31:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20200518152103.GI1634618@smile.fi.intel.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Language: it Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, Il 18/05/2020 17:21, Andy Shevchenko ha scritto: > On Sun, May 17, 2020 at 11:56:10PM +0200, Heiko Stuebner wrote: >> From: Giulio Benetti >> >> Need to use rs485 transceiver so let's use existing em485 485 emulation >> layer on top of 8250. >> >> Add rs485_config callback to port and uses the standard em485 start and >> stop helpers. > > Would it prevent to use native RS485 support? 8250_dw doesn't have a native RS485 support, do you mean using hardware RTS assertion? Anyway at the moment it's not present. This would be the first rs485 support added to 8250_dw. Best regards -- Giulio Benetti CTO MICRONOVA SRL Sede: Via A. Niedda 3 - 35010 Vigonza (PD) Tel. 049/8931563 - Fax 049/8931346 Cod.Fiscale - P.IVA 02663420285 Capitale Sociale ? 26.000 i.v. Iscritta al Reg. Imprese di Padova N. 02663420285 Numero R.E.A. 258642 > ... > >> p->serial_out = dw8250_serial_out; >> p->set_ldisc = dw8250_set_ldisc; >> p->set_termios = dw8250_set_termios; >> + p->rs485_config = serial8250_em485_config; >> + up->rs485_start_tx = serial8250_em485_start_tx; >> + up->rs485_stop_tx = serial8250_em485_stop_tx; >