[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E11E2DC.2070601@linutronix.de>
Date: Mon, 04 Jul 2011 17:57:16 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Grant Likely <grant.likely@...retlab.ca>
CC: linux-kernel@...r.kernel.org, sodaville@...utronix.de
Subject: Re: [PATCH 1/2] gpio/gpio-generic: read set register for caching
if available
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists