From patchwork Sat May 9 17:23:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 470337 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AA9D7140281 for ; Sun, 10 May 2015 03:25:03 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 8E3721A0EC5 for ; Sun, 10 May 2015 03:25:03 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from pokefinder.org (sauhun.de [89.238.76.85]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id A6AC81A0E55 for ; Sun, 10 May 2015 03:24:02 +1000 (AEST) Received: from p4fe25bb0.dip0.t-ipconnect.de ([79.226.91.176]:52688 helo=localhost) by pokefinder.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Yr8Tf-0007jX-Is; Sat, 09 May 2015 19:23:51 +0200 From: Wolfram Sang To: linux-i2c@vger.kernel.org, Benjamin Herrenschmidt Subject: [PATCH] i2c: powermac: don't workaround for keywest Date: Sat, 9 May 2015 19:23:33 +0200 Message-Id: <1431192213-2904-1-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 2.1.4 Cc: Mark Elliott , linuxppc-dev@lists.ozlabs.org, Dan DeVoto , Wolfram Sang X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Commit 3a3dd0186f619b ("i2c/powermac: Improve detection of devices from device-tree") added a codec device instantiation workaround unconditionally although it is only needed for onyx. Do it conditionally since keywest has its own codec instantiation in the sound drivers. Thanks must go to GrowlTiger from Gentoo bug report #469132 for bisecting. Reported-by: Dan DeVoto Signed-off-by: Wolfram Sang Tested-by: Dan DeVoto Tested-by: Mark Elliott Fixes: 3a3dd0186f619b ("i2c/powermac: Improve detection of devices from device-tree") --- drivers/i2c/busses/i2c-powermac.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c index 6abcf696e3594b..cad5552c0cd4e4 100644 --- a/drivers/i2c/busses/i2c-powermac.c +++ b/drivers/i2c/busses/i2c-powermac.c @@ -285,7 +285,8 @@ static void i2c_powermac_add_missing(struct i2c_adapter *adap, static bool i2c_powermac_get_type(struct i2c_adapter *adap, struct device_node *node, - u32 addr, char *type, int type_size) + u32 addr, char *type, int type_size, + bool found_onyx) { char tmp[16]; @@ -305,8 +306,8 @@ static bool i2c_powermac_get_type(struct i2c_adapter *adap, return true; } - /* Now look for known workarounds */ - if (!strcmp(node->name, "deq")) { + /* Now look for known workarounds for onyx/aoa */ + if (found_onyx && !strcmp(node->name, "deq")) { /* Apple uses address 0x34 for TAS3001 and 0x35 for TAS3004 */ if (addr == 0x34) { snprintf(type, type_size, "MAC,tas3001"); @@ -362,7 +363,7 @@ static void i2c_powermac_register_devices(struct i2c_adapter *adap, /* Make up a modalias */ if (!i2c_powermac_get_type(adap, node, addr, - info.type, sizeof(info.type))) { + info.type, sizeof(info.type), found_onyx)) { continue; }