All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Crispin <blogic@openwrt.org>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: spi-devel-general@lists.sourceforge.net,
	linux-mips@linux-mips.org,
	Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Subject: Re: [PATCH] SPI: MIPS: lantiq: adds spi-xway
Date: Wed, 22 Aug 2012 21:04:56 +0200	[thread overview]
Message-ID: <50352D58.6040201@openwrt.org> (raw)
In-Reply-To: <20120822185944.GD7995@opensource.wolfsonmicro.com>

On 22/08/12 20:59, Mark Brown wrote:
>> +       if (of_machine_is_compatible("lantiq,ase"))
>> > +               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

WARNING: multiple messages have this Message-ID (diff)
From: John Crispin <blogic-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
To: Mark Brown
	<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	Daniel Schwierzeck
	<daniel.schwierzeck-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>,
	linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org
Subject: Re: [PATCH] SPI: MIPS: lantiq: adds spi-xway
Date: Wed, 22 Aug 2012 21:04:56 +0200	[thread overview]
Message-ID: <50352D58.6040201@openwrt.org> (raw)
In-Reply-To: <20120822185944.GD7995-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>

On 22/08/12 20:59, Mark Brown wrote:
>> +       if (of_machine_is_compatible("lantiq,ase"))
>> > +               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

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

  reply	other threads:[~2012-08-22 19:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16  7:57 [PATCH] SPI: MIPS: lantiq: adds spi-xway John Crispin
2012-08-22 18:59 ` Mark Brown
2012-08-22 19:04   ` John Crispin [this message]
2012-08-22 19:04     ` John Crispin
2012-08-22 19:09     ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50352D58.6040201@openwrt.org \
    --to=blogic@openwrt.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=daniel.schwierzeck@googlemail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.