From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C426CECAAD5 for ; Tue, 6 Sep 2022 13:20:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=IY3kN34ou3Ljypj/U2gLSv336VON6MweocaTSepPdsA=; b=Ru/REHGKZfBThx i07uSoifI/fr2IwRDu/n4rYQuQFeNcv4OfAAbfeJSq24Mg6Qnnrkaxj/AKYco8t6O/sdCIUVv+xwu HGSH9xRkNKs+RbNXPz1X4Vo0FAoZHTSRmmddhj+AXB9NDGRPdEDJoz3atLp7ArP4kuaogabs47fIa EzT/u3zB2+pSzWAzeWbbfj/8EV7AWUt+P87fkYtLga7ahucvpE/YQO6NbjyJXwU+5klIn405XY7oi ua7CZUAuheLONPdz5NSe/DqCXkqv6c8vJFaPX/geZVsUVTef3M50Po21U0KQwp9pfAUwxbLGqR7cN 4r/yLgvttBAy7sGffu4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVYTf-00DhFu-Ic; Tue, 06 Sep 2022 13:18:55 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVYTc-00DhCD-8h for linux-arm-kernel@lists.infradead.org; Tue, 06 Sep 2022 13:18:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:Content-Type:MIME-Version: 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:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=abOmnhnyd+sWtL9SSFYhJDEb2jQ0BuhJ03Z3IXa5TEI=; b=SU+8sj/4hl+sw0I48s5fZ3iBM+ Nk6Tq+n+HmeldWmI2R6oLROiYD/GtVJFqdWaVMy+pYzgwn9+jZkqwSIqgN53v74dLPFV2smVXDvQ0 f9Grp8po3LJSbx1xkU7N/HfwJiudIM3umIePLrMAP9xa9M1gkFpKvM0S59LulOs8l7D4et4aiQq3M NAWoD072DAi4BDe6MkFpMQnYax9+0jmMDept6EyJubKr+NbHSo2wqQFmlM+bb54iZcsG2c21oboie TlAiBbDyT9grJNjMXgpodwTW54AcS6EaaD/IgBhtltyQg0YAGDNhk9BX5f7auMFLOOr8w/dapvRJI vSAkyB0w==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34146) 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 1oVYTD-0003qY-55; Tue, 06 Sep 2022 14:18:27 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1oVYT8-0008IJ-Ka; Tue, 06 Sep 2022 14:18:22 +0100 Date: Tue, 6 Sep 2022 14:18:22 +0100 From: "Russell King (Oracle)" To: Arnd Bergmann , Lee Jones , Linus Walleij Cc: Alyssa Rosenzweig , asahi@lists.linux.dev, Bartosz Golaszewski , 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 , Rob Herring , Sergey Senozhatsky , Steven Rostedt , Sven Peter Subject: [PATCH v2 0/7] Add Apple Mac System Management Controller GPIOs Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220906_061852_323627_AC1223DD X-CRM114-Status: GOOD ( 16.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, [Andy dropped from the Cc lists; he's taking a break.] This series adds support for the Apple Mac GPIO driver. These GPIOs are hadled via the System Management Controller. The first two patches add the DT binding documentation for the new drivers. No changes from the first posting (I think there's still some discussion going on about how best to handle these.) Patch 3 adds apple_rtkit_poll() and has had no changes since v1. Patch 4 is new, extending the existing FourCC format code to be able to print other endian FourCC codes. Patch 5 adds the SMC core and rtkit driver. Changes in v2 include properly limiting the data size (since it is limited to the width of the size fields in the mailbox messages, not the shmem size) and also to properly cleanup after failure to send the initialisation message. Patch 6 adds the SMC GPIO support. Changes in v2 include some of the issues Andy pointed out, Patch 7 is new, adding the SMC nodes to the dtsi. Patches taken from the Asahi project. Documentation/core-api/printk-formats.rst | 32 ++ .../devicetree/bindings/gpio/gpio-macsmc.yaml | 28 ++ .../devicetree/bindings/mfd/apple,smc.yaml | 65 +++ arch/arm64/boot/dts/apple/t8103.dtsi | 26 ++ drivers/gpio/Kconfig | 11 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-macsmc.c | 242 +++++++++++ drivers/platform/Kconfig | 2 + drivers/platform/Makefile | 1 + drivers/platform/apple/Kconfig | 49 +++ drivers/platform/apple/Makefile | 11 + drivers/platform/apple/smc.h | 28 ++ drivers/platform/apple/smc_core.c | 249 +++++++++++ drivers/platform/apple/smc_rtkit.c | 453 +++++++++++++++++++++ drivers/soc/apple/rtkit.c | 6 + include/linux/mfd/macsmc.h | 86 ++++ include/linux/soc/apple/rtkit.h | 12 + lib/vsprintf.c | 35 +- 18 files changed, 1331 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-macsmc.yaml create mode 100644 Documentation/devicetree/bindings/mfd/apple,smc.yaml create mode 100644 drivers/gpio/gpio-macsmc.c create mode 100644 drivers/platform/apple/Kconfig create mode 100644 drivers/platform/apple/Makefile create mode 100644 drivers/platform/apple/smc.h create mode 100644 drivers/platform/apple/smc_core.c create mode 100644 drivers/platform/apple/smc_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! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel