[U-Boot] [PATCH 1/2] mpc83xx: Add a GPIO driver for the MPC83XX family

Joe Hershberger joe.hershberger at gmail.com
Wed Aug 10 01:03:52 CEST 2011


On Tue, Aug 9, 2011 at 5:54 PM, Kim Phillips <kim.phillips at freescale.com> wrote:
> On Tue, 9 Aug 2011 17:31:29 -0500 Joe Hershberger <joe.hershberger at ni.com> wrote:
>
>> +     /* Update the local output buffer soft copy */
>> +     gpio_output_value[ctrlr] =
>> +             (gpio_output_value[ctrlr] & ~lineMask) | (value ? lineMask : 0);
>
> what's the use of having a local output buffer soft copy?  I don't
> see it being used anywhere.

It's used in the line you quoted.  If other lines on the same
controller are configured for open-collector, but are externally
pulled low, then using the DAT register instead of the soft copy will
force those to be actively grounded.  To avoid this, I use a
soft-copy.

-Joe


More information about the U-Boot mailing list