From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751978AbcF0KL5 (ORCPT ); Mon, 27 Jun 2016 06:11:57 -0400 Received: from mail-db3on0144.outbound.protection.outlook.com ([157.55.234.144]:39795 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751767AbcF0KLx (ORCPT ); Mon, 27 Jun 2016 06:11:53 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; From: Peter Rosin To: CC: Peter Rosin , Wolfram Sang , Rob Herring , Mark Rutland , Andrew Morton , "David S. Miller" , Greg Kroah-Hartman , Kalle Valo , Mauro Carvalho Chehab , Jiri Slaby , Guenter Roeck , , open list Subject: [PATCH] dt-bindings: i2c: add bindings for nxp,pca9541 Date: Mon, 27 Jun 2016 12:11:22 +0200 Message-ID: <1467022282-21062-1-git-send-email-peda@axentia.se> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [217.210.101.82] X-ClientProxiedBy: DB4PR06CA0067.eurprd06.prod.outlook.com (10.162.49.35) To VI1PR02MB1312.eurprd02.prod.outlook.com (10.165.231.154) X-MS-Office365-Filtering-Correlation-Id: 17c95c5a-9af2-4dea-3bf6-08d39e737353 X-Microsoft-Exchange-Diagnostics: 1;VI1PR02MB1312;2:GsdxIkoXyZz6pMlGLqzety6peIhzu3NoloX3zZe7D97BX1CpQkJPALQKYAg7MGv1hWnGlrDTMPIfHluw86Emoc7/4dFUurtc7IkkmvDEuobVV1Deav7dbvMUlHYZR1eYH4o2lgZo8VwPtTEBgcC231u4VLkoKX4kAjq9vp+Igdp+2mV8N49iqT3JyzG+EV8O;3:EMtkwYJ3jBZ3zAvTK6um1bEPPRDn/YUhYMYxoDYy1UtLRL/XZ3oYWS02e5EsiKaI5XihRIjub5n1Ngs2wYZYRPgiWCHr6WlMipWNud7Jv5Hv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soft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040130)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041072)(6043046);SRVR:VI1PR02MB1312;BCL:0;PCL:0;RULEID:;SRVR:VI1PR02MB1312; X-Microsoft-Exchange-Diagnostics: 1;VI1PR02MB1312;4:yjGjEWXkd0pjygx56AK1Lk9uaP5Ev2mujZf/5tuAK0ERhWgdCIoS7qZnDlmlDgMSgLSdePnFiHQ9thfFFQj4arbxBhk0UDHmyHs2hb9A62z/f9hK5hePeChOK8FetoEgnsMbqTcrTaDNcIVZPFV5LA34rviZ4pHe/1QHZmBVrafI25Kg0YNeSzhoDaSQPMnlAc9W/mVj6EkcCpukcC7mntZghdg15u/tPWrRyPBgMSu8sCnvtAvJQGlERB5GYy/GAqMVq+BrqN5eLkFKWzcuRqPn5G7Q0OwQ4GMFFCgPHHItYfXzL9ePDMrGXTb9pEcgsQIpq/tbWyuK6u4F2m3Kk5a9Hht0b/x1MNfS/UFJ4i8Ua+ROqxIjI4GSnfdvvUxZMhlkJowFXxMZa33iY3+5AfgqwtcuUKv7Z1juxB2B4Ic= X-Forefront-PRVS: 09860C2161 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(6069001)(7916002)(189002)(199003)(81156014)(2351001)(81166006)(77096005)(105586002)(106356001)(33646002)(8676002)(2906002)(575784001)(86362001)(92566002)(229853001)(50986999)(586003)(101416001)(36756003)(6116002)(3846002)(110136002)(4326007)(97736004)(189998001)(42186005)(66066001)(74482002)(47776003)(5003940100001)(48376002)(7736002)(305945005)(50466002)(50226002)(7846002)(68736007)(19580395003)(19580405001)(142933001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR02MB1312;H:localhost.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1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VgHQhDY/E9hWTBgO2XQyJUCkoazeROzYOCT2V16vKh8+tvX6yupNcVvQOFwn6BNJkxPjUdw9N0UU4j+o1CdXqN1ms9u6wiJuhwE3t6/hi7BmduXv29H5V0svmN4p0dYm0VyYrSBSfDx45yXnv4WcNWQIxaCD2jieo9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2016 10:11:46.2287 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR02MB1312 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fill the gap for this pre-existing driver. Signed-off-by: Peter Rosin --- .../devicetree/bindings/i2c/i2c-arb-pca9541.txt | 33 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-arb-pca9541.txt Hi! I'm wondering about this driver. It is not a trivial device, and yet it has historically relied on the i2c core matching the chip w/o vendor prefix. This is not ideal. But what to do about the driver implementing this in terms of an i2c-mux, somthing which the chip is not; It is an i2c arbitrator. It just happens to rely on the i2c mux core also handling i2c gates and i2c arbitrators. But that seems like a Linux detail. So I don't know what to do here? That is, the patch - as is - describes something that would be trivial to support today, but at the same time it seems to be too tied to Linux. The problem is that the i2c@0 intermediate node is not really needed, but at the same time removing it would cause a disruption for the driver since it can't really use the i2c mux core if that node isn't there. I don't see a simple way to fix that in the i2c mux core either (but admittedly haven't given it too much thought). Any suggestions? Cheers, Peter PS. The driver source is in drivers/i2c/muxes/i2c-mux-pca9541.c diff --git a/Documentation/devicetree/bindings/i2c/i2c-arb-pca9541.txt b/Documentation/devicetree/bindings/i2c/i2c-arb-pca9541.txt new file mode 100644 index 000000000000..edbe84935906 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-arb-pca9541.txt @@ -0,0 +1,33 @@ +* NXP PCA9541 I2C bus master selector + +Required Properties: + + - compatible: Must be "nxp,pca9541" + + - reg: The I2C address of the device. + + The following required properties are defined externally: + + - Standard I2C mux properties. See i2c-mux.txt in this directory. + - I2C child bus nodes. See i2c-mux.txt in this directory. + + +Example: + + i2c-arbitrator@74 { + compatible = "nxp,pca9541"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x74>; + + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + eeprom@54 { + compatible = "at,24c08"; + reg = <0x54>; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index e1b090f86e0d..3dd44d0d166c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5521,6 +5521,7 @@ S: Maintained F: Documentation/i2c/i2c-topology F: Documentation/i2c/muxes/ F: Documentation/devicetree/bindings/i2c/i2c-mux* +F: Documentation/devicetree/bindings/i2c/i2c-arb* F: drivers/i2c/i2c-mux.c F: drivers/i2c/muxes/ F: include/linux/i2c-mux.h -- 2.1.4