From patchwork Mon Jun 22 12:41:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Semwal X-Patchwork-Id: 191322 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp1003309ile; Mon, 22 Jun 2020 05:41:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/OryG/TKL3AnWgXHjfDxyOfVw61kPqPF5R5D1JFrsNDolF0dVslzlu8X8IQEmRvwpookI X-Received: by 2002:a05:6402:b37:: with SMTP id bo23mr17037061edb.24.1592829682939; Mon, 22 Jun 2020 05:41:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592829682; cv=none; d=google.com; s=arc-20160816; b=kxe9P/De8zn0tSBOBR/dH4TC4UXC2lH2UMi79YVHjbJSt0mvPttD+hfFkjfSD7qOrs M+OxD+I6LEQIjEYNNGZW0alauo9aUJDi7eTo14PEBtaBn8ic0FPFZEC5/0bJoJqTCLT8 G2yNaSTtIZ657y5oufwnfnJAepyaGdEHZrgnsp9RCc1zMwQc3A1fVSG6KF8s0S143qh6 x93Tr9vvzy/QuCEuaaSEcBhZn4rvRY4e/6OIdatWClvmUOS36IXlmG2E1KUgPprAs8vF yHlvIFopSxOwsV/CofJtLoFzva9gYPOfMAoA8Td1yIK724fa1ImRIMnD31z1lKeDWzMh 4L5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fq5dVVlXW8qg+ASmc5eHI9qkJpaHLFgd8jV55IoO3ds=; b=KfYg2wm2dctwg0eR6q0irORXuXN0i0zmY2cjLpQII42IJqvO+h5Ht4G2NB7kzjGPXz Suvvt7T2HRKLt80qkIAPAQfjDCs6x1I6ANXZXEp67d6Nx4Z8CMancJnhrjAFDMYjPr9K KeEw/NDCDcbHO8BqVVEeV8WNxS+BTyVAlY+4HtT5xudO/hYdUHosxK1Ln+ELJYWn2QYl 1Z0Xsd9jiBNSLL4F1O6ATV0FC/bo5sZNPi+s+3gi+OGwtIvOaiMdzgJ2ioappSbvDOo5 waIBZVDg2ehPC4mtIY3JVB9JZT5DquHV9rhwoQnkJ3jRVWUWMl7Fe8VHlmMXjRtcH+G0 o8MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wcSTbWr1; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si4051847edx.522.2020.06.22.05.41.22; Mon, 22 Jun 2020 05:41:22 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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=@linaro.org header.s=google header.b=wcSTbWr1; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728158AbgFVMlW (ORCPT + 6 others); Mon, 22 Jun 2020 08:41:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728121AbgFVMlV (ORCPT ); Mon, 22 Jun 2020 08:41:21 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFA92C061796 for ; Mon, 22 Jun 2020 05:41:21 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id i12so8098586pju.3 for ; Mon, 22 Jun 2020 05:41:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fq5dVVlXW8qg+ASmc5eHI9qkJpaHLFgd8jV55IoO3ds=; b=wcSTbWr12KM0AKzvczAYGpY8oNBlPcfTlSqXSviRt6OVkzWhCDYP9/vasBpxVa159T vZMShpuchPupvThg/UKN4QPPDmfiT1u7wmr3KcRRsd8+9ZzOLxdvwSYoiYH0M0ITVWIp AEIqdLRy2K0grOOM48kvK15Np7sRxIjAz85bJKWF0mOFTFGhw6D80NKy8xkZQd4/1QzT xPKuFKJQ7UKYWCA50gU9EcDEdbOMRxt86AZ9SH8u+auHNZsoUbF9YDee4c7i10JsZUqU 4tHiNTvD1eLzQbXCpmq19w5ln2UemzsLBWF0ThxGAFg581DionEgeCstmoE5U29SWFlh bcuA== 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=fq5dVVlXW8qg+ASmc5eHI9qkJpaHLFgd8jV55IoO3ds=; b=HYojRnERCN0Ow85pahCJEJ1nbsxGvPcXqLCApgAKDgC4uw5fWtebXUimVpSg01XXPg cHxZHJgGeKEM6KokgDFPNABDzmrF4525rO4UUrZ1EhFInR8FZlcoJZdSEKbEsuPfaXGE +sj0TwJm5x18SVY3o320Z2pRxlyilzF2nXkliQ00tvxovSKnwRaQlECboPzV8o4ir9kP ohAkanBwcf2BLQgyBtgDMqlef5jiniXamaF/7zLkLawK5TBU23x0xsvJ51fdnJGQs1TL vC7E8v3pufP/8n7hmR9MpP+GTKHjN78aLglA6v0m57tiPBN6V9UofSbZWDuuHJhnAzZ7 LB1A== X-Gm-Message-State: AOAM53314gNSMNT7kjjV48PuVVvEGeFmWTVbZe/NpVKfR3VRvurmpxIm JbQqc2xXnC6Ugg1hOPW7LtLKDg== X-Received: by 2002:a17:90a:36d0:: with SMTP id t74mr16600778pjb.27.1592829680949; Mon, 22 Jun 2020 05:41:20 -0700 (PDT) Received: from nagraj.local ([49.206.21.239]) by smtp.gmail.com with ESMTPSA id i62sm14590581pfg.90.2020.06.22.05.41.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 05:41:19 -0700 (PDT) From: Sumit Semwal To: agross@kernel.org, bjorn.andersson@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org Cc: nishakumari@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kgunda@codeaurora.org, rnayak@codeaurora.org, Sumit Semwal Subject: [PATCH v5 0/4] Qualcomm labibb regulator driver Date: Mon, 22 Jun 2020 18:11:06 +0530 Message-Id: <20200622124110.20971-1-sumit.semwal@linaro.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This series adds a driver for LAB/IBB regulators found on some Qualcomm SoCs. These regulators provide positive and/or negative boost power supplies for LCD/LED display panels connected to the SoC. This series adds the support for pmi8998 PMIC found in SDM845 family of SoCs. Changes from v4: - v4 Review comments incorporated - simplified the driver: removed of_get_child_by_name(); use ENABLE_CTL register and switch over to use the regulator_*_regmap helpers - improved kerneldoc - From the dt-bindings, removed interrupt-names, changed to dual license, added unevaluatedProperties: false, removed interrupt-names, since there is only one interrupt per node - Since the Short Circuit handling needs more details from QC engineers, drop the SC handling patch from this series, to submit it later Changes from v3: - Handled review comments from v3 - In core, swapped the meaning of enable_time and poll_enabled_time; so we wait for total enable_time delay, and poll in-between at poll_enabled_time interval now. - fixed dt_bindings_check issues in dt-bindings patch. - Cleanup of register_labibb_regulator(), and adapted to updated meaning of poll_enabled_time. Changes from v2: - Review comments from v2 - Moved the poll-to-check-enabled functionality to regulator core. - Used more core features to simplify enable/disable functions. - Moved the devicetree binding to yaml. - Updated interrupt-names and simplified handling. Changes from v1: - Incorporated review comments from v1 - Changed from virtual-regulator based handling to individual regulator based handling. - Reworked the core to merge most of enable/disable functions, combine the regulator_ops into one and allow for future variations. - is_enabled() is now _really_ is_enabled() - Simplified the SC interrupt handling - use regmap_read_poll_timeout, REGULATOR_EVENT_OVER_CURRENT handling and notification to clients. Nisha Kumari (3): dt-bindings: regulator: Add labibb regulator arm64: dts: qcom: pmi8998: Add nodes for LAB and IBB regulators regulator: qcom: Add labibb driver Sumit Semwal (1): regulator: Allow regulators to verify enabled during enable() .../regulator/qcom-labibb-regulator.yaml | 70 +++++++ arch/arm64/boot/dts/qcom/pmi8998.dtsi | 12 ++ drivers/regulator/Kconfig | 10 + drivers/regulator/Makefile | 1 + drivers/regulator/core.c | 63 ++++++- drivers/regulator/qcom-labibb-regulator.c | 175 ++++++++++++++++++ include/linux/regulator/driver.h | 5 + 7 files changed, 335 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/regulator/qcom-labibb-regulator.yaml create mode 100644 drivers/regulator/qcom-labibb-regulator.c -- 2.27.0 Reviewed-by: Rob Herring