Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754014AbcLKWWw (ORCPT ); Sun, 11 Dec 2016 17:22:52 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:38482 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753932AbcLKWWt (ORCPT ); Sun, 11 Dec 2016 17:22:49 -0500 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 0/2] iio: GPIO power switch support Date: Sun, 11 Dec 2016 23:21:43 +0100 Message-Id: <1481494905-18037-1-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1599 Lines: 38 This series is aimed at improving the support for baylibre-acme[1] power measurement capes. We would like to add support for power-cycling of devices measured using TI INA226 ADCs. An example use case would be measuring the power consumption of a development board during boot and power-cycling it remotely using a GPIO power switch. The first patch proposes to add a new DT binding for describing simple power switches. The second adds a simple IIO driver exposing a single attribute. The motivation for using the IIO framework is the fact that we already use it for reading the data from the ADC and that power-cycling the measured devices is an integral part of our use case. Users would find it convenient to be able to use libiio as the single interface. [1] http://baylibre.com/acme/ Bartosz Golaszewski (2): devicetree: power: add bindings for GPIO-driven power switches iio: misc: add support for GPIO power switches .../bindings/power/gpio-power-switch.txt | 25 ++++ drivers/iio/Kconfig | 1 + drivers/iio/Makefile | 1 + drivers/iio/misc/Kconfig | 17 +++ drivers/iio/misc/Makefile | 6 + drivers/iio/misc/gpio-power-switch.c | 127 +++++++++++++++++++++ 6 files changed, 177 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/gpio-power-switch.txt create mode 100644 drivers/iio/misc/Kconfig create mode 100644 drivers/iio/misc/Makefile create mode 100644 drivers/iio/misc/gpio-power-switch.c -- 2.9.3