From patchwork Mon Jun 6 10:04:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 12870212 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D98FC43334 for ; Mon, 6 Jun 2022 10:07:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=E7wKPjK70rAF9OekzF5EmDyyhnE77A0dL+3cS6zd/tM=; b=v/DcqIgbhWCTgG Mo6n5OEkHxz26chMtKsIgq+uAT2r2ubG5Kh7hRa+Ds7W3ruYh57PJVZBTLujug64Tu4bV3hlMfMYi RPJGXmTHDap3VqTRtie4P++ftlJ9iZUf71M2pM4Npq6Q7pYiI1+1gWcmEX6627ycsnz8GXEk3Q/is uqUdeSjvsXeGdlhswn8MPQ3FrafbmU8oNVvfYJA/9HsAu0r1O7J7yVSyZOJ4AkrAfPyOmiKpnK/u2 20Rx1YL5lajWqaudtjKuz42e9gPeKUMlpnkhLHc5BwIizqIRCj4jXhLcI2+B/HUA1+wsOy8IvFYKq 3Nins/cGLyO5XLb8yhFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ny9cu-000bod-EY; Mon, 06 Jun 2022 10:06:24 +0000 Received: from mga05.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ny9bs-000bFN-6j for linux-arm-kernel@lists.infradead.org; Mon, 06 Jun 2022 10:05:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654509920; x=1686045920; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uiu6/OhYYKXexbF3L+XQuHEeDHHGh13iJur0g7QkeDo=; b=hhMPAN1d/xXNiRjz6elxAEThcOlzP2FZU1AzbjCkK/arUBOP6bBreD5E wHWxiX2SyaTSakea6tJ4u7H9K3BxfelWm8gkm3o5FHXD958WCdj3nKqfZ uzf4apxSPAIQ1dzX4Hh8K92a/pNUnRyiGGwcVztJb77yXxZ3fcb0LEfGy vx5u0LgJeUdxyHhnz1abwGMuPkZ9lgjYTjqQjeSSCcg9BIr6h+v8NYEXe 5VDhglHSMeEpvT4mFcx354Ja56b5UkI9006ln2QlBYtmX2YDFt2QIlxqz XGR/Va8g2VknHQnEPXHuYlkuTwH7JAcvepJFuKJxqP0KOx26B+qIZ+I7D A==; X-IronPort-AV: E=McAfee;i="6400,9594,10369"; a="362987046" X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="362987046" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2022 03:05:19 -0700 X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="635523608" Received: from amkossek-mobl1.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.57.11]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2022 03:05:17 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Vladimir Zapolskiy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH 09/36] serial: 8250_lpc18cc: Fill in rs485_supported Date: Mon, 6 Jun 2022 13:04:06 +0300 Message-Id: <20220606100433.13793-10-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220606100433.13793-1-ilpo.jarvinen@linux.intel.com> References: <20220606100433.13793-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220606_030520_296716_F5A6B709 X-CRM114-Status: UNSURE ( 9.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add information on supported serial_rs485 features. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/8250/8250_lpc18xx.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/tty/serial/8250/8250_lpc18xx.c b/drivers/tty/serial/8250/8250_lpc18xx.c index 570e25d6f37e..66ce5d05fe9c 100644 --- a/drivers/tty/serial/8250/8250_lpc18xx.c +++ b/drivers/tty/serial/8250/8250_lpc18xx.c @@ -98,6 +98,12 @@ static void lpc18xx_uart_serial_out(struct uart_port *p, int offset, int value) writel(value, p->membase + offset); } +static const struct serial_rs485 lpc18xx_rs485_supported = { + .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RTS_AFTER_SEND, + .delay_rts_after_send = 1, + /* Delay RTS before send is not supported */ +}; + static int lpc18xx_serial_probe(struct platform_device *pdev) { struct lpc18xx_uart_data *data; @@ -168,6 +174,7 @@ static int lpc18xx_serial_probe(struct platform_device *pdev) uart.port.uartclk = clk_get_rate(data->clk_uart); uart.port.private_data = data; uart.port.rs485_config = lpc18xx_rs485_config; + uart.port.rs485_supported = &lpc18xx_rs485_supported; uart.port.serial_out = lpc18xx_uart_serial_out; uart.dma = &data->dma;