From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH 2/2] iio: misc: add support for GPIO power switches Date: Wed, 28 Dec 2016 13:50:17 +0100 Message-ID: References: <1481494905-18037-1-git-send-email-bgolaszewski@baylibre.com> <1481494905-18037-3-git-send-email-bgolaszewski@baylibre.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-qt0-f180.google.com ([209.85.216.180]:36354 "EHLO mail-qt0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751395AbcL1MuS (ORCPT ); Wed, 28 Dec 2016 07:50:18 -0500 Received: by mail-qt0-f180.google.com with SMTP id k15so109640419qtg.3 for ; Wed, 28 Dec 2016 04:50:18 -0800 (PST) In-Reply-To: <1481494905-18037-3-git-send-email-bgolaszewski@baylibre.com> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 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 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