Thread (2 messages) flat view 2 messages, 2 authors, 2012-08-22

Re: [PATCH] SPI: MIPS: lantiq: adds spi-xway

From: John Crispin <hidden>
Date: 2012-08-22 19:04:56
Also in: linux-spi

On 22/08/12 20:59, Mark Brown wrote:
quoted
+       if (of_machine_is_compatible("lantiq,ase"))
quoted
+               master->num_chipselect = 3;
+       else
+               master->num_chipselect = 6;
This is very suspicious - why is this being done based on the machine
rather than based on the IP?  Surely there can be machines with this SoC
on which aren't compatible with whatever (reference?) board this is
matching on.  I'd expect that the driver would have multiple compatible
strings which it uses to distinguish the capabilities of the IP.

Though actually the driver never reads this value so perhaps the code
can just be deleted and we rely on the fact that if the /CS isn't
physically present nobody's going to hook it up on a board so just
always set it to 6?
Thanks for the review i will rework the driver, add a binding doc and
resend ...

is there a equivalent of of_machine_is_compatible for IP ?

John
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help