Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2096012imm; Fri, 7 Sep 2018 10:42:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbU1Q7qHrajoEPST8nrzO79jhkzUclat/88kS4KPEQDvr1BBHXGOuEyrjSokbOGk7cagMxO X-Received: by 2002:a62:174a:: with SMTP id 71-v6mr9874262pfx.217.1536342167899; Fri, 07 Sep 2018 10:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536342167; cv=none; d=google.com; s=arc-20160816; b=nqgMD03YhhHLSEinlk2aFEWO5j6AkWSo4Yh4h7To0QD2L/XyCPxx/vv7oqymJf4zhq 4A+PK2LgucPQTKTzV3aTmfKNDGDoyODCJf825ZSfaMeoflOo7qNfD6nd5ZXHzoW9eeuI qB0mDV+ha+b97qBOPXVnxzXzds44vYzt8QoWSLqWunalLeSxZHJIgicsgvv/hmVBCUb0 3dlZ5LOkF+snKacucypTeeYfDaNZteTcxeK9gsgT7ZWSHVBQhRBhjApLAdP3eW0ECXoa mZfUMSB10Y1CS3ANZaJfILumjegxsrQSyakzLdBpAKeYg4Zx9B/fFnVI0tey5hGfDU/m wodw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=VdVLmCnfLqvEiEfXLye5tP73oQHmOZ7WHMmfVw8WW8s=; b=OJT0qqr9aDccHARzQvv7WuZWYQJl6fpgYxhWsAc7rVMbF+p6CJZJ+7j0C/zaNVE0y3 f1MofTbKVt+ok7BU/X1FBRgl4xWH8QpFtx/qW5J0ZTdyzoHgDvEPJzbW8L9GyDlzoRep mN3TKQ0G0OKj+hVI5LBDrT54O1VYZbfs1ySyvza4Z6VI9WzzG8Mh7sc3gbp/uuGWvwBp ZtmdQHfMEUp7JzyCNp+CjbO4SM5moDuvwgz9KX/xaQmwVF07rjbkEnRQPVKDdjpXal4N xUJYJV2HCxzGxbTOVqKw6H34vOQMeqVpUdkhmJsUQTW1t8g4EavBbf5rv+L2ZaaQhVKf 4K1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@obeliks.de header.s=jul2017 header.b=ZA+th1bO; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=obeliks.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e27-v6si9226229pgn.253.2018.09.07.10.42.32; Fri, 07 Sep 2018 10:42:47 -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; dkim=fail header.i=@obeliks.de header.s=jul2017 header.b=ZA+th1bO; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=obeliks.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727339AbeIGWWm (ORCPT + 99 others); Fri, 7 Sep 2018 18:22:42 -0400 Received: from scopuli.esotechnik.de ([79.143.188.15]:55560 "EHLO mail.esotechnik.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726506AbeIGWWm (ORCPT ); Fri, 7 Sep 2018 18:22:42 -0400 X-Greylist: delayed 325 seconds by postgrey-1.27 at vger.kernel.org; Fri, 07 Sep 2018 18:22:41 EDT Received: by mail.esotechnik.net (Postfix) with ESMTPSA id 22677AE0B80; Fri, 7 Sep 2018 19:35:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=obeliks.de; s=jul2017; t=1536341716; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=VdVLmCnfLqvEiEfXLye5tP73oQHmOZ7WHMmfVw8WW8s=; b=ZA+th1bOfhkXfs+jIHmm7/9RkbAVAU0rdge2J+8Sc8vz89poovL/IMhpBnhKyKZxOox+zo U4xRLp4s/1pSyiQWexl1rqvhI7wIWrqnf/vEEOpY6kBSiGG08AczJhObmTyY3SX26by9jb euIrAmnTIGxh6fRNAaJUBbR31+sO8UbW5a3TkDAIZ6sFWxvJOo97qjMcWJWSpWUxs7NhHI 6Wqz5PFSXAw6BayVIYGzzTYLgAwlR5km2ZY7b2/TqFljRi0tDhPQeiiCoZoqx1GitVVp3A WiBeOPrLxBg/kUxks3149iEeRA5Wf8iZQQaJUdi0cLKpzBmUyResg6yqhw9dug== From: Bernhard Frauendienst To: linux-kernel@vger.kernel.org Cc: Miquel Raynal Subject: [PATCH v2 0/3] mtd concat device driver Date: Fri, 7 Sep 2018 19:35:12 +0200 Message-Id: <20180907173515.19990-1-kernel@nospam.obeliks.de> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi everybody, when porting my router board from a mach-file based OpenWRT target to a device-tree based target, I found that there is no generic way to create a mtd_concat device from within the dts. The following patches attempt to provide that possibility. This is a second roll of that patch series, the first one can be seen at [1]. Apologies for not including the correct recipients in the first roll. In this first discussion, concerns were raised that a driver for a "virtual" device like this might have no place in the device tree system. However, I would argue that this very similar to specifying the partitions of a mtd device, which can also done in the device tree. In fact, I believe this is the only way to be able to specify the partitions of such a concat device in the dts file (but I'm happy to be corrected if I'm mistaken). I have made the example in the dt-binding documentation a little bit more expressive in this detail. In this second roll I have also addressed all issues that reviewers have brought up so far, hopefully to their satisfaction. Best Regards Bernhard [1] http://lists.infradead.org/pipermail/linux-mtd/2018-September/083832.html Bernhard Frauendienst (3): mtd: core: add get_mtd_device_by_node dt-bindings: add bindings for mtd-concat devices mtd: mtdconcat: add dt driver for concat devices .../devicetree/bindings/mtd/mtd-concat.txt | 36 +++++ drivers/mtd/Kconfig | 2 + drivers/mtd/Makefile | 3 + drivers/mtd/composite/Kconfig | 12 ++ drivers/mtd/composite/Makefile | 7 + drivers/mtd/composite/virt_concat.c | 128 ++++++++++++++++++ drivers/mtd/mtdcore.c | 38 ++++++ include/linux/mtd/mtd.h | 2 + 8 files changed, 228 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/mtd-concat.txt create mode 100644 drivers/mtd/composite/Kconfig create mode 100644 drivers/mtd/composite/Makefile create mode 100644 drivers/mtd/composite/virt_concat.c -- 2.17.1