Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754591AbbFRPJD (ORCPT ); Thu, 18 Jun 2015 11:09:03 -0400 Received: from mail-bn1bon0144.outbound.protection.outlook.com ([157.56.111.144]:43470 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752173AbbFRPIz (ORCPT ); Thu, 18 Jun 2015 11:08:55 -0400 X-Greylist: delayed 73171 seconds by postgrey-1.27 at vger.kernel.org; Thu, 18 Jun 2015 11:08:54 EDT Authentication-Results: barco.com; dkim=none (message not signed) header.d=none; Message-ID: <5582DF03.7010109@freescale.com> Date: Thu, 18 Jun 2015 08:08:51 -0700 From: York Sun User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Alexander Sverdlin , CC: , , Paul Bolle , Peter Korsgaard Subject: Re: [Patch v2] driver/i2c/mux: Add register based mux i2c-mux-reg References: <1434575634-27977-1-git-send-email-yorksun@freescale.com> <5582BB1F.5050606@nokia.com> In-Reply-To: <5582BB1F.5050606@nokia.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [192.88.168.49] X-ClientProxiedBy: CY1PR22CA0018.namprd22.prod.outlook.com (25.162.32.156) To BN1PR03MB154.namprd03.prod.outlook.com (10.255.201.18) X-Microsoft-Exchange-Diagnostics: 1;BN1PR03MB154;2:djOegPQoc3Rnp/EQ0pT9biG3LrJ3W9OYAn1nK1gVBt6d//KJqaBS+kl1EXMaTMD1;2:prGOU1ikNciolh8pYbZ9u7dCCQVSMzrXqjq8DDNeZNYHtyoIgvGjRwXAfNInvrCIEjIg4eH41Keowe9Rgx+UHJVGGx+YC7DeNudVf5sSMnB5QoAP2XDANYE3aPiw6tZfL6Q4TjhlMzNVj7P043Gwow==;6:gTLdYEqixvVupKIO50QZHDg0zrLOJCIoNCkCvhuqzs0MZprAeNh1/di3vLL60/xAlHQgBfnjq9A1Zmp848AfjOx4DG/8mSsGM8KcdXyy+QWA4T4ffoJkmtvowHJ+kmRxz7lHRXMyZBnU2DjK/Z7mDFGcsreKa2rmdKZ4/RFpYPosPPacXrBWNyzOnx3F8wv3OkL14TBC/z5zc7cmAdVbZ67xe2Z/d+fNUFuUloboRide0GXQbDYtdc0GmAJ6RcoA8CHVmsbM5TuJYXaGE3rr65vD+NHmPsPrAChysQtW1Xy0ShpWcC1I1ueF9b/3/FaZ715rqwF34rVVISyX9gySIuJiIKULOzPN4oCAR9HBFNt/ymyEeh1jgTraX4i6RZ3/C/LbbQglWR8HyagBMSRJoebuDp9ZC0WDNdFri5LCtiqw9iinjkt4HcLZIRwbWqhyCWX2V7wwz6Z8UtC0fVr1l7zWu4JxTwpBrKqFIdLLNH/EaqPw6jIXuzQsirD6h/qSz2UKhPxi3LXRWB6e0LLmbRYM0/d97YJAahKhowD7o2T64AElAhSl+AasAiRhPwNBTl1UbR/l7PqS25gKoZigRJLHjwRmOuA+4UhBujXvsX4= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR03MB154; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(520003)(5005006)(3002001);SRVR:BN1PR03MB154;BCL:0;PCL:0;RULEID:;SRVR:BN1PR03MB154; X-Microsoft-Exchange-Diagnostics: 1;BN1PR03MB154;3:gmORy3gEubmG/n96xlC3uCwW4iNAKTR64vzXEZzmwYLSrMoVJZgSc1XQID+7OyamuhsMWeDX5OUqH8m+iIsDm5hOHhn04WLpf9Rp3WflUnFFOigOPC//88irWHKgiZBTW71tFTK+q8BGImMS0QS5XAnIZtO81OyeXChqNd3i2bs2FUkifoqwa4nfRyyztU0J7PU8wsKB6xATMtISkLXDP0zQszkRks9iDRTg6AVOm5RiCTwYO6o+nqh/BztxPJTvuuUfMFp38rzEvr+wXC811IyEhyzQoct5YcTTpsSufclsVEx2tCmtr8mSAT1ArrBt X-Forefront-PRVS: 0611A21987 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(6049001)(51704005)(377454003)(24454002)(479174004)(4001350100001)(5001770100001)(77156002)(62966003)(36756003)(66066001)(65956001)(230783001)(33656002)(189998001)(92566002)(5001960100002)(83506001)(86362001)(65816999)(50466002)(80316001)(77096005)(54356999)(47776003)(19580395003)(23676002)(122386002)(46102003)(50986999)(42186005)(40100003)(87266999)(76176999)(87976001)(2950100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN1PR03MB154;H:[10.214.81.216];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjFQUjAzTUIxNTQ7OTpOSXRlM2lhUFhObDhkSm5UWWQrWjNkM2tJYkQz?= =?utf-8?B?M085cjd4d1IzZjhsdEgvb0RzWk9EVHErWEExSEpLcjdVMklvZFNJa1piTWpB?= =?utf-8?B?NEpKOHdxZ0gvWENBd291N1dMZEtKUDdDa1BrQjV3RFM1YnluWktnd0t1WS9u?= =?utf-8?B?d1RHMlhWYitab1psMG5CMjYyb1VBQkk0R05aaUh6d2k4U3Z6S2dtWFVyaEVD?= =?utf-8?B?UEZDOWlqYTlmajJlTjlEaU43dTN1ek1iSURXMHowQy9nTmFKbmZ2emdtbzFY?= =?utf-8?B?Z1V6RnRSUzlDQmF0UVhOT3c2RHJBTE5ZT3Y2UWJMWWlnd3U4ME1VaklBQ3lY?= =?utf-8?B?T1FMMTBQSUd6VnVtUXFjRlpsUm1kaldWYmc1QUpvTTBhNUdqNy9JWXpCaHE0?= =?utf-8?B?cW5aWFlybFFna1phbDhlRFBhRUJqa0N1SE9SUkFNZWhSMWVLNHd6dFZNMmxx?= =?utf-8?B?ajhyemlyWUV3clAySGZ6M05VYm9uSHg2U09YMlVBdVplT3NId0hTcWNQZWh6?= =?utf-8?B?YUswVTV0YnMrMk94ZUNmT1l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wXKIlBKC8JmDf95gLs9qFVMGkoqfyo/w2NGHdnDG60FBbdMSJ64PpoPNGa1wnR59CQGZcN6WfrogPcl2ihfw==;10:63/bdriK2J6sZoSoOhDy2yWXs/78I969A7zzOBBm+aQVG3qp1KZ58auZBhq6ry8b5NINVxxXE1qeid4pIq8liFnkqk7IEWLbu1GAnC/ewPU=;6:zpQJDeCC+M5WrlKKE50NNnUjIKnEGIiUwS9FiLuQ0kxnmxiGUaAf+Q9ctiIW+oM1 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2015 15:08:52.3900 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR03MB154 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1192 Lines: 40 On 06/18/2015 05:35 AM, Alexander Sverdlin wrote: > Hello! > > On 17/06/15 23:13, ext York Sun wrote: >> + switch (mux->data.reg_size) { >> + case 4: >> + iowrite32(mux->data.values[chan], mux->data.reg); >> + break; >> + case 2: >> + iowrite16(mux->data.values[chan], mux->data.reg); >> + break; >> + case 1: >> + iowrite8(mux->data.values[chan], mux->data.reg); >> + break; > > I'd like to see at least [optional] read-back operation after each write. Maybe I should add ioread after each write without using an option. I want to avoid additional option if possible. > And if you stick with iowrite*(), maybe it desires a comment (in the Documentation/ file?), > that write will be little-Endian, therefore BE users must take care... I am consulting with my colleagues. If I cannot come up with a native endianess solution, I will keep using iowrite and add a comment. > > Other than that it looks good to me... > Thanks. 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/