Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1548579

Re: [PATCH 2/2] iio: misc: add support for GPIO power switches

From Linus Walleij <linus.walleij@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] iio: misc: add support for GPIO power switches
Date 2016-12-30 14:10 +0100
Message-ID <sU56x-4KU-7@gated-at.bofh.it> (permalink)
References <sNkN3-4IE-7@gated-at.bofh.it> <sNkN3-4IE-5@gated-at.bofh.it> <sTlZL-8ke-3@gated-at.bofh.it> <sTLKy-tS-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


n Thu, Dec 29, 2016 at 5:29 PM, Sebastian Reichel <sre@kernel.org> wrote:
> On Wed, Dec 28, 2016 at 01:50:17PM +0100, Linus Walleij wrote:
>> On Sun, Dec 11, 2016 at 11:21 PM, Bartosz Golaszewski
>> <bgolaszewski@baylibre.com> 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 <bgolaszewski@baylibre.com>
>>
>> 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.
>
> As far as I understand it, the TPS229 is used by Barzosz to poweroff
> a remote system. The gpio-poweroff driver is used to poweroff the
> local system.

Thanks yeah I understood this from the context of later patches.

Well if such a property is used it should be the property of the remote
system per se, and the remote system should then also be desribed in
DT, not half-described by dangling references at random nodes.

So this needs to be re-architected to either describe the remote system
in DT and handle it in the kernel, or handle it all from userspace if it
is a one-off non-product thing.

Yours,
Linus Walleij

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] iio: misc: add support for GPIO power switches Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-12-11 23:30 +0100
  Re: [PATCH 2/2] iio: misc: add support for GPIO power switches Linus Walleij <linus.walleij@linaro.org> - 2016-12-28 14:00 +0100
    Re: [PATCH 2/2] iio: misc: add support for GPIO power switches Sebastian Reichel <sre@kernel.org> - 2016-12-29 17:30 +0100
      Re: [PATCH 2/2] iio: misc: add support for GPIO power switches Linus Walleij <linus.walleij@linaro.org> - 2016-12-30 14:10 +0100
        Re: [PATCH 2/2] iio: misc: add support for GPIO power switches Jonathan Cameron <jic23@kernel.org> - 2016-12-30 16:20 +0100
          Re: [PATCH 2/2] iio: misc: add support for GPIO power switches Linus Walleij <linus.walleij@linaro.org> - 2017-01-02 23:00 +0100

csiph-web