From patchwork Mon Jun 6 10:04:11 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: 12870214 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 B55B7C43334 for ; Mon, 6 Jun 2022 10:08:00 +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=+dNYXQ5H8he+s52RyRE/08fMJsxIiqhKVQxzF/hioh4=; b=0ghwTPWjeuV9pB ZKBZnhZtiCau1Wi+qpvrma1NmLFibnFQDEyZeCLJb3+XOOPWuc75vrzTVFEujlJVpo7QL60wSK31H dKTGMWEJguxm6hg0stYcv7Rm22cYAbnOHGoHaxMVcEvxMDNzeXH913RWf/AUYUa+PVB+2I0SjNb7y xB2LSZnQRXjtlEinZjyScMmOsbwSGrdwc/Cv8Is9LgVED/EjAUKuqNa6TUZ/UA7SfrMaCAbd4EfTd dJIy4IWy03C2OrWDaQwMhJzzeadotxHzOgRSwxATeCHBHTZCoJIlD5NDlvZdWX2yduphKoBAHfwfN i6s4SfSTVH9PJPCcH1xg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ny9dP-000c4e-39; Mon, 06 Jun 2022 10:06:55 +0000 Received: from mga18.intel.com ([134.134.136.126]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ny9c8-000bNz-Tw for linux-arm-kernel@lists.infradead.org; Mon, 06 Jun 2022 10:05:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654509936; x=1686045936; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WndMwTVfuW00rnE/S6LgTXND/zSnSa30GDTQqWRCwI8=; b=hHE2W06YlK+ItNQYMWYHY0U+xNz3LDnMX5WbYI8mjpL6eIhrjOEFyE7u 2l/m4ACY9Adl9GoUgt2qspaxuQuvYYBvFtl4OpsfvDmqiksEnNjUKKTCf CxcAgiKJPpw2+gsA3NWqzIeIrgo4vNeSAhu8iS6nDaTGJNaLgkNqi1sSS hbKGm/ZhN+Ic6u0WbsS1mBkMMvw3I94AFzjmzFEfm4jg1k8C1TDxR8D/4 TEEkoq+bOajzQ75hWF+ljINpwTrlbfgq8e/ukFIX7wDPBWZ4qePkDystN D6F9WyJDbwJCZqL8vAh3zY0SGMYaqLhu2uuB3CmG91V7rmFy+uHU2mG3e g==; X-IronPort-AV: E=McAfee;i="6400,9594,10369"; a="258916749" X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="258916749" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2022 03:05:34 -0700 X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="635523712" 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:31 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Richard Genoud , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH 14/36] serial: atmel: Fill in rs485_supported Date: Mon, 6 Jun 2022 13:04:11 +0300 Message-Id: <20220606100433.13793-15-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_030537_164478_FF68766C X-CRM114-Status: GOOD ( 10.83 ) 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/atmel_serial.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index dd1c7e4bd1c9..74dd1d3ac46f 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -2473,6 +2473,12 @@ static const struct uart_ops atmel_pops = { #endif }; +static const struct serial_rs485 atmel_rs485_supported = { + .flags = SER_RS485_ENABLED | SER_RS485_RTS_AFTER_SEND | SER_RS485_RX_DURING_TX, + .delay_rts_before_send = 1, + .delay_rts_after_send = 1, +}; + /* * Configure the port from the platform device resource info. */ @@ -2494,6 +2500,7 @@ static int atmel_init_port(struct atmel_uart_port *atmel_port, port->mapbase = mpdev->resource[0].start; port->irq = platform_get_irq(mpdev, 0); port->rs485_config = atmel_config_rs485; + port->rs485_supported = &atmel_rs485_supported; port->iso7816_config = atmel_config_iso7816; port->membase = NULL;