From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753341AbbJPJS1 (ORCPT ); Fri, 16 Oct 2015 05:18:27 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:57605 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752034AbbJPJSX (ORCPT ); Fri, 16 Oct 2015 05:18:23 -0400 From: Arnd Bergmann To: Masahiro Yamada Cc: linux-arm-kernel , arm@kernel.org, Russell King , devicetree@vger.kernel.org, Kumar Gala , Linux Kernel Mailing List , Ian Campbell , Rob Herring , Pawel Moll , Mark Rutland Subject: Re: [PATCH 2/3] ARM: dts: uniphier: add ProXstream2 Vodka board support Date: Fri, 16 Oct 2015 11:18:04 +0200 Message-ID: <9943173.h49fNtDsEp@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1444899934-4754-1-git-send-email-yamada.masahiro@socionext.com> <63719761.5kc6F97FjG@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:u+TSmv5kh9R9IjGe+LfHT8cE9bjV0MwawAA6bIj/Zq6hQuSQv0C G7UKmKZBe8wljsqg21ZyHSa3M6B+IMniGPpEi7LKPo375sJPSCVd3QgoD0NBFOlU3pRQ6sk 5tpHFeY9o3bBHPMkeIWDandi0q7VV8diAfc3NGOdCDiZpxuIWcadbxQZ1teIQqHtCg+JDas xs4pjMq5p4LjtsjK+8b8w== X-UI-Out-Filterresults: notjunk:1;V01:K0:A1jyCllI1/Y=:orIzW0Rgd/wmVRVpmnIn/R PWXDOEEQAOOcHVVU6+HfOGnvmmRRto3cNf4oXIa6GKS24tVLnabGKf4xw4PzIWvR2SUdzR52Q ugfHCWSNqin7t1X3rhAN9YoOzMYZ4BHMPo2hmYXBTwjer51kqyRt7Eqbiny2JeXt2kaTNqvR/ 8Pvmzd6KrAB0uMwQJ179fTRIXUnw32NCAE6iy1l/QPiyb+mQGXtYY5P/3CvX4JshSlCtl+YPY SYI4ZTtYFgN5MRkBZUUwXTdutoNLd9vieDII18MkklOnj4L2l6FpkFwug7avxmemLTT6bKcq8 FLv+9nfi9LUqIBwD3tv9sP5Cc9eUYrc6pha9OOfO3L7GlfH3Oh8LOaY/EStdVEtHNdV4NehIJ Ns3+nnqcb3ssehVMSki/VyOkXSwwmMKIsIEpK1YzzCzmDulLe2mteDPeGRlvgalqa7LvhN79k djxv53CNcbeUsZSftjkNRGuSLuAJ+6Is3WiW9uxJmurH4NO8W7YuEvanwUqMhLV3vaiHKxWTp +98F66kzldRpmmZdZeH+ucivvGBh+im9gHiMvQxKMhtUOeQNMY280C4HJZZvgKqfWhUBz1laX JQi2nXeThI+KicMc4LOpdJSKpWTuH1dKUNI7mEQ39BlXVFcJkiVtRHBwkTjfNtEDiXRyqs1hy NSYhCHLTKNJfCE5nPOnmjFgLH6ypc24ECvs2xft9r+JiD/oqQuR5eWte4kUzlmP2bfvVufFWq nb+O1vAw20IVytxg Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 16 October 2015 14:24:30 Masahiro Yamada wrote: > > No, it is not a typo, but intentional. > > > i2c0 - i2c3 are connected to the pads of the SoC package. > On the other hand, i2c-4 - i2c-6 are connected to > internal devices inside the SoC package. > > i2c-4 - i2c-6 are always connected to the same hardware > devices and always used for the same purpose. > > > My expected scenario is: > > [1] i2c0 - i2c3 are connected to the on-board devices > depending on board variants. > On some boards, their status is "okay" and > on some boards, their status is "disabled". > > [2] i2c4 - i2c6 are always used to communicate > with in-package devices. The status is always "okay". I think you are getting confused because the data sheet uses the same names as the kernel, but they are really different things. How about boards that have i2c connectors that are labeled differently? We want the aliases to match whatever is written on the board normally, to make it easier for users. > [3] Some user-land applications may want to have access > through the same character devices, > /dev/i2c4, /dev/i2c5, /dev/i2c6 That user space would however only work on boards with the same SoC, which is not a safe assumption to make. Either it should be specific to just one board which has a known set of buses, or it should be done in a way that works across SoC generations of families. Ideally the devices on the internal buses would have an in-kernel driver that exports a high-level API to avoid this problem. What devices are these? > If your way is adopted, > the real hardware "i2c4" might be aligned to /dev/i2c1 on some boards, > and /dev/i2c2 on others, etc. Right, I think that is how it should be. You could also make the chip's i2c4 always link to user space /dev/i2c0 if you want to keep those stable, but as I said that is still not a good (software) system design. Arnd