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

Re: HELP: test kernel patches on the real thing



On Mon, May 04, 2015 at 01:58:28PM -0700, Dan DeVoto wrote:
> >Can you send me the device tree of your machine in the 
> >mean time?
> 
> Sure, thanks for working on this, but I'm not sure what device 
> tree refers to.  Is there a specific command output or text file
> I should send you?

Let's skip this for now, I think I found something. Can you test the
attached patch a) without my previous patch and b) on top of the previous patch?

From: Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH] i2c: powermac: don't workaround for keywest

commit 3a3dd0186f619b74e61e6f29dddcaf59af7d3cac ("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.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
 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 60a53c169ed2b3..9ccf156ded32ef 100644
--- a/drivers/i2c/busses/i2c-powermac.c
+++ b/drivers/i2c/busses/i2c-powermac.c
@@ -288,7 +288,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];
 
@@ -308,8 +309,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");
@@ -365,7 +366,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;
 		}
 

Attachment: signature.asc
Description: Digital signature


Reply to: