Received: by 10.223.185.116 with SMTP id b49csp1297035wrg; Wed, 21 Feb 2018 16:07:53 -0800 (PST) X-Google-Smtp-Source: AH8x227CPIa/f4T7Op91hU1Y8muFafgvO/D9wiN19WnKG5FUxvxCMyZwFSv74pU6qmNxDXze9TPd X-Received: by 10.98.76.215 with SMTP id e84mr4989941pfj.45.1519258072967; Wed, 21 Feb 2018 16:07:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519258072; cv=none; d=google.com; s=arc-20160816; b=EI7Wlo5mS6mfDUrKK00UGbtNDlxsWJH/pOZa2WlUMFE/RKdj+P75xDMEiFkXGZwHTx atfWWWlH2sQN8Sn822NjpFuEerpVwVyVfO40CazGI22P8K3n8YQ4yzu10dVAkPKm964N o3LUYZANKy3KCUZZXDtJwMc1IzOBZZdfaCDPyArwajRj34MUjKNeXWOHtR3KKiZRPTs1 DXklcsBywcjDfg4o69KoJDJ8Y87Bdzf2d3bOSrKG0w0ccNU75/1zxOYb+Xa2zwfRbJ8v tCSrv3fQLeyOHerWFHbT9qvPRA9BtuSdzCzdRehhFOQN0aBq7opCCydetsKwuvb6OvP5 4Dnw== 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=QdejDvx48CcK8LrIhPNafR5UxON7ic4mMhoHnVQj1cM=; b=pKzbmTv3pr00+wzt9tsm69+bSQmAMI+xwCkXiDFOzIVluV69tDqroefQJCpMMk5+WK zbBpcO8hmhem3YjyD8iYB9Q29wsAfHUgMgklgXtheJrCbPSGnoZVAFUptfUxY215m8TA 2t+UoggNyg8qvWMjfMAz3SlDlgYrwiwg+8Rhm+PkN6X2MC85u0KaDBTztQ+BZ1MP1O+S vTT7c0UHvsiBOjKMvOpECSst/oQKWA3v94FRrXeP1ThOVwj+F7/0StGJRb4+j6uR28kL 57GKXKs2GxiohvzMsTDn1Swi6W5eDNHquzadehl6kRt+Qs8MpbJ62yx7mK2pkPMTzGzU a46Q== 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 k30si661669pgn.319.2018.02.21.16.07.38; Wed, 21 Feb 2018 16:07:52 -0800 (PST) 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 S1751457AbeBVAHG (ORCPT + 99 others); Wed, 21 Feb 2018 19:07:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:36260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751327AbeBVAHE (ORCPT ); Wed, 21 Feb 2018 19:07:04 -0500 Received: from mail-qk0-f179.google.com (mail-qk0-f179.google.com [209.85.220.179]) (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 1B76921795; Thu, 22 Feb 2018 00:07:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B76921795 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-qk0-f179.google.com with SMTP id h129so4371882qke.8; Wed, 21 Feb 2018 16:07:04 -0800 (PST) X-Gm-Message-State: APf1xPDOXHoGjh1RzKI0Eu7JkUcofO3LXWCL9kDQOy9dcQe5Lyv55wqW aQ9zdmlekBf5owCSZZdXRZ48cat/a4sCeH5V4Q== X-Received: by 10.233.223.5 with SMTP id t5mr7767103qkf.326.1519258023288; Wed, 21 Feb 2018 16:07:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.245.67 with HTTP; Wed, 21 Feb 2018 16:06:42 -0800 (PST) In-Reply-To: References: <1518100057-23234-1-git-send-email-amelie.delaunay@st.com> <1518100057-23234-2-git-send-email-amelie.delaunay@st.com> <20180218231938.goeht7tomfkab6uu@rob-hp-laptop> From: Rob Herring Date: Wed, 21 Feb 2018 18:06:42 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/6] dt-bindings: mfd: Add ST Multi-Function eXpander driver To: Amelie DELAUNAY Cc: Lee Jones , Linus Walleij , Mark Rutland , Russell King , Alexandre TORGUE , Maxime Coquelin , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" 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 Mon, Feb 19, 2018 at 9:59 AM, Amelie DELAUNAY wrote: > > > On 02/19/2018 12:19 AM, Rob Herring wrote: >> On Thu, Feb 08, 2018 at 03:27:32PM +0100, Amelie Delaunay wrote: >>> This patch adds documentation of device tree bindings for the >>> STMicroelectronics Multi-Function eXpander (MFX). >>> >>> Signed-off-by: Amelie Delaunay >>> --- >>> Documentation/devicetree/bindings/mfd/st-mfx.txt | 51 ++++++++++++++++++++++++ >>> 1 file changed, 51 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/mfd/st-mfx.txt >>> >>> diff --git a/Documentation/devicetree/bindings/mfd/st-mfx.txt b/Documentation/devicetree/bindings/mfd/st-mfx.txt >>> new file mode 100644 >>> index 0000000..423d800 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/mfd/st-mfx.txt >>> @@ -0,0 +1,51 @@ >>> +STMicroelectronics Multi-Function eXpander >>> + >>> +ST Multi-Function eXpander (MFX) is a slave controller using I2C for >>> +communication with the main MCU. Its main features are gpio expansion, main >>> +MCU IDD measurement (IDD is the amount of current that flows through VDD) >>> +and resistive touchscreen controller. >> >> You don't have to implement all the drivers now, but please completely >> describe the device. As is, there is no reason to have a child GPIO >> node. >> > The MFD driver will be abandoned as only GPIO part is used. I'll send a > V2 soon. >>> + >>> +Required properties: >>> +- compatible: must be "st,mfx" >> >> Kind of generic. Only 1 single version ever? >> > "st-mfx" compatible will disappear in V2 (we keep only GPIO driver). MFX > version can be read in MFX FW_VERSION register. So do I keep > "st,mfx-gpio" compatible or you want to see mfx version ? That sounds a bit worrying. The other functions will *never* get accessed? The DT should reflect the h/w including any future needs, not just what you have a driver for today. >>> +- reg: I2C address of the device >>> +- interrupts: interrupt triggered by MFX_IRQ_OUT signal >>> +- interrupt-parent: interrupt controller MFX is connected to >>> +- interrupt-controller: marks the device as an interrupt controller >>> +- #interrupt-cells: should be <1>, index of the interrupt within the >>> + controller, in accordance with the "one cell" variant of >>> + >>> + >>> +Optional nodes: >>> + >>> +* GPIO eXpander >>> +MFX provides 16 programmable GPIOs, and it is also possible to recover 8 >>> +alternate GPIOs if the main functions are not used (touchscreen controller and >>> +IDD measurement not enabled). >>> + >>> +Required properties: >>> +- compatible : must be "st,mfx-gpio" >>> +- interrupt-parent : must be <&mfx> >> >> Not necessary. A parent node with 'interrupt-controller' property is the >> interrupt's parent. >> > I will keep it in mind. >>> +- interrupts = must be <0> >>> +- gpio-controller: marks the device node as a GPIO controller >>> +- #gpio-cells: should be <2>, the first cell is the GPIO offset on this GPIO >>> + controller, the second cell is the gpio flags in accordance with >>> + . >> >> Custom flags? Use standard flags. >> >> DT binding headers should be part of this patch. >> > Custom flags because MFX GPIOs have several types: > - Output open drain with internal pull-up resistor > - Output open drain without internal pull-up resistor > - Output push pull without internal pull resistor > - Input with internal pull-up resistor > - Input with internal pull-down resistor > - Input floating > - Input analog. > Standard flags don't have pull up or down information. That's why I am > using custom flags, they overloads standard flags. I'll leave this one to Linus to comment on. > I will add DT bindings header in this patch V2.