From patchwork Mon Nov 7 12:45:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kumaravel Thiagarajan X-Patchwork-Id: 1268 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2036611wru; Mon, 7 Nov 2022 05:06:35 -0800 (PST) X-Google-Smtp-Source: AMsMyM5pxqGhpVvpheeMu1b8CauKrX+Z0juLBXP+22nkIlDBLpna94LOx4LWsPQ//C2E4KSvFscx X-Received: by 2002:aa7:c913:0:b0:462:e375:a1fe with SMTP id b19-20020aa7c913000000b00462e375a1femr50110981edt.156.1667826395663; Mon, 07 Nov 2022 05:06:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667826395; cv=none; d=google.com; s=arc-20160816; b=ldJZbJufoj7PdShl+JVdjaeMH/xmmy3Wg2mfy8FFmNtd1NZFvMi6EhQ0UUZm4L8DRF nd6qP5o3SlrVG/lNN1L9maIJkYMICdgzETa5xJ8lT9MPoEgP5Nx6DRYhgJT+NlDq2vKe G/jvhFIwnGzlkTBE/l95Ym2S80bYBXHSHSDLp+cbGUjJro9diQqJHFWH+AIl8oW5uYoK MhBcxeXByzRW9wWrNboV43Dc6AXt646yRx+MByyN2UrAhl/mPFXs9iFZIrf1WXuiNzcm VfbipHOQthCXCOPKhyMIgOQ28TbjF1mQ2O5SeYxKSZPP2qHD6Iybw+qavnys1WvioVkn hOsA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=bpqw4jyFKt3Uj2QuX56mE7steBNUFALysdcS2l9CTCo=; b=T5VkPpvG+Whql9Cn6pkYHy2xalGmsvFwPt0Vjzf7cKAw+x7ZtQ+3x98AmUXT+QNonF eU1NnS0hBQPNkxcdx0nQ1w08EVlH0oGbRKDYdxI4aRAnurJFKIQnG7hqmk/aML9G68BZ PTp8HqY1Yhvj4ul3c4YmetZgYV//X74oH+yucgbYRuPR1JsuT5/DW4+h0a+eC14eY9Be HGXNEpVww1LUwBIbnrZSxHzhTfG72ki+6ypgdjzlY4lhP+UjBoaIxJVTbaoub4uV7UTU YnM7C8w0Ompq6qqRsS7iXCZ89+tfBEYATW3CqelQuflirTTwRQDqlvEgtnyFSQqL3pPw pgow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=dNGfxH7B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g18-20020a1709065d1200b0077951929340si10769096ejt.271.2022.11.07.05.06.09; Mon, 07 Nov 2022 05:06:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=dNGfxH7B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232339AbiKGMpU (ORCPT + 99 others); Mon, 7 Nov 2022 07:45:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231961AbiKGMpR (ORCPT ); Mon, 7 Nov 2022 07:45:17 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE3341C100; Mon, 7 Nov 2022 04:45:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1667825115; x=1699361115; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5NrLZc9CbvsifpH0FBZCCeDnP4oPxJwBypm9blY+0a8=; b=dNGfxH7BVvvdIbCfLzD/DYxRr9A0SZv9BD8y/20R+6Ju3sAS26/awz5y ja9rJCQ5I5MzhQw4CGjehzbQYHhpCr/u8kGPxzXNjIwYMIB6/Jaf3dE4S TJWdinLIEvTU2OHJICjrpnz8Fr6uac+yCavPMgO39oa9HqNfLcHk7rRha B4hJLeLApn6PhBvHi8yg9SaGgpKQSpvW2uAylmlsvulzlJJuYQ7FOyf8N e44O66DhrK5nln54lOfl531Ns+XhrlOOdUG71TW+ErTLd+EvwBO75DIWl eXAPLrItkHnrsHXIeiRZQMDJXPNzf9n0qp2qBkMcHFhd3bOyIlXDbazJK g==; X-IronPort-AV: E=Sophos;i="5.96,143,1665471600"; d="scan'208";a="185698289" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 07 Nov 2022 05:45:13 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Mon, 7 Nov 2022 05:45:08 -0700 Received: from CHE-LT-UNGSOFTWARE.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Mon, 7 Nov 2022 05:45:03 -0700 From: Kumaravel Thiagarajan To: , CC: , , , , , , , , , , , , , , , Subject: [PATCH v3 tty-next 0/3] 8250: microchip: pci1xxxx: Add driver for the pci1xxxx's quad-uart function Date: Mon, 7 Nov 2022 18:15:14 +0530 Message-ID: <20221107124517.1364484-1-kumaravel.thiagarajan@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748842730846088441?= X-GMAIL-MSGID: =?utf-8?q?1748842730846088441?= pci1xxxx is a PCIe switch with a multi-function endpoint on one of its downstream ports. Quad-uart is one of the functions in the multi-function endpoint. This patch adds device driver for the quad-uart function and enumerates between 1 to 4 instances of uarts based on the PCIe subsystem device ID. The changes from v1->v2->v3 are mentioned in each patch in the patchset. Thanks to Andy Shevchenko, Ilpo Jarvinen, Chritophe JAILLET, Geert Uytterhoeven for their review comments. Kumaravel Thiagarajan (3): 8250: microchip: pci1xxxx: Add driver for quad-uart support. 8250: microchip: pci1xxxx: Add rs485 support to quad-uart driver 8250: microchip: pci1xxxx: Add power management functions to quad-uart driver MAINTAINERS | 7 + drivers/tty/serial/8250/8250_pci.c | 24 +- drivers/tty/serial/8250/8250_pci1xxxx.c | 536 ++++++++++++++++++++++++ drivers/tty/serial/8250/8250_pcilib.c | 31 ++ drivers/tty/serial/8250/8250_pcilib.h | 5 + drivers/tty/serial/8250/8250_port.c | 8 + drivers/tty/serial/8250/Kconfig | 15 + drivers/tty/serial/8250/Makefile | 2 + include/uapi/linux/serial_core.h | 3 + 9 files changed, 609 insertions(+), 22 deletions(-) create mode 100644 drivers/tty/serial/8250/8250_pci1xxxx.c create mode 100644 drivers/tty/serial/8250/8250_pcilib.c create mode 100644 drivers/tty/serial/8250/8250_pcilib.h