From patchwork Wed Aug 24 20:00:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kumaravel Thiagarajan X-Patchwork-Id: 600123 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BE4EC00140 for ; Wed, 24 Aug 2022 14:29:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235745AbiHXO3R (ORCPT ); Wed, 24 Aug 2022 10:29:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237976AbiHXO3R (ORCPT ); Wed, 24 Aug 2022 10:29:17 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E84257542; Wed, 24 Aug 2022 07:29:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661351355; x=1692887355; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=6afhEAvhEDkE/G5SdTBUp5GkN6q4ddNyAjn8YS4qkao=; b=PzNwvwZ5Cqh94X4Ak1e9Qe2kZDVw9LpdSdnp1UDKWTHpaC37frHF2zKa ciE+cS/OnFVIxL0HKfH/+ggTV1Ft6g0qQvjQhH6WaC7aHUey+XxuJVerC 8pAD1/roRwVLBfhkx56pFqkNKuV6kBI/Oa9N7gJvL9nNmms2nn4AuwJ0u lt6b/zSbfDyUPlKSY5SK9p3XxT7SkKnotPBiKdit1fzBurEtyTD0W8eEu 3wHvOXNwA9X6n9ry/p1ykgpLqEm1/VdlrPSD8nOmNiqSDLIXp6QfRWVo0 V15/D5wwRlV2/6pslgC5wibAnAGZ6XhyFqOQpC6QZy5S5LFFB1ojitnrQ Q==; X-IronPort-AV: E=Sophos;i="5.93,260,1654585200"; d="scan'208";a="187868677" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 24 Aug 2022 07:29:15 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Wed, 24 Aug 2022 07:29:14 -0700 Received: from CHE-LT-UNGSOFTWARE.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Wed, 24 Aug 2022 07:29:12 -0700 From: Kumaravel Thiagarajan To: , CC: , , , , Subject: [PATCH v1 char-misc-next 0/5] misc: microchip: pci1xxxx: Add auxiliary bus driver and the GPIO driver for PIO function of pci1xxxx. Date: Thu, 25 Aug 2022 01:30:42 +0530 Message-ID: <20220824200047.150308-1-kumaravel.thiagarajan@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org pci1xxxx is a PCIe switch with a multi-function endpoint on one of its downstream ports. PIO function is one of the functions in the multi-function endpoint. PIO function combines a GPIO controller and also an interface to program pci1xxxx'x OTP & EEPROM. This patch adds an auxiliary bus driver that enumerates separate child devices for gpio and OTP/EEPROM interface and the gpio controller driver for the first child. Kumaravel Thiagarajan (5): misc: microchip: pci1xxxx: load auxiliary bus driver for the PIO function in the multi-function endpoint of pci1xxxx device. misc: microchip: pci1xxxx: load gpio driver for the gpio controller auxiliary device enumerated by the auxiliary bus driver. misc: microchip: pci1xxxx: Add functions to configure gpio pins as input / output, get status, handle I/O for gpio pins. misc: microchip: pci1xxxx: Add gpio irq handler and irq helper functions irq_ack, irq_mask, irq_unmask and irq_set_type of irq_chip. misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers. MAINTAINERS | 8 + drivers/misc/Kconfig | 1 + drivers/misc/Makefile | 3 +- drivers/misc/mchp_pci1xxxx/Kconfig | 10 + drivers/misc/mchp_pci1xxxx/Makefile | 1 + drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c | 166 +++++++ drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.h | 28 ++ .../misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c | 438 ++++++++++++++++++ 8 files changed, 654 insertions(+), 1 deletion(-) create mode 100644 drivers/misc/mchp_pci1xxxx/Kconfig create mode 100644 drivers/misc/mchp_pci1xxxx/Makefile create mode 100644 drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c create mode 100644 drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.h create mode 100644 drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c