mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier.adi@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Brownell <david-b@pacbell.net>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio sysfs: add a "toggle" value
Date: Thu, 4 Jun 2009 04:16:14 -0400	[thread overview]
Message-ID: <8bd0f97a0906040116v659d0cdetaff267f4241be175@mail.gmail.com> (raw)
In-Reply-To: <20090604005435.d3671419.akpm@linux-foundation.org>

On Thu, Jun 4, 2009 at 03:54, Andrew Morton wrote:
> On Wed,  3 Jun 2009 04:16:59 -0400 Mike Frysinger wrote:
>> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
>
> -ENOCHANGELOGAGAIN

it's pretty damned self explanatory

>> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
>> index 51a8d41..7f79732 100644
>> --- a/drivers/gpio/gpiolib.c
>> +++ b/drivers/gpio/gpiolib.c
>> @@ -274,7 +274,12 @@ static ssize_t gpio_value_store(struct device *dev,
>>       else {
>>               long            value;
>>
>> -             status = strict_strtol(buf, 0, &value);
>> +             if (sysfs_streq(buf, "toggle")) {
>> +                     value = !gpio_get_value_cansleep(gpio);
>> +                     status = 0;
>> +             } else
>> +                     status = strict_strtol(buf, 0, &value);
>> +
>>               if (status == 0) {
>>                       gpio_set_value_cansleep(gpio, value != 0);
>>                       status = size;
>
> A suitable place to document this is Documentation/gpio.txt.

yes, but i wanted to make sure David didnt reject the idea before i
spend time writing documentation.
-mike

  reply	other threads:[~2009-06-04  8:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03  8:16 Mike Frysinger
2009-06-04  7:54 ` Andrew Morton
2009-06-04  8:16   ` Mike Frysinger [this message]
2009-06-04  8:27     ` David Brownell
2009-06-04  8:52       ` Mike Frysinger
2009-06-04  9:05         ` Andrew Morton
2009-06-04  9:06         ` David Brownell
2009-06-04  9:09           ` Mike Frysinger
2009-06-04  9:15             ` David Brownell
2009-06-04  9:20               ` Mike Frysinger
2009-06-04  9:48                 ` David Brownell
2009-06-04 10:06                   ` Mike Frysinger
2009-06-04  8:36     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8bd0f97a0906040116v659d0cdetaff267f4241be175@mail.gmail.com \
    --to=vapier.adi@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome