lkml.org 
[lkml]   [2014]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3 3/7] OF: DT-Overlay configfs interface
    On 03/21/2014 02:39 PM, Rob Herring wrote:
    > On Tue, Mar 18, 2014 at 4:56 PM, Pantelis Antoniou
    > <pantelis.antoniou@konsulko.com> wrote:
    >> Add a runtime interface to using configfs for generic device tree overlay
    >> usage.
    >>
    >> A device-tree configfs entry is created in /config/device-tree/overlays
    >>
    >> To create an overlay you mkdir the directory and then echo the overlay
    >> firmware file to the path property file.
    >>
    >> # mkdir /config/device-tree/overlays/foo
    >> # echo foo.dtbo >/config/device-tree/overlays/foo/path
    [...]
    >> +static ssize_t cfs_overlay_item_status_show(struct cfs_overlay_item *overlay,
    >> + char *page)
    >> +{
    >> + return sprintf(page, "%s\n",
    >> + overlay->applied ? "applied" : "unapplied");
    >> +}
    >
    > This needs to be added to the above mentioned documentation along with
    > any other files.

    It is also terrible to grep for. Maybe just have the file named
    "applied" and use a bool instead?

    Sebastian

    >> +
    >> +CFS_OVERLAY_ITEM_ATTR(path, S_IRUGO | S_IWUSR, \
    >> + cfs_overlay_item_path_show, cfs_overlay_item_path_store);
    >> +CFS_OVERLAY_ITEM_ATTR_RO(status, cfs_overlay_item_status_show);
    >> +
    >> +static struct configfs_attribute *cfs_overlay_attrs[] = {
    >> + &cfs_overlay_item_attr_path.attr,
    >> + &cfs_overlay_item_attr_status.attr,
    >> + NULL,
    >> +};



    \
     
     \ /
      Last update: 2014-03-21 16:01    [W:3.081 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site