Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp547220imm; Fri, 1 Jun 2018 05:43:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLgWFvuiGmRaX+WHusa0D+5c1wvabrcPaoreOTHmojMbfSMuZbyQZdOM6AWf5Ly/mE4MUxT X-Received: by 2002:a17:902:ab98:: with SMTP id f24-v6mr10809019plr.144.1527857033872; Fri, 01 Jun 2018 05:43:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527857033; cv=none; d=google.com; s=arc-20160816; b=lU/NhWQYCTlZ3QPeSnGnxZaHwgwwM56F4CCCJ5k91pPSyYLrMJRd5eZWh1SOaErF+R URY0XVRACjozKK+Re6UHlYf8qMNOA9dVr4Qf43HDueHprrJHa4Z+bdm0PCoLzh44mZfO 880mog6QmVtDbCvTEJUqEu1PcMb4g9NwXJ5YETipItjK9PNsb9+wIUXTNRMgNU+ttOkt oW0e1XR0joYhHlpWs0aQTayc8W4rN+yyJlmg10EfoPENVmZ6eKSY95rBIEqIqC2JoZBx sgbL0KvoNs3onASuk2+Nm3EitmQLMtWbZ2heUe4uSZwStzIDBcriE2UbROENoya+cNZX HtmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=TsVzTPDBga2u/dF6GxKTQt7VY0MQ4NoRSU3eTYJ2e0k=; b=bIBQ76oVHIc7V/p2uk3gmbPil/k6oFrXdGZjJZoWZofdlT34gfoO7nOTL3g562gy6l R97+QnoNfp62rT2m8mD0/yj/PONkZB1r+8r7+1ihn9Gp2fCfX/mwKJt362OWBbWuIzq3 nVMWHCx6yUwvtehFSOOQVUKBatr0fhMtWnCk1VcJEK/7/mDRsNBu/hm8CUL5DhntkaDE DvGUSFDQbFHMlOB1J+WpnpLjdCApuQtoE5l4o4SN4MI6A1BwMWr3TIpvoQAxCGInaWhN VWxvvHlbUYV840P2gHjBC/tP8mdrY/4v19yCoQB/3Z2kzm/2D7PkBGP74jXL4oX1u1l8 tugA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=My9rCsxY; 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 w12-v6si31403727pgs.557.2018.06.01.05.43.39; Fri, 01 Jun 2018 05:43:53 -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=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=My9rCsxY; 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 S1752163AbeFAMkh (ORCPT + 99 others); Fri, 1 Jun 2018 08:40:37 -0400 Received: from mail.micronovasrl.com ([212.103.203.10]:38477 "EHLO mail.micronovasrl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbeFAMkb (ORCPT ); Fri, 1 Jun 2018 08:40:31 -0400 Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id 9F1B0B00955 for ; Fri, 1 Jun 2018 14:40:29 +0200 (CEST) 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=x-mailer:message-id:date:date:subject:subject:to:from:from; s=dkim; t=1527856829; x=1528720830; bh=Y3XMOWgROWmRfDrluDo70oiT KdygNjPkfIfPuh/KGCY=; b=My9rCsxYrX2vlKh6wcWEk6yzuIA9i3c+JlKgGKIk NOdEqQVeWpd0/s3lHdFB5d3JMdjyuMVUoF/HJBbVXReIrfQbMOgOzNcbGNYs0Mt0 LUYTfom7lnLi8e7AcYnDimE6+lMT7JdIDuF/+bvaxcHWmz77zYjimXhfzV5p/WvQ hvc= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-10 required=4.5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=unavailable 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 IODykRcuU0wy for ; Fri, 1 Jun 2018 14:40:29 +0200 (CEST) Received: from localhost.localdomain (unknown [87.18.119.93]) by mail.micronovasrl.com (Postfix) with ESMTPSA id 13B96B00402; Fri, 1 Jun 2018 14:40:26 +0200 (CEST) From: Giulio Benetti To: Greg Kroah-Hartman Cc: Jiri Slaby , Andy Shevchenko , 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, Giulio Benetti Subject: [PATCH 0/8] serial: 8250: Add 485 emulation to 8250_dw. Date: Fri, 1 Jun 2018 14:40:13 +0200 Message-Id: <20180601124021.102970-1-giulio.benetti@micronovasrl.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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(-) -- 2.17.0