From patchwork Thu Sep 1 13:54:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King \(Oracle\)" X-Patchwork-Id: 602014 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 1923EC0502C for ; Thu, 1 Sep 2022 13:54:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234453AbiIANyT (ORCPT ); Thu, 1 Sep 2022 09:54:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233421AbiIANyS (ORCPT ); Thu, 1 Sep 2022 09:54:18 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5776A205EA; Thu, 1 Sep 2022 06:54:14 -0700 (PDT) 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=OIuuWZHIE79RchMzxo9rcKTVtQlB+aNlI5Cl+pfkoGQ=; b=G1eBjNaG1b4RpXR2bE4d7P2XwL NJi248a9rKrf89X3PkR4RzYu0kirMsJsrNYYyibj0m1eu8cAecuqrjTmM4ZwRPi6v98OII0/b/IVU Mus0CF9MaDTbP4mxUBS4GUJN/Jfcd3Cl8kmsiQaBkwcItL+QnoLXaDPsTaCMk+ByNaeIjBoXUSIqK wlDUm77bhGcuWewBKj7gEP105Mu7/4eR0MBvWM9yV12MdDOicHRN79pizFkKt42qJ/rmPEYCicVrg FREe4ait+/J96hZgfpBNIkRuiv2C2HMtxI2sQ/1P47hWOC8dgtR2zntTgjwVo2CwThPE6APsK0Mm6 fV3x/zug==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34038) 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 1oTkdw-0005vl-CF; Thu, 01 Sep 2022 14:54:04 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1oTkdt-0003Vs-Us; Thu, 01 Sep 2022 14:54:01 +0100 Date: Thu, 1 Sep 2022 14:54:01 +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 , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, Rob Herring , Sven Peter Subject: [PATCH 0/6] Add Apple Mac System Management Controller GPIOs Message-ID: MIME-Version: 1.0 Content-Disposition: inline Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Hi, 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. The second two patches add the core System Management Controller support. The last two patches add the GPIO support. DT updates will follow once the bindings have been reviewed. Patches taken from the Asahi project. .../devicetree/bindings/gpio/gpio-macsmc.yaml | 28 ++ .../devicetree/bindings/mfd/apple,smc.yaml | 57 +++ drivers/gpio/Kconfig | 11 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-macsmc.c | 394 ++++++++++++++++++ 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 | 451 +++++++++++++++++++++ drivers/soc/apple/rtkit.c | 6 + include/linux/mfd/macsmc.h | 86 ++++ include/linux/soc/apple/rtkit.h | 12 + 15 files changed, 1386 insertions(+) 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 Signed-off-by: Russell King (Oracle) Reviewed-by: Sven Peter Reviewed-by: Eric Curtin Reviewed-by: Linus Walleij