From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758062AbbIVPRU (ORCPT ); Tue, 22 Sep 2015 11:17:20 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:65001 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753352AbbIVPRT (ORCPT ); Tue, 22 Sep 2015 11:17:19 -0400 From: Arnd Bergmann To: Guenter Roeck Cc: Constantine Shulyupin , Jean Delvare , open list , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala Subject: Re: Please suggest proper format for DT properties. Date: Tue, 22 Sep 2015 17:17:05 +0200 Message-ID: <2276160.jkVDCt4RhG@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <56016EE9.1010302@roeck-us.net> References: <1442615803-17766-1-git-send-email-const@MakeLinux.com> <3914149.k3sqApaTEz@wuerfel> <56016EE9.1010302@roeck-us.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:gMI44NjhjVHuYr5HZH+JcP3h7AK1css53XjU4loxDJzJtRS20J9 LhyuYuVAByzhFcLTZCmDVxinCbceijKKf6GKlxxu5B5MvHhD1pe3JAiohoDCA0EuQTWOvOx nluIg5cONti7flolaybXTbb1n+qvX7pk1VoLex5jv1HtW8PX5Oq/IO2KR4G09r+8aY/tDDx k92p5hvnKzK7DnNLRha2g== X-UI-Out-Filterresults: notjunk:1;V01:K0:BJDP2+/+PWk=:0p8FHEjupQTQj+Z4KP4l7h aHpou0Wie/UBiGjGC4vPM4Py7kSo6Pb+GFE9b234nZkpMDUG/A9dDYyJ/PANuNY+6snG5dbiR rkGIT//XFYR39TObhFJvn00qi2kMpVN3zUsd8NsgloZUJTbcmHiu4VvAuQBSU5OYhQB/mg/YB ZBCKLitsITl9OEMl05A7GbNcVDabihE8WJKmevPngi8LwoqAO4NGSbXpgD8/9Cn7+JnyurTsV gZWQnQb/hBBRugIGXUgbMUJzJ8D0CfM7C1jn3ppQd1f+leY3mI0q0hGSrSARcttrrZhM3PG7+ /VjBY3bbF/BhR2qryxYzYyQBrD3jNAVw8++l5YLzH3INh0FiiZRGOWzE3znxVhT445u0bxrhu qF3KO5LA9TlubtLAdzmlay67sh3ZQ4LMolp6vsApnix2Bw+Ku2ruHrn52rQebk093YhRSMysb 0gdl/4GoELsGJ5bLPiDzFhnv0E9HttsJKqwbwc3THMPUrrxOqHPe1Rktd5mmhE8uJjZVhfy8e BU63kGcmRyv+Ob97fbXPE4kFDrD0RKSA+iJUdgIIoIXFcVdN4gVfJfixgR43hTPEjbe1Y+Ywc tma140IjNIZIVOYN/8SWG7J63tPbou2XvqP+c7Sh3QNQFJIrp3SZZD2i9poeLni/qflPeXSaz iJD0yHm4afXLJyXGjGVz+nlDVzZlqq8DwNpR/yrT6nyQDGFVPdGEo5KB/xtL+Uj9Er6CUxkKA XRS+Sv64ednsO3l2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 22 September 2015 08:08:25 Guenter Roeck wrote: > > I would strongly prefer Option 1 or 2 over option 3. > > Between 1 and 2, I'd probably go for 1. Another option might > > be to have a subnode per sensor: > > > > nct7802@2a { > > compatible = "nuvoton,nct7802"; > > reg = <0x2a>; > > #address-cells=<1>; > > #size-cells=<0>; > > > > sensor@1 { > > compatible = "nuvoton,nct7802-thermistor"; > > further-properties; > > }; > > sensor@3 { > > compatible = "nuvoton,nct7802-voltage"; > > for-example-range-mv = <0 5000>; > > }; > > }; > > > I personally would prefer this approach. It would also make it easier to add more > properties. Wonder what is more appropriate, though - a compatible property or > something like the following ? > sensor-type = "xxx"; > > I don't have a preference, just asking. I'm not sure here, either way would work, and we are not particularly consistent in this regard. Maybe someone else has a stronger preference. > Also, would the index be derived from "@1", or should there be a reg property ? There needs to be a 'reg' property. Sorry for missing that above. Arnd