Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3431638imm; Mon, 4 Jun 2018 03:36:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIB+eB+PfZRok+qC2bQmS0lFfMTPYxDTAWoqXjxvRyLtm+EYtoCUCVgVwy6iy39HAJGkfg0 X-Received: by 2002:a63:93:: with SMTP id 141-v6mr17178303pga.322.1528108591457; Mon, 04 Jun 2018 03:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528108591; cv=none; d=google.com; s=arc-20160816; b=JuuO/Jl4l+mkOjEeVZh420cFVy68tFky2Ck59upFJIXTfbOiFk7+1o4c0VkmuNyTS4 k3I0EHQl04gT1LpLj0Syh+CF0KpPEVn9tTMM0HeoBa0tD/gtqEa43TLc/nWJEgQSw1KO I6entx91pT0rgqu7a2H22N0eo7jQgssu9eXVn6jUPkGzQuEzJZuXRjvN88uSwgv9Egth ldPN13VNygEmMOE8laz53YPnewFrRZXl/rcHUSnu6/NXSwWPCSoibPujc3pi14x7F/lR NrTI5Jh1FJceQdebBzTVqOgrzRBar0nlK53jqv3NLBozGlMOrSRRZvHhGcMiVfkh5qEr W2Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=IYWUBhBQREFbu2Su0IJAQJt00mhiBTFkndt8nc0+kPQ=; b=kQpysJA9D73CDlDNePTOBKlBf6xDxHWUvUivBDeXgmVrcOTNO8q6Q0Mk7rzQQlmKJ8 k1RlDH0KXkQF8rX8w3weuFYXvy+PgBpxULgE47aJ7pwZPyarhxur0i4Lx+0tC9O2lhI7 ZI45Zt9oGmnkMVAxiJbmFGPaqXlDCnUWTs/xBI+ykkraoRRmd45GdHHiFl19AwMfuJQ3 j6HZhYC24WsV78KXHaBPV+2pFFGHzJACPgig9QThWOJlN2oaYJGjKzSvIV31DHDwnz3I TlKlTwUI9Yi4EEYTJVBRtpRa1FH3+wZbrNKydU+E8ZaTSrn3nU507u52mr8Eofa0IwG/ k5Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=e/fFVqn6; 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 n1-v6si45826026pld.188.2018.06.04.03.36.17; Mon, 04 Jun 2018 03:36:31 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=e/fFVqn6; 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 S1752292AbeFDKek (ORCPT + 99 others); Mon, 4 Jun 2018 06:34:40 -0400 Received: from mail-ot0-f193.google.com ([74.125.82.193]:40930 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751769AbeFDKei (ORCPT ); Mon, 4 Jun 2018 06:34:38 -0400 Received: by mail-ot0-f193.google.com with SMTP id n1-v6so36958785otf.7; Mon, 04 Jun 2018 03:34:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=IYWUBhBQREFbu2Su0IJAQJt00mhiBTFkndt8nc0+kPQ=; b=e/fFVqn6nt71LODN9ueWGDQ3rKSQhFM5nd0ZXe3EZ4yFe74pItamW7E5Ijf8I2nrEX Ugb7uuxGOU9YMuHDlfg1mdjgLwop06ZzbwJtH+mezfDzdMTj9tAYEMAYK8d0+K6OoFww BAY31NQDUymUF/BqdhFBFGpGo7jgUyAA3M60beXNlP4lExhRODRRbOvClxifBeFpAshZ xev/A4vjdJoXrrFYrqK1OULdvj3goIt5nmRcdxGXypHuORM1T/Xp19bdaqu0QlsjGLYX h7MBa6lzzihZ2Dnba5NzMS7aggZOYBzU7mRGU9wH3QsTP1EU/MgZ045Cw32g6opSFqth YrHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=IYWUBhBQREFbu2Su0IJAQJt00mhiBTFkndt8nc0+kPQ=; b=VRQzko4ERBdO4iByujcMmX7IzWqbWhCSchOTlPkfhMddr40yLoQfvO5Z6hZVKilNAz GTk7skFro6kiTuH/zRZToiNXvbk6ygyT6TlDnIRAwhtrvD6A4aOyqnPiP91YZn6dcUjC c9/0TZ6EYvLDknrRi8s/VghWs/3dYri6voYwbyNcJNHO8IsJCI+Dhsm2UgsYgBzLTPh/ kmZqtxZgSC7QzWgyPEdVOWcYuMwnrIlUnvjSXX/hggvVaSZj65laT/7hI5rW/v3CauLT qZJLuGdfw70KYFoR16E7myJ5U+2xDq1k+ciCF6nRjUcYhLaycSqFMl70DFliad8u4rij PZ2g== X-Gm-Message-State: APt69E1eaC1t6flCvAOFsS/IyPRNmrMTTeeJcOVtIZOR6CAV0Ww4Ibpn On9V4+Y5bIE/9z1E9qWv+Wi80Vnz2TVwqAtCnK0= X-Received: by 2002:a9d:61ce:: with SMTP id h14-v6mr7999044otk.225.1528108477803; Mon, 04 Jun 2018 03:34:37 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:743:0:0:0:0:0 with HTTP; Mon, 4 Jun 2018 03:34:17 -0700 (PDT) In-Reply-To: <65c26f5db1275e958cfe6390e9336568b0158dea.camel@linux.intel.com> References: <20180601124021.102970-1-giulio.benetti@micronovasrl.com> <65c26f5db1275e958cfe6390e9336568b0158dea.camel@linux.intel.com> From: "Matwey V. Kornilov" Date: Mon, 4 Jun 2018 13:34:17 +0300 X-Google-Sender-Auth: nayw_SBRuV7kUq5bRBO_n91jYb4 Message-ID: Subject: Re: [PATCH 0/8] serial: 8250: Add 485 emulation to 8250_dw. To: Andy Shevchenko Cc: Giulio Benetti , Greg Kroah-Hartman , Jiri Slaby , Kees Cook , Matthias Brugger , Allen Pais , Sean Young , Ed Blake , Stefan Potyra , Philipp Zabel , Joshua Scott , Vignesh R , Rolf Evers-Fischer , Aaron Sierra , Rafael Gago , Joel Stanley , Sean Wang , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-06-04 13:12 GMT+03:00 Andy Shevchenko : > On Fri, 2018-06-01 at 14:40 +0200, Giulio Benetti wrote: >> Need to handle rs485 with 8250_dw port. >> >> Use existing em485 emulation layer for 8250 taking care to fix some >> bug >> and taking care especially of RTS_AFTER_SEND case. >> > > I don't see in Cc list author of rs485 code, who might be interested in > this. > > So, added him here. > Hi, Andy Nice to see you there. I will look through the code later. I always thought that DW has its own hardware rs485 support. >> Giulio Benetti (8): >> serial: 8250_dw: add em485 support >> serial: 8250_dw: allow enable rs485 at boot time >> serial: 8250: Copy em485 from port to real port. >> serial: 8250: Handle case port doesn't have TEMT interrupt using >> em485. >> serial: 8250_dw: treat rpm suspend with -EBUSY if RS485 ON and >> RTS_AFTER_SEND >> serial: 8250: Copy mctrl when register port. >> serial: 8250: Make em485_rts_after_send() set mctrl according to rts >> state. >> serial: core: Mask mctrl with TIOCM_RTS too if rs485 on and >> RTS_AFTER_SEND set. >> >> drivers/tty/serial/8250/8250.h | 2 +- >> drivers/tty/serial/8250/8250_core.c | 2 ++ >> drivers/tty/serial/8250/8250_dw.c | 41 >> ++++++++++++++++++++++++++++- >> drivers/tty/serial/8250/8250_omap.c | 2 +- >> drivers/tty/serial/8250/8250_port.c | 33 ++++++++++++++++------- >> drivers/tty/serial/serial_core.c | 12 ++++++++- >> include/linux/serial_8250.h | 1 + >> 7 files changed, 79 insertions(+), 14 deletions(-) >> > > -- > Andy Shevchenko > Intel Finland Oy > -- With best regards, Matwey V. Kornilov. Sternberg Astronomical Institute, Lomonosov Moscow State University, Russia 119234, Moscow, Universitetsky pr-k 13, +7 (495) 9392382