From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755142AbbFCLt2 (ORCPT ); Wed, 3 Jun 2015 07:49:28 -0400 Received: from bhuna.collabora.co.uk ([93.93.135.160]:42356 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755059AbbFCLtK (ORCPT ); Wed, 3 Jun 2015 07:49:10 -0400 Message-ID: <556EE9AF.6030303@collabora.co.uk> Date: Wed, 03 Jun 2015 13:49:03 +0200 From: Javier Martinez Canillas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: Lee Jones CC: Samuel Ortiz , Olof Johansson , Doug Anderson , Bill Richardson , Simon Glass , Gwendal Grignou , Stephen Barber , Filipe Brandenburger , Todd Broch , Alexandru M Stan , Heiko Stuebner , linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Gwendal Grignou Subject: Re: [PATCH v4 6/8] mfd: cros_ec: Support multiple EC in a system References: <1433232671-27679-1-git-send-email-javier.martinez@collabora.co.uk> <1433232671-27679-7-git-send-email-javier.martinez@collabora.co.uk> <20150603085340.GL3329@x1> <556ED303.6090401@collabora.co.uk> <20150603112741.GA12304@x1> In-Reply-To: <20150603112741.GA12304@x1> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Lee, On 06/03/2015 01:27 PM, Lee Jones wrote: > On Wed, 03 Jun 2015, Javier Martinez Canillas wrote: [snip] >> >> >> >> - err = mfd_add_devices(dev, 0, cros_devs, >> >> - ARRAY_SIZE(cros_devs), >> >> + if (IS_ENABLED(CONFIG_OF) && dev->of_node) >> >> + ec_p.ec_name = of_get_property(dev->of_node, "devname", >> >> + NULL); >> > >> > Has this binding already been accepted? We don't normally allow >> > "device name"properties in DT. >> > >> >> Sigh, I now noticed that I missed the DT binding change when originally >> forward porting the patches from the downstream ChromiumOS tree. I'm so >> sorry about that. >> >> ChromiumOS tree has in Documentation/devicetree/bindings/mfd/cros-ec.txt: >> >> Optional properties (All): >> - devname: name of the EC. Can be based on its function: for instance, >> for Sensor Hub, 'cros_sh', for Power Delivery MCU 'cros_pd'. >> If not present, 'cros_ec' can be assumed. >> >> When you say that normally device names are not allowed in DT, do you mean >> that "devname" is a too generic property name? (which I totally agree) or >> that DT bindings shouldn't have a property to change a device's name for >> something more descriptive? >> >> Because for example, the regulator bindings has a "regulator-name" property. >> If you agree I can change the property to "google,cros-ec-name" which should >> be more precise. > > I mean, no names of devices are allowed in Device Tree: > > `git grep name -- arch/arm/boot/dts/ | grep dev` > Ok, but do you agree on having a "google,cros-ec-name" (with no dev on it) property to define the resource name just like regulators have "regulator-name" that changes what is shown in /sys/kernel/debug/regulator/$name? Otherwise all the EC's will be named cros_ec or regardless of their function and this is shown in both /dev/$name and /sys/class/chromeos/$name. Best regards, Javier