From patchwork Thu Oct 20 16:20:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13013730 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 603DFC433FE for ; Thu, 20 Oct 2022 16:22:41 +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:Cc:To:Message-Id:Date:From:MIME-Version :Subject: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=mUjUyh5zG2Sq2cLJTdPxKxTkguPoEwThyW5wHp4XqBs=; b=q0RhGHDbAlZgQb NEXAkeEjB8T15cce8YegznaEXbLsshg5pBWb3Ha+GF3uTlTu8WMh3E4lnAzexXKyo2lZm/PbY45AE Kfk1CFZShQHOLYAHptpO3GZL3IN/NSqEkdOSV4wgL52zqDiSfHGJOE+N+6IPwhD2O9SOSCyxkdEcb o4XHZDxARGoo7+Q8VxQz2w2ut4LrCEYUIqwnZdOhiFK0YWn00EIASBZEkZgXghZTWWdkpV5FuH0/N xHU0zYdiQIDKEJRj4qoWfqSqa32YnZDQ57Nqzj73MKXB6h1IY+7h9IDRqopRuS7K9JcNAXgRaLFHx DsALEIFJ7LBXB45mKkUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYIa-000Gvp-NU; Thu, 20 Oct 2022 16:21:36 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYIH-000Ghz-AC for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2022 16:21:19 +0000 Received: by mail-wr1-x432.google.com with SMTP id b4so35351225wrs.1 for ; Thu, 20 Oct 2022 09:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=cc:to:message-id:date:from:content-transfer-encoding:mime-version :subject:from:to:cc:subject:date:message-id:reply-to; bh=aLQaH8kLuBy4zyHgqqB9tZsey4wfxoCGASmgyFWFngw=; b=thziFT6DNYotuZscweGhf9OW1tixZcOTuo9h57iHpsIH+H26bkct4tE0xoxQwVjt1q Lbm1cRWnAIbwV3fFDyE0g/+K5FSCh/r4UFSTYHw+FJJutHO+p7p+9WVfvcIT2Bed3Ha3 I84z5iOYFroBA7YIh5h1/rREzxBUIbJAdgr1Lx7nlVpqZGlpFzULGA/hpQSoiVs4u0bu l0uLPB3GlC+4jEmrGX/LQDTL4RUdV2HVp7/1NDYV0A1kSWdL0Ny+EN0v+Z91NUNvjg7l eSll1il8fGyG4hkGh080dyVFauYSp+yERMUWNKN8aKLFL0SZGOk0vNDzVD/eoLfcAv7D Yk1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:message-id:date:from:content-transfer-encoding:mime-version :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aLQaH8kLuBy4zyHgqqB9tZsey4wfxoCGASmgyFWFngw=; b=dWeaKXVem5UY90XJE8S7St/RhiuNBGoi9ik9SjsdBNbfZYmGnUJE/5Bv5FjuOIzIWf yoZ+MQ/BAJd4ntZYR2nCCvrOgl3mwhmmE4B7L7AnRh6Kx+GrN+1L1LV5KQ71JK5rgvII zr1q2Fd32ybakypcWZiqFa3HnOLLpWZW+OCPLcUGJ8uVgtEETV4Bek+HDaEv4MsB+vLc omQrY8/UxgKHuEWOGuyi4wMnwgEouh25qS8iWBXgZc3FW6I9KkNA7Rej6I9dFvDDnmay FJ4cxLGbdeTyqZDSmAdDIDr3YcnkSHww1tSe28eobAD8tgQTYuCuLdffYxKkHWjcanue /4KA== X-Gm-Message-State: ACrzQf0VFbDDEBXUN2YcgzhcQQLpze8nteELVi/V2uUSxVEdFmUKzrLw yGddBgl/mfy+D9rEHIrK8WsIKA== X-Google-Smtp-Source: AMsMyM6fgd2aVPbZkJzGj2cE/qWnqPixgyVyRefkSahrpYdsZfcXFR1KBGOo7OW4gRXCD7Ic7udFfQ== X-Received: by 2002:a5d:4748:0:b0:22e:32c1:d11e with SMTP id o8-20020a5d4748000000b0022e32c1d11emr9426454wrs.672.1666282869644; Thu, 20 Oct 2022 09:21:09 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id m14-20020a05600c3b0e00b003b4fe03c881sm208028wms.48.2022.10.20.09.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 09:21:09 -0700 (PDT) Subject: [PATCH v3 0/5] Add MediaTek MT6357 PMIC support MIME-Version: 1.0 X-b4-tracking: H4sIAFx1UWMC/3WNzQqDMBCEX0X23C1xQ6rtqe9ResjPWgOaSBIFEd+9ofeehm/gmzkgc/Kc4dEckH jz2cdQQV4asKMOH0bvKgMJolYIhXO5SdVhXpclpoJKSdGbnljKAapkdGY0SQc7Vi2s01TL0ecS0/47 2ajG6+/eRihwaDujyZET+v40ep+8SXy1cYb3eZ5flmqp1bQAAAA= From: Alexandre Mergnat Date: Thu, 20 Oct 2022 18:20:44 +0200 Message-Id: <20221005-mt6357-support-v3-0-7e0bd7c315b2@baylibre.com> To: Mark Brown , Chen Zhong , Matthias Brugger , Lee Jones , Liam Girdwood , Rob Herring , Dmitry Torokhov , Fabien Parent , Krzysztof Kozlowski Cc: AngeloGioacchino Del Regno , Fabien Parent , Rob Herring , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mattijs Korpershoek , devicetree@vger.kernel.org, linux-input@vger.kernel.org, Alexandre Mergnat X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2596; i=amergnat@baylibre.com; h=from:subject:message-id; bh=wWh5SRjmED4SwyZ9UHZwZdSkaEuoagXKZt6zSsawvDw=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBjUXV05CtA7G4yM+g6ZR3/d2uEFP5CCn8oCzeAiGa9 eRV4aD6JAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCY1F1dAAKCRArRkmdfjHURcP/D/ 9OBECu2FN8NBAfx/FBvllaSMGjLY31S/qRwTAbxYplcM8+L9FUiEYMvQBFCDCcLp3Q+DieQGQ5eRHw z5aUwVcTOQepKtCP/25LHSjlx2RhMBnwMZydbNlDuMc+C11h8TimWqIMRFg9Qe3yb0EVsZTj8jdu9y F1zXIE5Z8bkbjnIec7vRLmPAIaViDqZumDrCnFQDoFXjXQ2xc1Kw3lLqPYml8MScCGb+82BI7ZAtAO gEoAvYSSBKdf1xTX1T2DHm3tCV4tH78v+alYuUttufkB1hpfLl5sTfD8UwKkkMCYbkja0rjFwgvEK9 hQna405lQPO90Bbux8txtOfnFzQsx/G0NL7AbjD9W6FOFygjBe/tzG/CQoRBR8Fz+BR3j6jpqrMwGr tW+N4/Y63DUF2pruZG44NkL6MyE3NBBU9LlqR5ZZiwm5BR0Qg0F1UxE9PF1HWiL8DQG73S+A1afrIW tIS3X8Kpjq9WgKyoGa8H8SJNMKoEOQfR5iLCfgjavpMgBtjmP7arIPGsYYhvV/cRbpJ3FZRO5IuCa2 tZpg8I3iuVeztN+bjVC4KhmaYbvIePgH5FysNsUJm8dKmyo1b5Uk/3lpLx9aWMNtZB36OBAMUASd8w dbcLc0pnsxPHu759gG3Rguq7GeYcNS851ZQXnFZMen5y0fouEVZjOiEZVVag== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221020_092117_420278_A4C7B2CA X-CRM114-Status: GOOD ( 13.15 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, This patch series adds MFD, PMIC keys, and regulator support for MT6357. MT6357 is a MediaTek PMIC very similar to MT6358. Regards, Alex Changes in v3: - To be consistent with regulator/driver.h and helper.c, shift variables have been removed and the mask values have been directly shifted. - Remove index tables and rework volt tables to use set/get helper functions. - Add comment to structure and function. - Fix Fabien Parent mail address. - Link to v2: https://lore.kernel.org/r/20221005-mt6357-support-v2-0-f17ba2d2d0a9@baylibre.com Changes in v2: - Rebase - Fix typo - Remove dependencies with https://lore.kernel.org/all/20220415153629.1817202-1-fparent@baylibre.com/ which is no longer relevant. Previous versions: v1 - https://lore.kernel.org/all/20220531124959.202787-1-fparent@baylibre.com/ To: Lee Jones To: Rob Herring To: Krzysztof Kozlowski To: Matthias Brugger To: Dmitry Torokhov To: Chen Zhong To: Liam Girdwood To: Mark Brown To: Fabien Parent Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-input@vger.kernel.org Cc: Fabien Parent Cc: Rob Herring Signed-off-by: Alexandre Mergnat --- Fabien Parent (5): dt-bindings: mfd: mt6397: add binding for MT6357 dt-bindings: input: mtk-pmic-keys: add binding for MT6357 PMIC dt-bindings: regulator: Add binding schema for mt6357 regulators regulator: add mt6357 regulator Input: mtk-pmic-keys: add MT6357 support .../bindings/input/mediatek,pmic-keys.yaml | 1 + Documentation/devicetree/bindings/mfd/mt6397.txt | 1 + .../regulator/mediatek,mt6357-regulator.yaml | 292 +++++++++++++ drivers/input/keyboard/mtk-pmic-keys.c | 17 + drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/mt6357-regulator.c | 453 +++++++++++++++++++++ include/linux/regulator/mt6357-regulator.h | 51 +++ 8 files changed, 825 insertions(+) --- base-commit: 7c69ce28cba3d6ad011f86a5d18dc8c04a921b29 change-id: 20221005-mt6357-support-55308b82e33f Best regards,