Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9958686pxu; Tue, 29 Dec 2020 09:34:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwOZKDYY0CkOZOmJsxhLufp3MaFa9oQs0IHbzbNgnH6cabML6TERzIOJtZA+ilnh3hbs79P X-Received: by 2002:a17:906:1f07:: with SMTP id w7mr24095547ejj.519.1609263242901; Tue, 29 Dec 2020 09:34:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609263242; cv=none; d=google.com; s=arc-20160816; b=AK7POTlDEOBqgRG4efwLCCCNHw42YXf6dBbCLTSHi2Y8IYsFL3XtdD8PJjfQHF6vIo vuy07Fu/DRXNKJFr7S3kynHTQNADlynXmCwczDbm4yBiRap+ShjIHKSFQ6HIsLorlc+A v8eH+E/51woaXuv74CCf7bSfyt12dC2jcbyTKTry6llyv0dHC9WXus0rwRETBm2yeelG 5FEEXx4ISgwqYwyUUaFtWZyHMgE9HvBBmxyVbE+UohmNJys1EO3LhFfscSGdFrtL7oL9 aw5VpT/cpNeqNqOXRc8jMTQM+2H+SH257St87rS57cTkFrKKfE5OY35AtdxRxjWxxPG0 xVtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=NpRbovEFhIUWDeLgLi1cmLAq8hw0Nkuzyn5MTBdA9MY=; b=sM73DIPT/dhAgPuG8q24IyJCixthf9RRzMSqETiklcP/7k151BESnCqx2vVKAeFCbo jBU0N9HX0bmxZA2+1Qxj3iSEUKyv9+qHmSA57rVkTUbnMAlQf4EY3cKnnI/j63Ui09UP uy6DiMbHdNIOAW4tjE4sna0HUNToms1psPhEShliAybHrOTV2VDf1n6c3iuPUkETh1sB jTx/CcAe5ZGzfYVLjslFspqDw+a5+vy+mxj7HkNVBGxOzrLZDGVp5BB+4XZRlKqvZr6X 8ZRqXeEZpC40UP8vBc6xv7TJNlD3A5l4/6Dpl3Cdt6RYRsZXz4dz6Jo1ZPaB/dWdKfcz De0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cb9FFcqw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx8si20976073ejb.664.2020.12.29.09.33.40; Tue, 29 Dec 2020 09:34:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cb9FFcqw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726196AbgL2RcH (ORCPT + 99 others); Tue, 29 Dec 2020 12:32:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726111AbgL2RcH (ORCPT ); Tue, 29 Dec 2020 12:32:07 -0500 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8692AC061793; Tue, 29 Dec 2020 09:31:26 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id ce23so18987967ejb.8; Tue, 29 Dec 2020 09:31:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NpRbovEFhIUWDeLgLi1cmLAq8hw0Nkuzyn5MTBdA9MY=; b=cb9FFcqwCorBCPQ8N8ipTckD/AzQQFNpSvvMeqTM6ZitmkksK6Xf2Q8nov5FVrIez1 HfpJRvWvPfin+VztGqsfHchJSXT2nJjnkvCwPEU2jBTPyEGMhkqtkPd2iKkWQPm9kT3R yCiZ19Rq6QuCEKjzljWG5k77s2EhgF9AYZ5+c+aubRwdt6ls0viIfY64IIl1FYLW6HK/ KIfLWX84ZzTvuvA7wvatcsHBKg1y8+h7dn9v+VpzKGrgq6Tg+LbDH0psuhyCNJ64rkCm uMPwGwsYJN/Ftv5nU5EXeGI2kq5euNxEjyhzCTFU33B3as6aMnbYzsNBcoa2p/JXYbaD b4uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NpRbovEFhIUWDeLgLi1cmLAq8hw0Nkuzyn5MTBdA9MY=; b=UcTNh9sV8zi/89wqlM4ts/RSGv4ZQpeDTLGQX8dVHKxf8cKN8Eq9yn89saBtGDp7a4 7a98Hbthg8CZ/9sZTIKml/xvmNPzIdoG97uvUdvpa4XgRuZIT1cr+haUZWZo5Mi3cqhK MmfmRQwkd+2ZuFAR8GLfEUl8tE0fkqiBXPe/fkOR3q1GyVLZ9cp1MnDe+1BWV1hu5B5B JbBB187Z7wpDSpUggzDJ5ICSlN3bP16x7ueDFfujneu//l4y3VumldEF7+CDvR79ND1N jbwGcVWQhQmeh4puVh5vjwP651PrHdZDe2Rkt28oTQ9NFY7PwnfTrZOGxT0x1+5ENv3f jTMA== X-Gm-Message-State: AOAM533ivYFkoRsho4rwJEDBmL7O0SgMIhL5wRfLnsbXtPdG0QdBaHOb temW29PA8vo0Aiw2rGgsJf8= X-Received: by 2002:a17:906:2499:: with SMTP id e25mr46484142ejb.446.1609263085258; Tue, 29 Dec 2020 09:31:25 -0800 (PST) Received: from localhost.localdomain ([188.24.159.61]) by smtp.gmail.com with ESMTPSA id q25sm37385362eds.85.2020.12.29.09.31.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Dec 2020 09:31:24 -0800 (PST) From: Cristian Ciocaltea To: Lee Jones , Mark Brown , Rob Herring , Dmitry Torokhov , Sebastian Reichel Cc: Manivannan Sadhasivam , Liam Girdwood , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Linus Walleij , linux-actions@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH v4 0/7] Add initial support for ATC260x PMICs Date: Tue, 29 Dec 2020 19:31:15 +0200 Message-Id: X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ATC260x family of PMICs integrates Audio Codec, Power management, Clock generation and GPIO controller blocks. There are currently 3 variants: ATC2603A, ATC2603C and ATC2609A. This is re-spin of the v1 patch series submitted some time ago by Mani, who provided the MFD and regulator drivers for ATC2609A: https://lore.kernel.org/lkml/20190617155011.15376-1-manivannan.sadhasivam@linaro.org/ Since v2, I added support for ATC2603C, together with some new functionalities for both chips: power controller and onkey input. The ATC2603A chip type remains unsupported for the moment. This has been tested on RoseapplePi, a SBC based on the Actions Semi S500 SoC, which integrates the ATC2603C variant of the PMIC. Note that enabling the ATC260x PMICs on compatible Actions Semi Owl SoC based boards depends on: * the Actions Semi SIRQ driver (for PMIC DTS setup), merged in v5.10: https://lore.kernel.org/lkml/cover.1600114378.git.cristian.ciocaltea@gmail.com/ * the atomic transfers in Owl I2C driver (for power controller), merged in v5.11: https://lore.kernel.org/lkml/cover.1602190168.git.cristian.ciocaltea@gmail.com/ Additionally, please note that I have taken the authorship for the MFD and regulator drivers patches, considering the original code has been modified to a large extent. Thanks, Cristi Changes in v4: - Updated MFD driver according to Lee's review - Handled ATC2603C's LDO12 fixed regulator per Mark's suggestion - Rebased patchset on v5.11-rc1 Changes in v3: - Integrated feedback from Mani, Rob, Mark, Sebastian, Dmitry - Fixed issues reported by Lee's kernel test robot - Added new patch for 'reset-time-sec' DT binding property - Rebased patchset on v5.10-rc6 Changes in v2: - Reworked MFD core & I2C driver * Integrated Lee's feedback * Added support for using the regmap within atomic contexts * Added support for ATC2603C chip variant * Reorganized KConfig entries - Improved regulator driver * Added support for ATC2603C variant * Used helper macros for more compact specification of regulator_desc items * Added more regulator capabilities - Added power controller driver * Provides system poweroff/reboot functionalities * Depends on atomic transfers in the Owl I2C driver - Added onkey driver: exposes the power button as an input device - Added yaml binding doc - Rebased patchset on kernel v5.9-rc1 Cristian Ciocaltea (6): dt-bindings: input: Add reset-time-sec common property dt-bindings: mfd: Add Actions Semi ATC260x PMIC binding mfd: Add MFD driver for ATC260x PMICs regulator: Add regulator driver for ATC260x PMICs power: reset: Add poweroff driver for ATC260x PMICs input: atc260x: Add onkey driver for ATC260x PMICs Manivannan Sadhasivam (1): MAINTAINERS: Add entry for ATC260x PMIC .../devicetree/bindings/input/input.yaml | 7 + .../bindings/mfd/actions,atc260x.yaml | 183 ++++++ MAINTAINERS | 12 + drivers/input/misc/Kconfig | 11 + drivers/input/misc/Makefile | 2 +- drivers/input/misc/atc260x-onkey.c | 305 ++++++++++ drivers/mfd/Kconfig | 18 + drivers/mfd/Makefile | 3 + drivers/mfd/atc260x-core.c | 293 ++++++++++ drivers/mfd/atc260x-i2c.c | 64 +++ drivers/power/reset/Kconfig | 8 +- drivers/power/reset/Makefile | 1 + drivers/power/reset/atc260x-poweroff.c | 263 +++++++++ drivers/regulator/Kconfig | 8 + drivers/regulator/Makefile | 1 + drivers/regulator/atc260x-regulator.c | 539 ++++++++++++++++++ include/linux/mfd/atc260x/atc2603c.h | 281 +++++++++ include/linux/mfd/atc260x/atc2609a.h | 308 ++++++++++ include/linux/mfd/atc260x/core.h | 58 ++ 19 files changed, 2363 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/actions,atc260x.yaml create mode 100644 drivers/input/misc/atc260x-onkey.c create mode 100644 drivers/mfd/atc260x-core.c create mode 100644 drivers/mfd/atc260x-i2c.c create mode 100644 drivers/power/reset/atc260x-poweroff.c create mode 100644 drivers/regulator/atc260x-regulator.c create mode 100644 include/linux/mfd/atc260x/atc2603c.h create mode 100644 include/linux/mfd/atc260x/atc2609a.h create mode 100644 include/linux/mfd/atc260x/core.h -- 2.30.0