Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp284993iof; Mon, 6 Jun 2022 03:31:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFI+2Z+VC3Ye4/KHzC+rRy1Cc5+f5FZSlFPJunl9fuGwG0e311noeAN7jFYyn9BKXWctKf X-Received: by 2002:a17:90b:1e46:b0:1e6:826e:73ea with SMTP id pi6-20020a17090b1e4600b001e6826e73eamr25301028pjb.68.1654511517530; Mon, 06 Jun 2022 03:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654511517; cv=none; d=google.com; s=arc-20160816; b=Eif7e8khLx/XsNmuxZranLhCokpaIxCsoXGaMh/X8SCPe53mbvD+CAxjWK/mvTyL45 /xgSJw/WTHVvcIDcOI+YTr5EqRJX/dTeGyK4xGmdGKcZK2K9fQ5n8USlla+LMe/df67q u4jAfB0ZuscYBMr21/45FJRKHKmTOFwr0E0QC2/EAkx+5VGRzq7Qn16ck41qs+OpViMv L5ZtU8Jn5laNxMGmRGUDq5+0sz0I1Exu/4PWWwv3ZTluI5OAqcZl4Qin6/0eiKtcD9Ha kqdzRLa0Fxg6Q3X3ET/iOlZFAm/AGFNDfy4TS0zuYuZ0eZZHYdDO0fxENWMNMRPZ66vh m+zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2g7sH4Y63rTGVwqVqP7WTP/6c4fO60FM4S3ibOVb5Xk=; b=wBYjRqMMgpGHrHiU9LlsmtNtqk5sVCeX5NEpBzOagZrHT1rqn4bM6GHyzSq5uZUgVA MD6Swko7u3PGCH0OW2Ot2XxTisZ/qfQZAWYYY61mOyYY6Z+CasS3R7PvJ3XjrA4Uewmf wOnHWxY7V6FWQ+/VVyAK/q9g2BIgbGd+kSd3mCi0NTba5dcxYFMEOEZMaKrlV1NfAUeZ Pj7DJSstzi7sRwWl+PIYAZrmZmTwtRux6R0TIrqNBmf3hN+sAy207ggl2gSHVZp5V7sX 3H9ZhcT9rHvh4FC3+hL9b4rceGqmfQZ45u7EXr01MUM5+5QOMIw4nq7myNcQb+yOo+0y txAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VbiL4JLV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x3-20020a1709029a4300b00156bc537059si8094961plv.17.2022.06.06.03.31.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 03:31:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VbiL4JLV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 36BFF8AE49; Mon, 6 Jun 2022 03:10:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233781AbiFFKIR (ORCPT + 99 others); Mon, 6 Jun 2022 06:08:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233468AbiFFKGF (ORCPT ); Mon, 6 Jun 2022 06:06:05 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E4D112DBEC; Mon, 6 Jun 2022 03:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654509955; x=1686045955; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZM/pEhOqDZJ2vEjEvweRMXHfCanuCKshhfEXaADs/+c=; b=VbiL4JLVsWYN60pCpVxMhSnIhF+xCGHB7hl6W9xKfaA4yIaDcG6LJwAn iaZm9yF5ci/TqLdOPEx7hNZi16D7Oh8r1OovW4z3OgUS9oqOPmXplrkex 9ZAwlyZD396NEpCSc0sEFoyat98w9YN8A5qjOCWWjZMBMpTv3MMqirwOf QnE49DTEeoNnm8eN8MpAuhOjk6qDltj5wV2aQKzN29XABSLK6fcwMDHlN 4PVma0m5zq9zBgjCLVixRY2W/ScG1TwPkOM/kevyxMyq8Tgf1k6zycULp Fv/2C++SNdiQsZx65BrsWLiUoMjrcKgpojx+6hRsNgVJkKW3/bL9+qBgL A==; X-IronPort-AV: E=McAfee;i="6400,9594,10369"; a="362987070" X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="362987070" 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:55 -0700 X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="635523787" 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:52 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Maxime Coquelin , Alexandre Torgue , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 21/36] serial: stm32: Fill in rs485_supported Date: Mon, 6 Jun 2022 13:04:18 +0300 Message-Id: <20220606100433.13793-22-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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add information on supported serial_rs485 features. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/stm32-usart.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index b7b44f4050d4..db3dd9731ee1 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -1375,6 +1375,13 @@ static void stm32_usart_deinit_port(struct stm32_port *stm32port) clk_disable_unprepare(stm32port->clk); } +static const struct serial_rs485 stm32_rs485_supported = { + .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RTS_AFTER_SEND | + SER_RS485_RX_DURING_TX, + .delay_rts_before_send = 1, + .delay_rts_after_send = 1, +}; + static int stm32_usart_init_port(struct stm32_port *stm32port, struct platform_device *pdev) { @@ -1394,6 +1401,7 @@ static int stm32_usart_init_port(struct stm32_port *stm32port, port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_STM32_CONSOLE); port->irq = irq; port->rs485_config = stm32_usart_config_rs485; + port->rs485_supported = &stm32_rs485_supported; ret = stm32_usart_init_rs485(port, pdev); if (ret) -- 2.30.2