Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4234516imm; Mon, 20 Aug 2018 12:08:29 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzoOzbtBVPUu4ejJKSyMIPLp3n8n9jOXKPOsZQeFiMZjmgSUzleoituEAmRsTZiaebrUFOF X-Received: by 2002:a62:fc5:: with SMTP id 66-v6mr49826819pfp.237.1534792109755; Mon, 20 Aug 2018 12:08:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534792109; cv=none; d=google.com; s=arc-20160816; b=v3p1rR/ZzcZ1BPFIv5XzvK9K1LR6VkC7Rn1b6ZcV04BjgZ3r76kLmjOmiUF6KZ94bw vFvZHPW8I7xib48GAQk70oUbaVYJmlVgycmHuICTvD5KAua0NSzF6hgBzCTOyU1pz1T9 bnQlUB17RLETsup5qpzm1vuUfO74tV9RC8LoDugDt3voTZRvYpS0K5JKVBK+/eW6L3Cg wWIT8JLTurStUxziNkAIpNPtGVYJHyVrg265lMlbHpnbiwonJ2RkYQJAtbOQfoHThouX mfHNMx2bh0WeyhqMX2hNQXwoh6iWl+POMkCfIwNnjLRoE5QKSacUyVQA52YwhdA+55l6 sWNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=BnYy97H5bvbapqXvP7MDZjvjvp7P4dlRA+emGbX91eM=; b=PW8XbBFp5cPqZth6bWOtDPRAjVjKXjHt8uEndQw2HU8PSiYot6m9Avai2egEYEY9P2 gUPXen3YA8si+EHxhz1HH7PehB5ILbYbKpluvU8Gks0y9u7h90EfW79xMeiFQzNGQyU/ OZgx4wN/mPA8hTS1amOcStWADcDUJaowp0VQLT0kYZ9d/YYaRSsi6SiOHw5kgn18Xnn+ QjuysH4wJKswQ5iLUM/VR1K9XA1ssX8cFGcuR84S6jH3wR7ot56CYS8olTsi4PNLP5M1 vV/Nh8u7rn+fOG367YgkplfjmMRtICINhj+obte4NnZSDHDnPiV153SPmJ6E8ZrxLqag ll6A== 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 k24-v6si7909856pgn.574.2018.08.20.12.08.01; Mon, 20 Aug 2018 12:08:29 -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 S1726671AbeHTWXN (ORCPT + 99 others); Mon, 20 Aug 2018 18:23:13 -0400 Received: from mail.bootlin.com ([62.4.15.54]:50444 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726293AbeHTWXN (ORCPT ); Mon, 20 Aug 2018 18:23:13 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id A905420737; Mon, 20 Aug 2018 21:06:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id D62342072F; Mon, 20 Aug 2018 21:06:21 +0200 (CEST) Date: Mon, 20 Aug 2018 21:06:21 +0200 From: Boris Brezillon To: Bartosz Golaszewski Cc: Srinivas Kandagatla , Alban , Jonathan Corbet , Sekhar Nori , Kevin Hilman , Russell King , Arnd Bergmann , Greg Kroah-Hartman , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Grygorii Strashko , "David S . Miller" , Naren , Mauro Carvalho Chehab , Andrew Morton , Lukas Wunner , Dan Carpenter , Florian Fainelli , Ivan Khoronzhuk , Sven Van Asbroeck , Paolo Abeni , Rob Herring , David Lechner , Andrew Lunn , linux-doc , Linux Kernel Mailing List , Linux ARM , linux-i2c , "open list:MEMORY TECHNOLOGY..." , Linux-OMAP , netdev , Bartosz Golaszewski Subject: Re: [PATCH v2 06/29] mtd: Add support for reading MTD devices via the nvmem API Message-ID: <20180820210621.5ffe3866@bbrezillon> In-Reply-To: References: <20180810080526.27207-1-brgl@bgdev.pl> <20180810080526.27207-7-brgl@bgdev.pl> <20180817182720.6a6e5e8e@bbrezillon> <20180819133106.0420df5f@tock> <20180819184609.6dcdbb9a@bbrezillon> <5b8c30b8-41e1-d59e-542b-fef6c6469ff0@linaro.org> <20180820202038.5d3dc195@bbrezillon> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 20 Aug 2018 20:50:55 +0200 Bartosz Golaszewski wrote: > 2018-08-20 20:20 GMT+02:00 Boris Brezillon : > > On Mon, 20 Aug 2018 11:43:34 +0100 > > Srinivas Kandagatla wrote: > > > >> > >> Overall am still not able to clear visualize on how MTD bindings with > >> nvmem cells would look in both partition and un-partition usecases? > >> An example DT would be nice here!! > > > > Something along those lines: > > > > mtdnode { > > nvmem-cells { > > #address-cells = <1>; > > #size-cells = <1>; > > > > cell@0 { > > reg = <0x0 0x14>; > > }; > > }; > > > > partitions { > > compatible = "fixed-partitions"; > > #address-cells = <1>; > > #size-cells = <1>; > > > > partition@0 { > > reg = <0x0 0x20000>; > > > > nvmem-cells { > > #address-cells = <1>; > > #size-cells = <1>; > > > > cell@0 { > > reg = <0x0 0x10>; > > }; > > }; > > }; > > }; > > }; > > If there'll be an agreement on the bindings: will you be willing to > merge Alban's patch even without support in the code for the above > (with the assumption that it will be added later)? No, because Alban's patch actually allows people to define and reference nvmem cells in a DT, but without documenting it (see my first reply). > My use-case is on > non-DT systems and creating nvmem devices corresponding to MTD > partitions if fine by me. What you propose is option #1 in my list of proposals, and it requires some changes to avoid automatically assigning nvmem->dev.of_node to parent->of_node (which will be != NULL when the MTD device has been instantiated from a DT node). > I also don't have the means to test the > support for these bindings if I were to actually write them myself. And that's the very reason I proposed #1. I don't want to block this stuff, but in its current state, I'm not willing to accept it either. Either we agree on the binding and patch the nvmem framework to support this new binding, or we find a way to hide the fact that the mtd device (the nvmem parent) has a DT node attached to it.