Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753381AbbFRMgB (ORCPT ); Thu, 18 Jun 2015 08:36:01 -0400 Received: from demumfd002.nsn-inter.net ([93.183.12.31]:60000 "EHLO demumfd002.nsn-inter.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752014AbbFRMfx (ORCPT ); Thu, 18 Jun 2015 08:35:53 -0400 Subject: Re: [Patch v2] driver/i2c/mux: Add register based mux i2c-mux-reg To: ext York Sun , wsa@the-dreams.de References: <1434575634-27977-1-git-send-email-yorksun@freescale.com> Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Paul Bolle , Peter Korsgaard From: Alexander Sverdlin Message-ID: <5582BB1F.5050606@nokia.com> Date: Thu, 18 Jun 2015 14:35:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <1434575634-27977-1-git-send-email-yorksun@freescale.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-size: 657 X-purgate-ID: 151667::1434630944-000058B4-8FC2079B/0/0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 879 Lines: 28 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. 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... Other than that it looks good to me... -- Best regards, Alexander Sverdlin. -- 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/