From patchwork Thu Jun 27 07:42:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 13713898 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B1359374D4; Thu, 27 Jun 2024 07:42:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719474170; cv=none; b=PmgcwEQVScbFCSJsq4GUS0/qgsqFj7CgNcT0ySph7AOODQKpR7cKFCn9W1F3iVKYzZzulhJ4tv8zor+7/SrTR8gbCnweolK7NxvN42lIpE8mr4PI48MzOutWShbQd6S7xltIb9WAluoEdm0+N0poJ0gcUjJs+H7hPy2Ok8CRFBo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719474170; c=relaxed/simple; bh=+aYaJeKfwWUFK7GSlzK2t5JQnsS8gzmmHK4bu1Y4nWo=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=Ly0xsJDP7HbSMdOdYTNgFdrhiyDEQQZpqnB3UFyvlRqIO0JvC/beCZSD8rsPD7hE21IRIM4V5OAlT8w6eRC10Y/c6iPQ/rUYFbD3M3Eo4goBpOAQOyu0ABUYwRyn8kzu9JKZeGj045CtjTASSdvCmHKRKkOSLsYubTkMwJxj4t0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=M0SQdhPn; arc=none smtp.client-ip=209.85.208.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="M0SQdhPn" Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2ec17eb4493so103493541fa.2; Thu, 27 Jun 2024 00:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719474166; x=1720078966; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=pzyiJnZ7aQCZJPaij9547bOK4rGLg+j8o5jTxY/Qu5I=; b=M0SQdhPnjDhu25wx6pIfEJcOLaON2NQsILIR51tzgXR/QY0S7SIS0BRK1LSJ9MkvB5 FF/NWRzI9VHmDnQ4CwCjerncJE7j1nYea1n3oM1cEjjuSWeNvqT9WQFD1nJRLSNnVKqJ PlG8VBOh1Ge9gg3g19G2omB7edfxNKTTSlNi6F+DYBsfLDXh8Akd2TY+EYRho83bWy1H rYEuRnjDk0WGWXdcU9nCK6pqW6xU4YboRVteplQQN72Ypgw/nL1rYHOBprHDKAlYboe5 tedgRdgrD22bHu24ibR4BkQ5F8X92Ty0p0XEXkyJv0TNXmbpd2k4X3QACZh+KjHEyIil LrvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719474166; x=1720078966; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pzyiJnZ7aQCZJPaij9547bOK4rGLg+j8o5jTxY/Qu5I=; b=LJ18Gg3bfC4QgZ/7oz6ltACw5OoY2I4ICAKDoIg8tvO9Jh8JCoDz4xFX8Vmn4Xw/Kp IYowf8ImpXTnglt0KY32S1LIAiW0xWtuUBiXH3ijWqigQBmNJhyut1hNhYreWzUEVznd Tgxb5uE2Ma2Lz0OvwXzEdTSZl8fOpH8NumOhi4GdCirGwNbSsOigq2x/A3kYrhZ4SaDH eIhpQ1ZxrUcYulSgnM+YqhWNHEzZ4FSPrH82Plynt3ktvaY1PMPGTZfeiKXUrZTENt+3 9/G/vIcEuK8AUQ0pPxQ2fWhy5zMzYXmPZasK7OsQL/CyauH7ILzYBlW8VNjwarkNM0sJ ZWYQ== X-Forwarded-Encrypted: i=1; AJvYcCWhpLnD01IS2SL/fO1Mm8Rvqu1VEPHL1sPYkupSFS3nHbX1MNnXkzWiR3mtCJ+bvXGgp6nbCCqevdl+GfxTgASg/Vwzjq9SfsHwGy8hrmdkWwL2Z7sGuNcDxkiXKgJ2Z1q1eaXwfUVQW5LodTIOVNqc6svJ3wRqyrxak3MGLEeL3yKLrRRWd9Gg X-Gm-Message-State: AOJu0YwH0FdzJjBuf+c1W92RX5QcluDagbc8tThyDBaElDz5HHBbNSO4 s8mp2sFGkQLjHDZf1tJF6Yj9x23EmBqyLO3NzaCaaX/Xs1NyaVpS X-Google-Smtp-Source: AGHT+IH+GjvCIgWLgMsQlIT9dAtA7mMWQzMchoZbAEPfpQFeI7G7BJ34JtY2D9J95FAtY1dvyrCQbw== X-Received: by 2002:a2e:9ecd:0:b0:2ec:51b5:27be with SMTP id 38308e7fff4ca-2ec5b2d4619mr100811781fa.12.1719474165777; Thu, 27 Jun 2024 00:42:45 -0700 (PDT) Received: from fedora ([2a10:a5c0:800d:dd00:8cfe:d6e7:6701:9dfd]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ee4a4bed76sm1457831fa.106.2024.06.27.00.42.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 00:42:44 -0700 (PDT) Date: Thu, 27 Jun 2024 10:42:37 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Mark Brown , Greg Kroah-Hartman , "Rafael J. Wysocki" , Matti Vaittinen , Wim Van Sebroeck , Guenter Roeck , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org Subject: [PATCH v5 0/6] Support ROHM BD96801 Scalable PMIC Message-ID: Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Support ROHM BD96801 Scalable PMIC The ROHM BD96801 is automotive grade PMIC, intended to be usable in multiple solutions. The BD96801 can be used as a stand-alone, or together with separate 'companion PMICs'. This modular approach aims to make this PMIC suitable for various use-cases. This series brings only limited support. The more complete set of features was sent in the RFC: https://lore.kernel.org/lkml/cover.1712058690.git.mazziesaccount@gmail.com/ The v3: implemented also support for ERRB interrupt and setting a name suffix to IRQ domains. That work was postponed and will be continued after some unrelated changes to irqdomain code are completed as discussed here: https://lore.kernel.org/all/87plst28yk.ffs@tglx/ Revision history still tries to summarize changes from the RFC for the reviewers. Revision history: v4 => v5: - Drop unintended Makefile change from regulator Makefile v3 => v4: - Drop patches 7 to 10 (inclusive) until preparatory irqdomain changes are done. - Cleanups as suggested by Lee. - Change the regulator subdevice name. (MFD and regulators). - Minor styling in MFD driver v2 => v3: Mostly based on feedback from Thomas Gleixner - Added acks from Krzysztof and Mark - Rebased on v6.10-rc2 - Drop name suffix support for legacy IRQ domains (both irqdomain and regmap) - Improve the commit message for patch 7/10 v1 => v2: - Add support for setting a name suffix for fwnode backed IRQ domains. - Add support for setting a domain name suffix for regmap-IRQ. - Add handling of ERRB IRQs. - Small fixes based on feedback. RFCv2 => v1: - Drop ERRB IRQ from drivers (but not DT bindings). - Drop configuration which requires STBY - state. - Fix the register lock race by moving it from the regulator driver to the MFD driver. RFCv1 => RFCv2: - Tidying code based on feedback form Krzysztof Kozlowski and Lee Jones. - Documented undocumented watchdog related DT properties. - Added usage of the watchdog IRQ. - Use irq_domain_update_bus_token() to work-around debugFS name collision for IRQ domains. --- Matti Vaittinen (6): dt-bindings: ROHM BD96801 PMIC regulators dt-bindings: mfd: bd96801 PMIC core mfd: support ROHM BD96801 PMIC core regulator: bd96801: ROHM BD96801 PMIC regulators watchdog: ROHM BD96801 PMIC WDG driver MAINTAINERS: Add ROHM BD96801 'scalable PMIC' entries .../bindings/mfd/rohm,bd96801-pmic.yaml | 173 ++++ .../regulator/rohm,bd96801-regulator.yaml | 63 ++ MAINTAINERS | 4 + drivers/mfd/Kconfig | 13 + drivers/mfd/Makefile | 1 + drivers/mfd/rohm-bd96801.c | 273 ++++++ drivers/regulator/Kconfig | 12 + drivers/regulator/Makefile | 1 + drivers/regulator/bd96801-regulator.c | 908 ++++++++++++++++++ drivers/watchdog/Kconfig | 13 + drivers/watchdog/Makefile | 1 + drivers/watchdog/bd96801_wdt.c | 416 ++++++++ include/linux/mfd/rohm-bd96801.h | 215 +++++ include/linux/mfd/rohm-generic.h | 1 + 14 files changed, 2094 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/rohm,bd96801-pmic.yaml create mode 100644 Documentation/devicetree/bindings/regulator/rohm,bd96801-regulator.yaml create mode 100644 drivers/mfd/rohm-bd96801.c create mode 100644 drivers/regulator/bd96801-regulator.c create mode 100644 drivers/watchdog/bd96801_wdt.c create mode 100644 include/linux/mfd/rohm-bd96801.h base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0