From patchwork Sun Dec 11 22:21:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 9469923 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 193C060761 for ; Sun, 11 Dec 2016 22:23:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A48428338 for ; Sun, 11 Dec 2016 22:23:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F244C2838C; Sun, 11 Dec 2016 22:23:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8FCF628338 for ; Sun, 11 Dec 2016 22:23:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754033AbcLKWW4 (ORCPT ); Sun, 11 Dec 2016 17:22:56 -0500 Received: from mail-wj0-f170.google.com ([209.85.210.170]:33685 "EHLO mail-wj0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754026AbcLKWWx (ORCPT ); Sun, 11 Dec 2016 17:22:53 -0500 Received: by mail-wj0-f170.google.com with SMTP id xy5so57575464wjc.0 for ; Sun, 11 Dec 2016 14:22:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dmvmN1GWxk2zlTuOptBAcoT9PcpUHZnSwCj3JNctqxI=; b=WZ9JBHw8Xpwr8tJvzofHDfWz/zJScCpt56pPEK1B5ebECjGDqgVpoWXFPX4IWGurYc Qek6Tu3YZd+GFPIXujXrP6XgV5PXFP0qAUCZYA8UPaqhNlsOGxLhW5nZ/1lkkVI4SKK/ Bkl9Fe/fwazIZ0q6ILfRJK6t4NOd9pUTd/YOQplveeIZpxTjfx4SooTdptGw7AfRDUVj zDKEPoDMkRL4Gfp86U+1FEe5j9x1JDyFL/8AV0QqyTjXqyzim0sXDu8PZHdcXk8+iRqs qJIoMDllIWRa5aaA1M0aKjDXny22svIo8SpbjqCQM6iIu1TZzlV0aZiN3uTES0Qi+xNN TBcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dmvmN1GWxk2zlTuOptBAcoT9PcpUHZnSwCj3JNctqxI=; b=VdtjyXvwXVbMn76QR1sBksS4oj5G7Ml8lb3CSc94B17R4bE4ZEntG8+07iewDlr/+0 uD64S0+1irg55VaCfIGWycHW2qiFmYtEDSsyagLG/Evy/3ieDp+ThAOgb7l6kzbZknbl wqmrZOGaiWfmlxE7SZQU5T3acdQ2S2sSROJDbagDokqyl8hD1haVqVKKoNu5Y/NpZgtJ 5YwRL96fJ8mzElviPabRlXgD7n1WZ5UIMpZ2V6lXGdA/+1zideYSB67If01GvMEkp3aT UaqGS+7LgA00E5TZfNs7pA8VHEmxpvgi6nKrjKg1qecD1N3x/UZTiRRaM6J5wa+8308Q 6qwA== X-Gm-Message-State: AKaTC00XAV2vm2txdEAgeRaIdeOKvC2Ddyqlqt09pt8O5UN1ruYlmd3IjtzDlARIpXBTEb6Z X-Received: by 10.194.116.34 with SMTP id jt2mr76783529wjb.121.1481494971745; Sun, 11 Dec 2016 14:22:51 -0800 (PST) Received: from bgdev-debian.lan (jua06-1-82-242-157-225.fbx.proxad.net. [82.242.157.225]) by smtp.gmail.com with ESMTPSA id x140sm32382073wme.19.2016.12.11.14.22.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 11 Dec 2016 14:22:51 -0800 (PST) From: Bartosz Golaszewski To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Kevin Hilman , Patrick Titiano , Neil Armstrong , Linus Walleij , Alexandre Courbot , linux-gpio@vger.kernel.org, Sebastian Reichel , linux-pm@vger.kernel.org, Mark Brown , Liam Girdwood , Bartosz Golaszewski Subject: [PATCH 1/2] devicetree: power: add bindings for GPIO-driven power switches Date: Sun, 11 Dec 2016 23:21:44 +0100 Message-Id: <1481494905-18037-2-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1481494905-18037-1-git-send-email-bgolaszewski@baylibre.com> References: <1481494905-18037-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some boards are equipped with simple, GPIO-driven power load switches. An example of such ICs is the TI tps229* series. Add device tree bindings allowing to describe them. Signed-off-by: Bartosz Golaszewski --- .../bindings/power/gpio-power-switch.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/gpio-power-switch.txt diff --git a/Documentation/devicetree/bindings/power/gpio-power-switch.txt b/Documentation/devicetree/bindings/power/gpio-power-switch.txt new file mode 100644 index 0000000..21420ed --- /dev/null +++ b/Documentation/devicetree/bindings/power/gpio-power-switch.txt @@ -0,0 +1,25 @@ +GPIO Power Switch +----------------- + +This is the device tree binding for simple, GPIO-driven power load switches +that do not have any control signals. + +Required properties: + +- compatible: must be "gpio-power-switch" +- power-gpios: phandle for the GPIO driving the power load switch + +Optional properties: + +- power-switch-name: the name of the power switch +- power-switch-on: the power switch GPIO is driven high by default + +Example +------- + +acme_probe0_power_switch: gpio_power_switch@0 { + compatible = "gpio-power-switch"; + power-switch-name = "acme_probe0_switch"; + power-gpios = <&pca9535 1 GPIO_ACTIVE_HIGH>; + power-switch-on; +};