Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp281303iof; Mon, 6 Jun 2022 03:26:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGccMv7hflvWVPYA8/cE0qtw2i0KOcxRp7H6xUSJnOsn63Fe/2flJtWoc7NeuBwvrOF3Sw X-Received: by 2002:a17:902:b10e:b0:161:a747:7683 with SMTP id q14-20020a170902b10e00b00161a7477683mr24382074plr.151.1654511206275; Mon, 06 Jun 2022 03:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654511206; cv=none; d=google.com; s=arc-20160816; b=hkQcl0FwhkidZsXNe/Rw6u1OxNGbGrmafBMWJjEUYG2GsKChoYx5a73AXBxb3Kaj5E IMjI/+voJKtfSUoJxUf4EBuNMWRo/zURPaueIbu8l6db23DUzWpAM9qSkoFcPM2AfGFY QjPw2XpSRaxQ+xUNRGR8XrVw/Q1FQuaMob7dB5Pezzrr79divql9kiMe2+/+GT+svGEx SchvgQjiqxmb4NgW7mezJZyZB85Qxq8yZiCyuKdI01aPUS74xUzNuTm8ATYQnImkm679 ivDHK4wwwExSVjS4aY2696hQ+3VPt3fCMnGK/g0GpjqVFIYtQONc1/1SMzZi4IBVZ2+j g8DQ== 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=AgISonbTQ2VclLciSRSVeY6HAAIXqUBKOTqLRTpmNWc=; b=L8jnvC8NLKu4VESbP9E0upQNTBoixf/Ohcoucxj0c7tZRm7PfZZ7O72jTYnrqZkDAV LmKE3LoRO7nU4liAD9dA4P4zKNbUrdG+6Ig8yVb3XsQJ3EkeXhAS2yA3Q9b9SKMr6DRW UVd19XLO6XC1yOPg243N9CdaJyNToxB6jtvKiybSOwG1ed3udTFTvrG0LsJEirshVSv+ nqrsad5FZHkJAkGjklY9SvL1FJ36K5zGYckMJEy+gGHeuoHKOoQXlt4yn7FB+0jiaCHB Xx7nvkmCANHL+9X3jxYEE8ioUURj8lpP4cngonjWRETHDlpAzuWk4O6KREN43O7els4K sFrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="XTza74f/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id 193-20020a6301ca000000b003fd55608dccsi10480354pgb.192.2022.06.06.03.26.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 03:26:46 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="XTza74f/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 5061619590E; Mon, 6 Jun 2022 03:06:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233522AbiFFKGZ (ORCPT + 99 others); Mon, 6 Jun 2022 06:06:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233290AbiFFKFd (ORCPT ); Mon, 6 Jun 2022 06:05:33 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEEE17037D; Mon, 6 Jun 2022 03:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654509931; x=1686045931; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mvMP5iOD0jyEc6hOIs4E2k/EmjgKpS0mQlR4xWMekx0=; b=XTza74f/4pFYwUzFa9fLyuZ3nV41yw6QForA+rjeLUYyq8mKEGbT02Dn tKaU7R7dWoDrC67ImBO0S6ZzAHLuzT9P+GaDeI/SJrlN1sC/dtjQYr32W GopXaQWophrXv5E5Z9xjeOw6j7J50vKLYvVhtgXG7ltNTVLl1wYasD+GR Gmd4d/ZpCuxsWwTV3+Ab5+jpPClCQCGr3sQiyui8FMlR0Cg/x5HomRMT/ lfSX9xEEpSNENRJfxY7C00cyIL0TxF/ln+7uFsIabw7sLKN3Y4UMQqomH ILBDFasSQYnDjABQe8xmpG18XFSpvCih/AA6Yizwua9qmBrNctt5PLwjS g==; X-IronPort-AV: E=McAfee;i="6400,9594,10369"; a="362987040" X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="362987040" 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:10 -0700 X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="635523560" 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:08 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Andy Shevchenko , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 06/36] serial: 8250_dwlib: Fill in rs485_supported Date: Mon, 6 Jun 2022 13:04:03 +0300 Message-Id: <20220606100433.13793-7-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. When the driver is using em485, take advantage of serial8250_em485_supported. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/8250/8250_dwlib.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/tty/serial/8250/8250_dwlib.c b/drivers/tty/serial/8250/8250_dwlib.c index fbabfdd8c7b8..120b29519d74 100644 --- a/drivers/tty/serial/8250/8250_dwlib.c +++ b/drivers/tty/serial/8250/8250_dwlib.c @@ -149,6 +149,11 @@ static bool dw8250_detect_rs485_hw(struct uart_port *p) return reg; } +static const struct serial_rs485 dw8250_rs485_supported = { + .flags = SER_RS485_ENABLED | SER_RS485_RX_DURING_TX | SER_RS485_RTS_ON_SEND | + SER_RS485_RTS_AFTER_SEND, +}; + void dw8250_setup_port(struct uart_port *p) { struct dw8250_port_data *pd = p->private_data; @@ -159,8 +164,10 @@ void dw8250_setup_port(struct uart_port *p) pd->hw_rs485_support = dw8250_detect_rs485_hw(p); if (pd->hw_rs485_support) { p->rs485_config = dw8250_rs485_config; + p->rs485_supported = &dw8250_rs485_supported; } else { p->rs485_config = serial8250_em485_config; + p->rs485_supported = &serial8250_em485_supported; up->rs485_start_tx = serial8250_em485_start_tx; up->rs485_stop_tx = serial8250_em485_stop_tx; } -- 2.30.2