Re: [patch/rfc 1/4] GPIO implementation framework

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Brownell
Date: Wednesday, November 14, 2007 - 12:19 am

> > >  struct gpio_desc {

Actually, 2K is a more accurate number -- ignore DEBUG_FS.



No; the amount of space shaved from a typical (32-bit banks)
gpio_chip is *exactly* the cost of one gpio_desc:  two words.
In one case, two bitmaps.  In the other, a pointer, two bits,
and internal struct padding.

So unless each bank has only a single GPIO, this approach
does cost more memory.  Both for the extra memory associated
with each gpio_chip that's used, and for unused gpio_desc.
 
That's not necessarily a bad thing, though it's always worth
avoiding bloat.

- Dave
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch/rfc 1/4] GPIO implementation framework, David Brownell, (Mon Oct 29, 6:51 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Mon Nov 5, 2:05 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, eric miao, (Mon Nov 12, 7:28 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Tue Nov 13, 12:06 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, eric miao, (Tue Nov 13, 5:57 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, eric miao, (Tue Nov 13, 6:00 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, eric miao, (Tue Nov 13, 6:02 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, eric miao, (Tue Nov 13, 6:03 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, eric miao, (Tue Nov 13, 6:04 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, eric miao, (Tue Nov 13, 6:04 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Tue Nov 13, 8:25 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Tue Nov 13, 8:28 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Tue Nov 13, 8:30 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Tue Nov 13, 8:53 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Tue Nov 13, 9:18 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Tue Nov 13, 9:36 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, eric miao, (Tue Nov 13, 11:37 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, eric miao, (Tue Nov 13, 11:40 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, eric miao, (Tue Nov 13, 11:46 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, eric miao, (Tue Nov 13, 11:51 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Wed Nov 14, 12:08 am)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Wed Nov 14, 12:19 am)
Re: [patch/rfc 1/4] GPIO implementation framework, eric miao, (Wed Nov 14, 12:36 am)
Re: [patch/rfc 1/4] GPIO implementation framework, Jean Delvare, (Sat Nov 17, 3:38 am)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Sat Nov 17, 10:36 am)
Re: [patch/rfc 1/4] GPIO implementation framework, Jean Delvare, (Tue Nov 20, 8:20 am)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Mon Nov 26, 6:46 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, eric miao, (Tue Nov 27, 3:58 am)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Tue Nov 27, 10:26 am)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Tue Nov 27, 12:03 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, David Brownell, (Tue Nov 27, 12:29 pm)
[patch/rfc 2.6.24-rc3-mm] gpiolib grows a gpio_desc, David Brownell, (Tue Nov 27, 8:15 pm)
Re: [patch/rfc 1/4] GPIO implementation framework, eric miao, (Tue Nov 27, 10:11 pm)
Re: [patch/rfc 2.6.24-rc3-mm] gpiolib grows a gpio_desc, David Brownell, (Wed Nov 28, 2:53 am)