Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1117771ybb; Wed, 25 Mar 2020 16:16:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtt+Cy//QXz+Y9xkna3ZlTf50WIYFOwPVelXOs0egJ9zkxh8XjFjyd3WImtJOGtTEQfEaAF X-Received: by 2002:a05:6808:14e:: with SMTP id h14mr4471193oie.57.1585178160187; Wed, 25 Mar 2020 16:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585178160; cv=none; d=google.com; s=arc-20160816; b=fxINx8KkTcClQy3FMtuo4vxzSaClBQTcUWB29373w2QTOU7FejETq1V2Z210Up3+dt 47hjocQLIGBzZxVLWMFYh8xmsTgvJONCLAyKFB6pirswUaouFyWDlTyxUbz6SY96+Lzq vUKquL5eI2MR+cqAd9NPMrRw8QbB2SHhMF+4yV57jMrBTG12KHqlCTiWB99DOaz8xVCL daDRtgZo2SDh/KZ/fLkXYqE37xn12gcHudCsdn4x2Ul7rcjbDvbY1zqc5JaJXIg9WTuZ jILnbyP+5j9AzE+p4h8OktbLggFcI5uIEvK9aHR5//ObL0o5jIVTXyFIaijJLJvLlUoy vgbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VNN+7DT0ZG972E2VW9iCBi7sg0VDFwDS/s7bRbBEt00=; b=zxNQX2XpiIoEBmdp5PxuzJwWJigeUrB5ygZ/bfP2jgSz44XGI9POguD2NIOBdcFuto nlkVwpUGz9A9FHGcKSvQyTV+ep0o2pT+8TYP1dbkal/lAnj/+NG7U9eLMXmE930L9Cn1 kn8BN7/HC7IR4kFjG94qgoMvnxj3+LHPQorYvfyalOnx2KKLZIHF76UrclJKQj2d+A0n s6rCt8/ya1B5U9Rmib+LfnCYT45iKjyLjTZP3CmB8P5dIV98oKZ1ifsw6k74OiJXfQrI emqNxnP7owBjoBq7m8BErp2jJnwQ1r9dGTCTIViLA7wxzOoDuMr3GL0eh29QfpFNDv5g n1NQ== 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 t7si263196otd.115.2020.03.25.16.15.47; Wed, 25 Mar 2020 16:16:00 -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 S1727666AbgCYXOn (ORCPT + 99 others); Wed, 25 Mar 2020 19:14:43 -0400 Received: from gloria.sntech.de ([185.11.138.130]:40190 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727525AbgCYXOm (ORCPT ); Wed, 25 Mar 2020 19:14:42 -0400 Received: from ip5f5a5d2f.dynamic.kabel-deutschland.de ([95.90.93.47] helo=phil.sntech) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1jHFEJ-0007ug-KT; Thu, 26 Mar 2020 00:14:35 +0100 From: Heiko Stuebner To: gregkh@linuxfoundation.org Cc: jslaby@suse.com, andriy.shevchenko@linux.intel.com, matwey.kornilov@gmail.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, heiko@sntech.de, lukas@wunner.de, christoph.muellner@theobroma-systems.com, giulio.benetti@micronovasrl.com, Heiko Stuebner Subject: [PATCH v2 7/7] serial: 8250_dw: add em485 support Date: Thu, 26 Mar 2020 00:14:22 +0100 Message-Id: <20200325231422.1502366-8-heiko@sntech.de> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200325231422.1502366-1-heiko@sntech.de> References: <20200325231422.1502366-1-heiko@sntech.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Giulio Benetti [moved to use newly added start/stop helpers] Signed-off-by: Heiko Stuebner --- drivers/tty/serial/8250/8250_dw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index aab3cccc6789..588319075b36 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -414,6 +414,9 @@ static int dw8250_probe(struct platform_device *pdev) 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; p->membase = devm_ioremap(dev, regs->start, resource_size(regs)); if (!p->membase) -- 2.24.1