Re: [PATCH 2.6-git] SPI: add set_clock() to bitbang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Brownell wrote:

How exactly that's done is system-specific.  Many controllers
just have a register per chipselect, listing stuff like SPI mode,
clock divisor, and word size.  So switching to that chipselect
kicks those in automatically ... devices ignore the clock unless
they've been selected.
Hmm, usually clocks are configured for the bus not device.

Not a chance.  The clock is activated to talk to a given device;
and there's no requirement that all devices on the bus use the
same clock rate.  (If one chipselect gives access to a linked series
of devices, clearly they'll all need to be clocked alike.  But
that's not a bus, it's just a compound device ... like a big shift
register.)

I did my homework when putting that API together, and looked at
quite a few SPI controllers.  **Not one** of them forces all
their chipselets to use the same clock rate.
I admit that thw word 'usually' is incorrect here, but still we have two Philips ARM boards where the SPI clock is configured _only_ on the bus, by setting the bus clock divisor on per-message basis. I was also keeping in mind PXA, so it wasn't just bare words...

Vitaly
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux