All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-kernel@vger.kernel.org, sodaville@linutronix.de
Subject: Re: [PATCH 1/2] gpio/gpio-generic: read set register for caching if available
Date: Mon, 04 Jul 2011 17:57:16 +0200	[thread overview]
Message-ID: <4E11E2DC.2070601@linutronix.de> (raw)
In-Reply-To: <20110704154447.GG29977@ponder.secretlab.ca>

Grant Likely wrote:
>> diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
>> index 231714d..9f8b5c6 100644
>> --- a/drivers/gpio/gpio-generic.c
>> +++ b/drivers/gpio/gpio-generic.c
>> @@ -398,7 +398,10 @@ int __devinit bgpio_init(struct bgpio_chip *bgc,
>>  	if (ret)
>>  		return ret;
>>  
>> -	bgc->data = bgc->read_reg(bgc->reg_dat);
>> +	if (bgc->reg_set)
>> +		bgc->data = bgc->read_reg(bgc->reg_set);
> 
> On most of the gpio controllers that I've seen, the 'set' register
> isn't something that you can actually read.  I don't think this is
> something that can be done for all gpio controllers.

I see. So

	if (bgc->reg_set && ! bgc->reg_clr)

instead should be fine, right?

> g.
> 
Sebastian

  reply	other threads:[~2011-07-04 15:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-27  7:26 [PATCH 1/2] gpio/gpio-generic: read set register for caching if available Sebastian Andrzej Siewior
2011-06-27  7:26 ` [PATCH v2 2/2] gpio: Add a driver for Sodaville GPIO controller Sebastian Andrzej Siewior
2011-06-27  9:33   ` Alan Cox
2011-06-27 10:34     ` Sebastian Andrzej Siewior
2011-07-04  7:26   ` [sodaville] " Sebastian Andrzej Siewior
2011-07-04 16:19   ` Grant Likely
2011-07-04 16:29     ` Sebastian Andrzej Siewior
2011-07-04 16:33       ` Grant Likely
2011-07-04 16:35         ` Grant Likely
2011-08-01 16:44           ` [sodaville] " Sebastian Andrzej Siewior
2011-07-04 15:44 ` [PATCH 1/2] gpio/gpio-generic: read set register for caching if available Grant Likely
2011-07-04 15:57   ` Sebastian Andrzej Siewior [this message]
2011-07-20  7:24   ` [PATCH 1/2 v2] gpio/gpio-generic: read correct " Sebastian Andrzej Siewior

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=4E11E2DC.2070601@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sodaville@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.