Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753839AbbFRH6h (ORCPT ); Thu, 18 Jun 2015 03:58:37 -0400 Received: from demumfd002.nsn-inter.net ([93.183.12.31]:43527 "EHLO demumfd002.nsn-inter.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753386AbbFRH6b (ORCPT ); Thu, 18 Jun 2015 03:58:31 -0400 Subject: Re: [PATCH] driver/i2c/mux: Add register based mux i2c-mux-reg To: ext York Sun , wsa@the-dreams.de References: <1434475692-4611-1-git-send-email-yorksun@freescale.com> <55818C3C.8000704@nokia.com> <5581A3CA.4050805@freescale.com> Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Peter Korsgaard From: Alexander Sverdlin Message-ID: <55827A1E.4020608@nokia.com> Date: Thu, 18 Jun 2015 09:58:22 +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: <5581A3CA.4050805@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: 942 X-purgate-ID: 151667::1434614304-000058B4-57818A4C/0/0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1164 Lines: 28 Hello! On 17/06/15 18:43, ext York Sun wrote: >> > Yeah, this is really bad idea. You maybe want something like >> > __iomem "cookie" here instead of this bare pointer. > Let me try. > Could you think about different access widths, please? Not all buses are 32-bits wide and even on 64-bit CPUs one might have 16-bit bus and 32 bits accesses are not allowed or perform two accesses, etc... So to cover the use-cases which I see one needs to have a possibility to select between __raw_writeb()/__raw_writew()/__raw_writel()/__raw_writeq() (now that I'm thinking about it, I think these native-Endianness functions are preferred and if one has a bus with different Endianness he should think about the conversion in the reg property of subnodes). Very important is readback with corresponding __raw_read*(), but maybe you want to do this optional via additional DT property... -- 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/