Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965392AbbHKQvO (ORCPT ); Tue, 11 Aug 2015 12:51:14 -0400 Received: from mail-bl2on0133.outbound.protection.outlook.com ([65.55.169.133]:64650 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755355AbbHKQvM (ORCPT ); Tue, 11 Aug 2015 12:51:12 -0400 X-Greylist: delayed 899 seconds by postgrey-1.27 at vger.kernel.org; Tue, 11 Aug 2015 12:51:11 EDT Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yorksun@freescale.com; Message-ID: <55CA2472.9080000@freescale.com> Date: Tue, 11 Aug 2015 09:36:02 -0700 From: York Sun User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Wolfram Sang CC: , , Paul Bolle , Peter Korsgaard , Alexander Sverdlin Subject: Re: [Patch v3] driver/i2c/mux: Add register-based mux i2c-mux-reg References: <1434657458-16553-1-git-send-email-yorksun@freescale.com> <20150811153916.GD1525@katana> <55CA1ADF.200@freescale.com> <20150811161610.GA1523@katana> In-Reply-To: <20150811161610.GA1523@katana> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [192.88.168.49] X-ClientProxiedBy: BY2PR05CA030.namprd05.prod.outlook.com (10.141.250.20) To BN1PR03MB156.namprd03.prod.outlook.com (10.255.201.28) X-Microsoft-Exchange-Diagnostics: 1;BN1PR03MB156;2:2yAhOXoZeYQKFEbn6yyGHZb1C3D6ppQP2tm8PNsQuYlpXW4F/W/RGN6k93vo6L7JLGU3VpTjYYchYBzYsrbluIWYWuXAxbAuv+1WO3mhsE8DoNXnmuJ0HgbZ7sh1wg1p5HVBiM1BnYFNgyv+5U4uX7hfERTvpvNvVh5m+R4hCSs=;3:kXeumwj4uC2syu23PboMqPrpR6EDdhZXAT9ch+Ciw0KFmVAHBO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Pz+rL8=;4:lidLExtc+tES7yh8Zuyd4/cThHEXXfFn9egVqH33jihboxlI3HSMOmKsF7Qih4TvoGR7WBItXzKHqoPqWFJTPeeEK6nEa+pEdFYfG/CkF1mcaIsRM8rI+mWsSIK1alVff/V3HI32omFFpB2GosOcJl6QLOqAQXcmdOD08O9b4MPydSxkCcLH0Gu0QUJVUoYuWy/A60fnYnQWS8Bbtwy3VEigHg53tkZ0fbNYyQXTCCVZCSteDmlp77szmk0rHVp9CiZYe4EnHchw/TeBPHi+Y7NTbXzAlTlbJyvver01yIc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BN1PR03MB156;BCL:0;PCL:0;RULEID:;SRVR:BN1PR03MB156; X-Forefront-PRVS: 066517B35B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(6009001)(199003)(377454003)(24454002)(189002)(479174004)(93886004)(65806001)(68736005)(5001860100001)(42186005)(2950100001)(106356001)(77096005)(230783001)(80316001)(86362001)(59896002)(4001540100001)(97736004)(64126003)(87976001)(83506001)(110136002)(101416001)(66066001)(122386002)(4001350100001)(62966003)(54356999)(5001960100002)(105586002)(65816999)(47776003)(87266999)(65956001)(36756003)(81156007)(77156002)(40100003)(92566002)(33656002)(76176999)(189998001)(23746002)(46102003)(5001920100001)(50986999)(50466002)(64706001)(5001830100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN1PR03MB156;H:[10.214.82.34];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BN1PR03MB156;23:MNusYEcccPKS58l9z6UBNKNChFpwOO3LXnW5tw?= =?Windows-1252?Q?U4T1RLtzmIuk3Mn9BIMFB69Soo8yaHj76p5OhqfJ44J9iQ89lqnf3GV/?= =?Windows-1252?Q?At2Jnv8rBlmsCEl5574NSMkA1Jrn2z3cMmULdmSBimrFvertjh1In6xE?= =?Windows-1252?Q?mBsNHv0cAkULHdZVFYcDxo2gUM60SX/MI/wmR8nXZ6TZVMQvIaA4qtc6?= =?Windows-1252?Q?qX/a+MUxeUwmJYr6ahyU/8GlYF67TcDC5uO+MRNc5X8UvSSV11L8IQqi?= =?Windows-1252?Q?1gtbokF2UoXUuMjJm3fXr2vQjKQaB+uHNuHtWU0q7v+LSulRZEucgFGO?= =?Windows-1252?Q?WE5EgQkQPB0ySt9oQnA082M/m2EG7Zrlye1sz0bJ2Ezvb/C8gfZwuxhK?= =?Windows-1252?Q?cnekJi3Vj9Iwj8ZWhG7LhpsDXVPrNDAxgNhx17Ac7s4G3yIKY2rTH6xv?= =?Windows-1252?Q?hdRDuKlVvAFCvnVv5Z3IgmlPw3ypn4HE5ZdZ9ZdB4vLIsZyMv9PJmWfV?= =?Windows-1252?Q?UuCYzz8EOAl7H4tPpvEgHcIn4LH7EWTwLneC0uwrKDUmyeTyWW4O5x67?= =?Windows-1252?Q?89pBI+gJ/y/YDUE17H3+oG/tVv4idI7IIUoXoRmdCYpNTZuyzierMTaY?= =?Windows-1252?Q?2ykcZeZND1XMhV1lRuPEYrPXBCd8P3aew5bVmfMz1vMcgyA5f8YeT4c7?= =?Windows-1252?Q?aAPM3UvE3DgI0czknRvdALMsBGh7aSt8510W2pZK6oVZyrCGnhce4wy3?= =?Windows-1252?Q?K7zVcxT4HDZeYrBWws38bNujegDs6g20Aumtjdpx5WkDoh3SZw67dtXv?= =?Windows-1252?Q?O8IIV2bI31Ifj5CDq7Cv7nJH18KmFTtBx4AGxesikwsyDqtf68L0kDDW?= =?Windows-1252?Q?0biXGjYPmAdABMWSLYmPz5gn+uc34z88Uy1jTPP25F6n6kgPDf4JjDv6?= =?Windows-1252?Q?6gjbpQixJR0T8f9Neri+q5aBJ6s8jd5I+QUARr/Ac26ZG/Eq1Qi9J3TH?= =?Windows-1252?Q?Yg/TbjmKEr1oWErVmg035evYR3CwgnhL8RhC4dZU4I1wCabTcPPWwWZh?= =?Windows-1252?Q?gSUORSz9Bek2Cdu7oAYdiTu2+QMNV5QQ9TAXfssogHxtG3CAa4MdDG1p?= =?Windows-1252?Q?rfskqmU+OQlddOfK3f1HywFHteDKyTbs2WfVv5VH5XdvLX9ejDhkQmRl?= =?Windows-1252?Q?bPFjypWMeuU5wcb2+x/FKq8EUpzuOflg8Ak+d5aMsD6xYKAF/UFrzsB5?= =?Windows-1252?Q?aehOprjhRJ62d0JwS+qKw/+P8LOSxbXQP0jlNKbwYUBXhuP2aTuvqzKv?= =?Windows-1252?Q?yy1ZFZhoCcuBlwggrXDVSImrPtrWX4HVaAXZZnb7odvI27SfJMpOjR3E?= =?Windows-1252?Q?69PVOQ252ZYANGGV7b1q+dtBT1UN074FGbQ/bahxR3URdkzDqhTx1KBE?= =?Windows-1252?Q?yy9jgcBdeCfLUOZ8eb?= X-Microsoft-Exchange-Diagnostics: 1;BN1PR03MB156;5:cD3leyNc6e4ZxYd1mXZ8voY4/dPkpKhIfr8vdARbRL1dcwjCiU4uctzy7aE7aI0Wpi6GYQEUOkkd5sY8d3Mi42PCl0eX7rqF3rUl/ZyJ9wuokzgFgfHbyZNL/8T6QdUBKTgyzjkQDT6Du0DSWpQqOw==;24:bRfwmLO0GTEwqZJ/lgA488NC3oP4h2ZciNohfLwp5cKBcv82qVY+86kNVsKU2EcdJ3NUk5PHUYK3q1bDJcSI5McSI8RoT6f0O3GsGTfEO00=;20:FIA7lZMIp7v/Dv9H87GLtDY07FDl5pk4qTNxv+o6ui6AqHZ/+RjfoPmhtUDq1/PdMaE4YHL0LeB0bktMih8QVQ== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2015 16:36:10.4014 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR03MB156 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1359 Lines: 35 On 08/11/2015 09:16 AM, Wolfram Sang wrote: >>>> + if (of_find_property(np, "little-endian", NULL)) { >>> >>> You should check for a "big-endian" property as well, no? >> >> I use the little-endian as an option to indicate the nature of litten-endian >> register. It is default to big-endian if this property doesn't exist. I prefer >> this way unless you strongly suggest to add both and throw out an error if >> neither exists. > > I'd think that "little-endian" or "big-endian" force a setting. If none > is present, we shall take the CPU endianess. Or am I overlooking > something? You are right. The current code checks for littel-endian property. If missing, the CPU endianess is used. Do you prefer to check littlen-endian first, if missing then big-endian, if both missing then use CPU endianess? > > Oh, and I forgot the biggest issue: I get build errors, because > __LITTLE_ENDIAN__ should be __LITTLE_ENDIAN. Is this a recent change or > why did it work for you? > I tested it on 4.0.4 kernel. I see a lot of reference of __LITTLE_ENDIAN__. I will test the new patch on the latest kernel. York -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/