Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4242720imm; Wed, 30 May 2018 01:42:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK9usWYWTgljqIHN00Tg+T3FlNbsymtApL0kZb/iX0yQl9K745BElyFhbxZVg+6CWO2DWiv X-Received: by 2002:a63:931c:: with SMTP id b28-v6mr1271142pge.167.1527669728376; Wed, 30 May 2018 01:42:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527669728; cv=none; d=google.com; s=arc-20160816; b=J1rN+69EJxgkynISZhyFFBRKrj3XQb1WXr3ZcQy5BXBOSlc8MPpSwebjPfoMJstrEb +gfyChW7beoKllz1wrdHpNgafwTjjGVVTT+SNxNkSr2ZDqtodbp8dplqCRsYtiezERen 5M4S8qSYmmVzI/tg9+mhIj/XQM4vGXZbJAkQEDsDvNaG3LB+cMoQECEjqeDDdYVLRERs cLesuO7Ik9bFEhFrCM8d4sr6LG+2Tw4YYYq7XFdCGg259v7IAgEIGilWYxSMs7hM5WMD AyhSv5Ic5IN1K+YcbYYE/puAQIdWj59wleh1hkJkDl9PBmo92vX5f7+RXV6bkiyKbMWf YXmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :arc-authentication-results; bh=vWYajxnZr4a6VY1jrCjAw2AqoL9m8By2TlXby6xrvA8=; b=MniLCIRuEUhgqih03tYfl0hd12on1fY63IaNst9FjPouqKDa4XteiJ/3XOTz9ZrnsC slVT4uYJRn7OxvbuxFsq1OOYL4pYIEzugdUSwqtMQqJjHcVPBuDJuS6nr2U9RkWIBu4X 8zkEyMYVxTVOk6KS9YD/g/vPpYTdmyjBKRSxXlt0njZ3/+tlMB7ALkX2+WhpCcEft5DL TqnwJlI5Jk6xhhLpm9m1AlCZzUQ/Z+G4lo5BK9Ifgyc5S/oBkdJxQZv3iWnnb1TP2Kjt l34Jes41eUXJHWTDEZtp6k2/gsvz3ahQcDl7v2ZS2T8QoGN2oKsbdh0ZsuinsDsmGeGp 7v+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8-v6si26006780pgn.428.2018.05.30.01.41.53; Wed, 30 May 2018 01:42:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968698AbeE3Il2 (ORCPT + 99 others); Wed, 30 May 2018 04:41:28 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:45603 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964976AbeE3IlZ (ORCPT ); Wed, 30 May 2018 04:41:25 -0400 Received: by mail-lf0-f67.google.com with SMTP id n3-v6so2998247lfe.12; Wed, 30 May 2018 01:41:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:user-agent; bh=vWYajxnZr4a6VY1jrCjAw2AqoL9m8By2TlXby6xrvA8=; b=eXcXiy3OxpB/93RRWAR3B7J/rqhcj2GDlfE3ud3h60IYbhmf71Xn9gZUntkhoXZ2yH n7sZdeyubtm7tIGuYSKf1ANv3o011gubGQOwWv8L6OEWVgUHprVfSh2xEeiMIRb7Icyg wteHsXM+5p5iRHIV4c4HrFn12GrsOi4VCs0Ew+GGPdMioOkhc38KmGIJlEX1nrFvHy3V ILcTNreZQupnKQYpXeCh1Kx2c2gaEpvG6BXwcGepLCfigJ/R0dPC04bDzrq4yAwI9LRx xSylXbmMJBIlTiXXdVwfEKfvdDCV1hK4OLawp3D1nf3lM+RSMSsX+DGXr3x5Ip3B15OK +Nkw== X-Gm-Message-State: ALKqPwe7A3kNtTGv7R5C99Z/IegIsNWGvcvTmfUradTMcXLp+eqNRL/d z9Fqkz+yXTFbhhdbXVwsTr0= X-Received: by 2002:a19:3bc5:: with SMTP id d66-v6mr979419lfl.113.1527669683308; Wed, 30 May 2018 01:41:23 -0700 (PDT) Received: from localhost.localdomain ([213.255.186.34]) by smtp.gmail.com with ESMTPSA id y89-v6sm1037050lje.74.2018.05.30.01.41.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 May 2018 01:41:22 -0700 (PDT) Date: Wed, 30 May 2018 11:41:13 +0300 From: Matti Vaittinen To: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, lee.jones@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, mazziesaccount@gmail.com Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mikko.mutanen@fi.rohmeurope.com, heikki.haikola@fi.rohmeurope.com Subject: [PATCH v4 0/6] mfd/regulator/clk: bd71837: ROHM BD71837 PMIC driver Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Patch series adding support for ROHM BD71837 PMIC. BD71837 is a programmable Power Management IC for powering single-core, dual-core, and quad-core SoC’s such as NXP-i.MX 8M. It is optimized for low BOM cost and compact solution footprint. It integrates 8 buck regulators and 7 LDO’s to provide all the power rails required by the SoC and the commonly used peripherals. The driver aims to not limit the usage of PMIC. Thus the buck and LDO naming is generic and not tied to any specific purposes. However there is following limitations which make it mostly suitable for use cases where the processor where PMIC driver is running is powered by the PMIC: - The PMIC is not re-initialized if it resets. PMIC may reset as a result of voltage monitoring (over/under voltage) or due to reset request. Driver is only initializing PMIC at probe. This is not problem as long as processor controlling PMIC is powered by PMIC. - The PMIC internal state machine is ignored by driver. Driver assumes the PMIC is wired so that it is always in "run" state when controlled by the driver. Changelog v4 - remove mutex from regulator state check as core prevents simultaneous accesses - allow voltage change for bucks 1 to 4 when regulator is enabled - fix indentiation problems - properly correct SPDX comments Changelog v3 - kill unused variable - kill unused definitions - use REGMAP_IRQ_REG Changelog v2 Based on feedback from Mark Brown - Squashed code and buildfile changes to same patch - Fixed some styling issues - Changed SPDX comments to CPP style - Error out if voltage is changed when regulator is enabled instead of Disabling the regulator for duration of change - Use devm_regulator_register - Remove compatible usage from regulators - use parent dev for config - Add a note about using regulator-boot-on for BUCK6 and 7 - fixed warnings from kbuild test robot patch 1: MFD driver and definitions bringing interrupt support and enabling clk and regulator subsystems. Patches 2, 3 and 4: device tree binding documents. Patch 5: clock subsystem and support for gated clock. Patch 6: regulator driver supporting 8 bucks and 7 LDOs. This patch series is based on for-mfd-next --- Matti Vaittinen (6): mfd: bd71837: mfd driver for ROHM BD71837 PMIC mfd: bd71837: Devicetree bindings for ROHM BD71837 PMIC regulator: bd71837: Devicetree bindings for BD71837 regulators clk: bd71837: Devicetree bindings for ROHM BD71837 PMIC clk: bd71837: Add driver for BD71837 PMIC clock regulator: bd71837: BD71837 PMIC regulator driver .../bindings/clock/rohm,bd71837-clock.txt | 37 ++ .../devicetree/bindings/mfd/rohm,bd71837-pmic.txt | 52 ++ .../bindings/regulator/rohm,bd71837-regulator.txt | 126 ++++ drivers/clk/Kconfig | 9 + drivers/clk/Makefile | 1 + drivers/clk/clk-bd71837.c | 151 +++++ drivers/mfd/Kconfig | 13 + drivers/mfd/Makefile | 1 + drivers/mfd/bd71837.c | 222 +++++++ drivers/regulator/Kconfig | 11 + drivers/regulator/Makefile | 1 + drivers/regulator/bd71837-regulator.c | 640 +++++++++++++++++++++ include/linux/mfd/bd71837.h | 288 ++++++++++ 13 files changed, 1552 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/rohm,bd71837-clock.txt create mode 100644 Documentation/devicetree/bindings/mfd/rohm,bd71837-pmic.txt create mode 100644 Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.txt create mode 100644 drivers/clk/clk-bd71837.c create mode 100644 drivers/mfd/bd71837.c create mode 100644 drivers/regulator/bd71837-regulator.c create mode 100644 include/linux/mfd/bd71837.h -- 2.14.3