From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Hesselbarth Subject: Re: [PATCH v3 3/7] OF: DT-Overlay configfs interface Date: Fri, 21 Mar 2014 14:56:37 +0100 Message-ID: <532C4515.3040500@gmail.com> References: <1395179766-31575-1-git-send-email-pantelis.antoniou@konsulko.com> <1395179766-31575-4-git-send-email-pantelis.antoniou@konsulko.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Rob Herring , Pantelis Antoniou Cc: Grant Likely , Stephen Warren , Matt Porter , Koen Kooi , Alison Chaiken , Dinh Nguyen , Jan Lubbe , Alexander Sverdlin , Michael Stickel , Guenter Roeck , Dirk Behme , Alan Tull , Sascha Hauer , Michael Bohan , Ionut Nicu , Michal Simek , Matt Ranostay , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Pete Popov , Dan Malek , Georgi Vlaev List-Id: devicetree@vger.kernel.org On 03/21/2014 02:39 PM, Rob Herring wrote: > On Tue, Mar 18, 2014 at 4:56 PM, Pantelis Antoniou > 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, >> +}; -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html