diff mbox

spi: tegra: sequence compatible strings as per preference

Message ID 1352452052-13823-1-git-send-email-ldewangan@nvidia.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Laxman Dewangan Nov. 9, 2012, 9:07 a.m. UTC
Sequence compatible list for tegra20-slink driver to first
look for Tegra30 and then Tegra20. Tegra30 have additional
feature in HW which need to be utilize if it is provided from DT.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/spi/spi-tegra20-slink.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Stephen Warren Nov. 9, 2012, 5:04 p.m. UTC | #1
On 11/09/2012 02:07 AM, Laxman Dewangan wrote:
> Sequence compatible list for tegra20-slink driver to first
> look for Tegra30 and then Tegra20. Tegra30 have additional
> feature in HW which need to be utilize if it is provided from DT.

I don't object to this patch.

However just FYI, it should not be necessary for correctness; The DT
matching order is supposed to be driven purely by the order of the
compatible values in the DT now, and not affected by the order of values
in the table. (This wasn't always the case, but was a bug that was fixed
IIRC by Thierry Reding).

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
Stephen Warren Nov. 9, 2012, 5:28 p.m. UTC | #2
On 11/09/2012 10:10 AM, Mark Brown wrote:
> On Fri, Nov 09, 2012 at 10:04:56AM -0700, Stephen Warren wrote:
> 
>> However just FYI, it should not be necessary for correctness; The
>> DT matching order is supposed to be driven purely by the order of
>> the compatible values in the DT now, and not affected by the
>> order of values in the table. (This wasn't always the case, but
>> was a bug that was fixed IIRC by Thierry Reding).
> 
> I guess the driver is being used backported in older kernels which
> don't have that fix?

That sounds likely. Laxman, it'd be a good idea to track down the fix
to the DT matching code and backport it, so that hard-to debug issues
aren't caused by the lack of that patch!

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
Grant Likely Dec. 19, 2012, 5 p.m. UTC | #3
On Sat, 10 Nov 2012 18:07:42 +0100, Thierry Reding <thierry.reding@avionic-design.de> wrote:
> On Fri, Nov 09, 2012 at 10:28:38AM -0700, Stephen Warren wrote:
> > On 11/09/2012 10:10 AM, Mark Brown wrote:
> > > On Fri, Nov 09, 2012 at 10:04:56AM -0700, Stephen Warren wrote:
> > > 
> > >> However just FYI, it should not be necessary for correctness; The
> > >> DT matching order is supposed to be driven purely by the order of
> > >> the compatible values in the DT now, and not affected by the
> > >> order of values in the table. (This wasn't always the case, but
> > >> was a bug that was fixed IIRC by Thierry Reding).
> > > 
> > > I guess the driver is being used backported in older kernels which
> > > don't have that fix?
> > 
> > That sounds likely. Laxman, it'd be a good idea to track down the fix
> > to the DT matching code and backport it, so that hard-to debug issues
> > aren't caused by the lack of that patch!
> 
> Unfortunately the patch that was supposed to fixed this caused a
> regression and was therefore reverted. Rob (Cc'ed) said there was a
> patch to fix it properly and was supposed to go into 3.6 but it seems
> that never happened. Rob, what's the status on this?
> 
> The revert is here: bc51b0c22cebf5c311a6f1895fcca9f78efd0478

Rob, ping on this. I think we talked about it on IRC, but I cannot
remember what was said.... I must be getting old.

g.


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
diff mbox

Patch

diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
index 07dc735..7882b50 100644
--- a/drivers/spi/spi-tegra20-slink.c
+++ b/drivers/spi/spi-tegra20-slink.c
@@ -1109,8 +1109,8 @@  const struct tegra_slink_chip_data tegra20_spi_cdata = {
 };
 
 static struct of_device_id tegra_slink_of_match[] __devinitconst = {
-	{ .compatible = "nvidia,tegra20-slink", .data = &tegra20_spi_cdata, },
 	{ .compatible = "nvidia,tegra30-slink", .data = &tegra30_spi_cdata, },
+	{ .compatible = "nvidia,tegra20-slink", .data = &tegra20_spi_cdata, },
 	{}
 };
 MODULE_DEVICE_TABLE(of, tegra_slink_of_match);