Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753189AbcLSBLK (ORCPT ); Sun, 18 Dec 2016 20:11:10 -0500 Received: from mout.gmx.net ([212.227.15.15]:54191 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752104AbcLSBLH (ORCPT ); Sun, 18 Dec 2016 20:11:07 -0500 From: Heinrich Schuchardt To: Rob Herring , Mark Rutland , Frank Rowand Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Heinrich Schuchardt Subject: [PATCH 0/3] of/overlay: sysfs based ABI for dt overlays Date: Mon, 19 Dec 2016 02:10:32 +0100 Message-Id: <1482109835-9000-1-git-send-email-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.1.4 X-Provags-ID: V03:K0:1dF2Yx4sMkD3ooogJDDM3J/HnzD5MJX+3UgCZSQXz934p7H0A8G BoFcsRpZvd6k/+kkUspnOO+Q7g3n9xIAlSFtkSb2I7+CVvYMONuMvpT/HwNM7VaDwMWAe9b 4TQW/fNgKPcprGfxdrx2uTROY/9a33gBuO5iBvQBLQz3l3ePnRkwvybccnn1GHFFwgNhAzr QzYy6P3m5IJz0zdEAOn+A== X-UI-Out-Filterresults: notjunk:1;V01:K0:SjTgSDd6puY=:ZJ7vgVZlsawORSOSgrJ2TX SVNKAMYBOEVaHMxsfXY4D2QU+W2l0ssOP+ZhAcv7Uj0BZlS5CTQZdsXuM/zVtayYl25iCzNK+ ipkCsidDjeObu+YYwb9NdrhzuSlLe/z6VP1RLh60N4EEbu4lY0+s8d9CtKr6Smlu84AvVr2Dg qs10NWb+1gx8TUDQ65UiQGJyAqnaSZOIr/G5zlDLO+4/4FfKNh8OBtV1GrwF5ilQLymaw6XNv 2YcoFqXDNdS+4rjHoJTj4LOuKcFjkUzJtiEYImJDyQGl29EqPR7VwWaihcFzHMZ74nXx0SIgb aq52u7I3M8oR75wl7NPvdgZ0/Fxe4Ux4SxENaPYIVF8e7HRulRWcm0JwfZPx4iGMWGHJqKGfX upo1NaKQV/SGEe2WkNkbJQ7E9jPVDfXogxFxzdnarFkv05n5BkAhHT3WPPzuyOSko31p1KwRs YONtsbgdNmGKDoDU3qq62xADl/4XZU1VbxvnpjXoGxrWSIEOb8dbrcM0eEwXLtD9t4UnM0oTD ANpO3E7IRl9UBMRQMAru4UGBr46saS8RBiip9QN3cvC0szMGjQyibcBYRp+YbtYIPLcgQ7Jkj +tBST770L7keLhi/5Gnw8fRYDpqU6j+O2Txzr+rqD7DrhfzSygUJcJtJnhaUhULYUcYnyPGS1 D5AMRo0VEIr7QzY2WrNFL3A57hFyjOsoOt3uR/Q6emqNRbvHKwLaycPG9IReZWS3v5z7INdWj fMAG7UVw7czx/BqmYZyN6UL/0Mandmp0h/mF2VX4XdLxj0q0agWYZKHodc8= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1889 Lines: 49 Currently the kernel only supplies an internal API for creating and destroying device tree overlays. For some boards vendor specific kernel modules exist for managing device tree overlays but they have not been upstreamed or upstreaming stalled. https://lkml.org/lkml/2015/6/12/624 https://lkml.org/lkml/2013/1/7/366 This patch series provides a sysfs based ABI for creation and destruction of dt overlays in /sys/firmware/devicetree-overlay. The following files are provided: load: This is a write only file. A string written to it is interpreted as the path to a flattened device tree overlay file. It is used to create and apply the contained overlays. loaded: This is a read only file. It provides the count of loaded overlays as a decimal number. unload: This is a write only file. If a positive number n is wrtten to this file the n most recent overlays are destroyed. If a negative number is written to this file all overlays are destroyed. Signed-off-by: Heinrich Schuchardt Heinrich Schuchardt (3): of/overlay: add API function to count and pop last of/overlay: sysfs based ABI for dt overlays of/overlay: documentation for sysfs ABI .../ABI/testing/sysfs-firmware-devicetree-overlays | 24 +++ Documentation/devicetree/overlay-notes.txt | 7 +- drivers/of/Kconfig | 12 ++ drivers/of/Makefile | 2 + drivers/of/ov_sysfs.c | 212 +++++++++++++++++++++ drivers/of/overlay.c | 50 +++++ include/linux/of.h | 12 ++ 7 files changed, 317 insertions(+), 2 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-firmware-devicetree-overlays create mode 100644 drivers/of/ov_sysfs.c -- 2.11.0