Received: by 10.192.165.156 with SMTP id m28csp1301497imm; Wed, 18 Apr 2018 07:34:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+9JQYe+DUG0QBIxZ9e3zmiXWdMDyyrnR+EEuh17dmt7P2c7h/L7VNXQMp3uYi9v1s2n58K X-Received: by 10.101.88.194 with SMTP id e2mr1941060pgu.229.1524062061192; Wed, 18 Apr 2018 07:34:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524062061; cv=none; d=google.com; s=arc-20160816; b=DroMjyFDoCWrxlqaBJ2Davwg7Tjp/AC8kC3CW5JA4Hno33udZ1Te7X6jMSXeLikwha skTbtUVg0Otu7f82IcUCcM1nrsPfqnKK+W+4caFrLqRxdWfjfgzvvhCAk5K7Bl/eLx7N axaLZ9cPgWDi5MPjB7AeoO90Iw6GP+oqbBxBHhw4U0ZbvOHElYQK24Kwn8ii1PQD+1wn vovuL/YX8Wy0gCsuslMttsLa2MDNOghzCc33zD08IPhpwALVrfxrCofUsiYdflNSPT12 svneC16tTl7NmFl8VyVy1WlHhn1LcrCto0U1crmvrc0jV0FZDBSXgkISQ3twLXRe3CSt 4yXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=bsTvMRelnsfqZfrdLI1SSHFRwYovVepa/7OiZzNPvmc=; b=nBxl3FbvgmJs9yH0KJxzQbowaEY16qxnv7UX7XXNRfD8cpYOXKU1Y8sT+/iRmwybdI FPclyoCSwOiBD6d4CxwItTOhVZgZ5NuooJ0OcSJ9Jm7CmnKg6WZU9QhpvG5/Pb5OXy1B AMsRDUyxtgaGPMUsB2J5+suWWS9jz/9I2ywkDtLXcMoxq6IqtLQvjKkpAJFGPiuzmqq+ zQrHcHJMItfdkteqJDdG9e8WCPq18pgiXwOa5I2CR0WFnFcxztcYUYZo7IW5i49fwthl Nct3UGHmGfbJaiuOPOyW2DnAZvR9XxoA2HvM4zNC4T1WcHhCnu+yJoR2nHnXtYguwiXB 3O1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m72si1263148pfi.236.2018.04.18.07.34.06; Wed, 18 Apr 2018 07:34:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753835AbeDROdB (ORCPT + 99 others); Wed, 18 Apr 2018 10:33:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:39918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752687AbeDROc6 (ORCPT ); Wed, 18 Apr 2018 10:32:58 -0400 Received: from mail-qt0-f171.google.com (mail-qt0-f171.google.com [209.85.216.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 268622184A; Wed, 18 Apr 2018 14:32:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 268622184A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh@kernel.org Received: by mail-qt0-f171.google.com with SMTP id h4-v6so1976716qtn.13; Wed, 18 Apr 2018 07:32:58 -0700 (PDT) X-Gm-Message-State: ALQs6tBlU/SaZVEqgz6oSLH3ZavXNWERLd5exH+HzL7Y4b59qb39S8+g 1E2AOomYdJJnxdoE3yfqxO3yp4BeqpvCV/sGpw== X-Received: by 2002:aed:26c3:: with SMTP id q61-v6mr2526486qtd.60.1524061977109; Wed, 18 Apr 2018 07:32:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.163.228 with HTTP; Wed, 18 Apr 2018 07:32:36 -0700 (PDT) In-Reply-To: <6ff697e8-cd20-e551-da13-b614cc39f900@linux.intel.com> References: <20180410183212.16787-1-jae.hyun.yoo@linux.intel.com> <20180410183212.16787-8-jae.hyun.yoo@linux.intel.com> <20180416181423.t4vf7sugv6z3aw5h@rob-hp-laptop> <287e0fd9-b631-2602-2785-7b8aaed7a6b9@linux.intel.com> <6ff697e8-cd20-e551-da13-b614cc39f900@linux.intel.com> From: Rob Herring Date: Wed, 18 Apr 2018 09:32:36 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 07/10] Documentation: dt-bindings: Add documents for PECI hwmon client drivers To: Jae Hyun Yoo Cc: Alan Cox , Andrew Jeffery , Andrew Lunn , Andy Shevchenko , Arnd Bergmann , Benjamin Herrenschmidt , Fengguang Wu , Greg KH , Guenter Roeck , Haiyue Wang , James Feist , Jason M Biils , Jean Delvare , Joel Stanley , Julia Cartwright , Miguel Ojeda , Milton Miller II , Pavel Machek , Randy Dunlap , Stef van Os , Sumeet R Pawnikar , Vernon Mauery , "linux-kernel@vger.kernel.org" , linux-doc@vger.kernel.org, devicetree@vger.kernel.org, Linux HWMON List , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , OpenBMC Maillist Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 17, 2018 at 3:40 PM, Jae Hyun Yoo wrote: > On 4/16/2018 4:51 PM, Jae Hyun Yoo wrote: >> >> On 4/16/2018 4:22 PM, Jae Hyun Yoo wrote: >>> >>> On 4/16/2018 11:14 AM, Rob Herring wrote: >>>> >>>> On Tue, Apr 10, 2018 at 11:32:09AM -0700, Jae Hyun Yoo wrote: >>>>> >>>>> This commit adds dt-bindings documents for PECI cputemp and dimmtemp >>>>> client >>>>> drivers. >>>> >>>> > > [...] > >>>>> +Example: >>>>> + peci-bus@0 { >>>>> + #address-cells = <1>; >>>>> + #size-cells = <0>; >>>>> + < more properties > >>>>> + >>>>> + peci-dimmtemp@cpu0 { >>>> >>>> >>>> unit-address is wrong. >>>> >>> >>> Will fix it using the reg value. >>> >>>> It is a different bus from cputemp? Otherwise, you have conflicting >>>> addresses. If that's the case, probably should make it clear by showing >>>> different host adapters for each example. >>>> >>> >>> It could be the same bus with cputemp. Also, client address sharing is >>> possible by PECI core if the functionality is different. I mean, cputemp and >>> dimmtemp targeting the same client is possible case like this. >>> peci-cputemp@30 >>> peci-dimmtemp@30 >>> >> >> Oh, I got your point. Probably, I should change these separate settings >> into one like >> >> peci-client@30 { >> compatible = "intel,peci-client"; >> reg = <0x30>; >> }; >> >> Then cputemp and dimmtemp drivers could refer the same compatible string. >> Will rewrite it. >> > > I've checked it again and realized that it should use function based node > name like: > > peci-cputemp@30 > peci-dimmtemp@30 > > If it use the same string like 'peci-client@30', the drivers cannot be > selectively enabled. The client address sharing way is well handled in PECI > core and this way would be better for the future implementations of other > PECI functional drivers such as crash dump driver and so on. So I'm going > change the unit-address only. 2 nodes at the same address is wrong (and soon dtc will warn you on this). You have 2 potential options. The first is you need additional address information in the DT if these are in fact 2 independent devices. This could be something like a function number to use something from PCI addressing. From what I found on PECI, it doesn't seem to have anything like that. The 2nd option is you have a single DT node which registers multiple hwmon devices. DT nodes and drivers don't have to be 1-1. Don't design your DT nodes from how you want to partition drivers in some OS. Rob