From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 148D98C09 for ; Tue, 8 Nov 2022 16:43:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=r3eNyIjxDKk23f9oCDU73gWOczaFl0qT6zUOuTRb0KQ=; b=AzGdUlh9t8JDBnIuNxuDjRNcW0 fFfcdGUwj0KSqsLFPDfXaN9OWeoMQwAwz8WJ13HVKS/VDc2pfYP5S+uYwA61hl+0e2ijMVdW+jynO POEuP+WLohwvLH9sOMp7uEmB3KwYO2gkaBwgX0SUQzAldHI8YofqnNQS1VrwOUurX/LxYMKTZGdrH w/RwBzIxrB4JKwsbBhR88tUPwJ8kN65Z4oppRBtIXJX9XpSB5vZBrXjQ62u9sgQthc2e+DLiZDVT9 HW8DO3+9ax8uuRYzYe70L8AjvLpZWc2gGNz4Jvo9frdtOiRTq1mAKWdOJqPeNYfECF9l7KNm4uBRE tGdTKg4g==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:35172) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1osRWm-0003R2-7b; Tue, 08 Nov 2022 16:32:44 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1osRWg-0004su-7V; Tue, 08 Nov 2022 16:32:38 +0000 Date: Tue, 8 Nov 2022 16:32:38 +0000 From: "Russell King (Oracle)" To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Lee Jones Cc: Alyssa Rosenzweig , Andy Shevchenko , asahi@lists.linux.dev, devicetree@vger.kernel.org, Hector Martin , Jonathan Corbet , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-gpio@vger.kernel.org, Petr Mladek , Rasmus Villemoes , Sergey Senozhatsky , Steven Rostedt , Sven Peter Subject: [PATCH v3 0/7] Add Apple Mac System Management Controller GPIOs Message-ID: References: Precedence: bulk X-Mailing-List: asahi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) Hi, This is version 3 of the series adds support for the Apple Mac GPIO driver. These GPIOs are hadled via the System Management Controller. The first patch adds the core SMC support to the MFD subsystem. Patch 2 prepares the printf code for printing generic fourccs, as required by patch 4 and 7. Patch 3 adds the DT binding documentation for the rtkit backend. Patch 4 adds the rtkit backend for the SMC core. Patch 5 adds the device tree updates for the rtkit communication channel and gpio sub device to DT. Patch 6 adds the DT binding documentation for the gpio client. Patch 7 adds the gpio client. Patches mostly taken from the Asahi project and then modified due to review comments from the previous postings. I may have missed some comments as there's been quite a lot of discussion on previous postings. Documentation/core-api/printk-formats.rst | 32 ++ .../devicetree/bindings/gpio/apple,smc-gpio.yaml | 37 ++ .../devicetree/bindings/mfd/apple,smc.yaml | 67 +++ arch/arm64/boot/dts/apple/t8103.dtsi | 27 ++ drivers/gpio/Kconfig | 11 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-macsmc.c | 245 +++++++++++ drivers/mfd/Kconfig | 4 + drivers/mfd/Makefile | 1 + drivers/mfd/macsmc.c | 239 +++++++++++ drivers/platform/Kconfig | 2 + drivers/platform/Makefile | 1 + drivers/platform/apple/Kconfig | 34 ++ drivers/platform/apple/Makefile | 7 + drivers/platform/apple/macsmc-rtkit.c | 455 +++++++++++++++++++++ include/linux/mfd/macsmc.h | 104 +++++ lib/test_printf.c | 39 +- lib/vsprintf.c | 35 +- 18 files changed, 1328 insertions(+), 13 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/apple,smc-gpio.yaml create mode 100644 Documentation/devicetree/bindings/mfd/apple,smc.yaml create mode 100644 drivers/gpio/gpio-macsmc.c create mode 100644 drivers/mfd/macsmc.c create mode 100644 drivers/platform/apple/Kconfig create mode 100644 drivers/platform/apple/Makefile create mode 100644 drivers/platform/apple/macsmc-rtkit.c create mode 100644 include/linux/mfd/macsmc.h -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!