[PATCH 1/4] [SPI] spi_mpc83xx: convert to the OF platform driver

Anton Vorontsov avorontsov at ru.mvista.com
Thu May 22 03:05:06 EST 2008

On Wed, May 21, 2008 at 10:50:02AM -0600, Grant Likely wrote:
> > +
> > +       master->num_chipselect = of_num_children(np);
> This assumes that there are no gaps in the assigned CS numbers of
> child nodes, or that the child nodes are an exhaustive list of
> attached devices, neither of which may be true.  num_chipselect should
> be calculated from the number of GPIOs specified instead.

[I'm not arguing just a thought.]

- every SPI device must have its own chip-select, otherwise SPI device
  node should not be a part of a SPI controller node;
- or there is just once device on the SPI bus with chip-select always
  asserted, no gpios = <> is specified (this case is implemented);
- or the SPI is bridged, gpios = <> should list behind-the-bridge devices'
  chip-selects, and driver should understand that there is a "special"
  (bridge) device somewhere on the bus (not implemented).

Anton Vorontsov
email: cbouatmailru at gmail.com

More information about the Linuxppc-dev mailing list