lkml.org 
[lkml]   [2012]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH RFC 02/11 v4] gpio: Add sysfs support to block GPIO API
    From
    On Tue, Oct 16, 2012 at 6:43 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
    > On Tue, Oct 16, 2012 at 02:53:45PM +0200, Roland Stigge wrote:
    >>
    >> Further, current gpio and gpiochip devices are also doing this way:
    >> creating the device and subsequently their attrs, even though there may
    >> be a better way but I'm still wondering how this would be.
    >
    > Then the existing code is broken and should be fixed to use dev_attrs.
    > I guess it's time to audit the tree and find all places that get this
    > wrong...

    The thing is, as I've tried to explain but maybe didn't get across,
    that these devices don't *have* a parent, and are not part of any
    tree.

    They are parentless mock devices, created on-the-fly just to get
    sysfs entries.

    What is needed it to get the device model right in the first
    place.

    Fixing it has been drafted by me and Grant:
    https://blueprints.launchpad.net/linux-linaro/+spec/gpiochip-to-dev

    This is not all-encompassing though :-/

    Yours,
    Linus Walleij


    \
     
     \ /
      Last update: 2012-10-16 19:41    [W:2.638 / U:0.256 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site