Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751579AbcL1MuV (ORCPT ); Wed, 28 Dec 2016 07:50:21 -0500 Received: from mail-qt0-f181.google.com ([209.85.216.181]:36354 "EHLO mail-qt0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751506AbcL1MuT (ORCPT ); Wed, 28 Dec 2016 07:50:19 -0500 MIME-Version: 1.0 In-Reply-To: <1481494905-18037-3-git-send-email-bgolaszewski@baylibre.com> References: <1481494905-18037-1-git-send-email-bgolaszewski@baylibre.com> <1481494905-18037-3-git-send-email-bgolaszewski@baylibre.com> From: Linus Walleij Date: Wed, 28 Dec 2016 13:50:17 +0100 Message-ID: Subject: Re: [PATCH 2/2] iio: misc: add support for GPIO power switches To: Bartosz Golaszewski Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , "linux-iio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Kevin Hilman , Patrick Titiano , Neil Armstrong , Alexandre Courbot , "linux-gpio@vger.kernel.org" , Sebastian Reichel , "linux-pm@vger.kernel.org" , Mark Brown , Liam Girdwood Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 848 Lines: 25 On Sun, Dec 11, 2016 at 11:21 PM, Bartosz Golaszewski wrote: > Some power-measuring ADCs work together with power load switches which > allow to power-cycle measured devices. > > An example use case would be measuring the power consumption of a > development board during boot using a power monitor such as TI INA226 > and power-cycling the board remotely using a TPS229* power switch. > > Add an iio driver for simple GPIO power switches and expose a sysfs > attribute allowing to toggle their state. > > Signed-off-by: Bartosz Golaszewski I don't get this, isn't this doing the same as drivers/power/reset/gpio-poweroff.c ? With the only difference that the latter uses the standard syscall from pm_power_off to reboot the system instead of some random sysfs file. Yours, Linus Walleij