From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Welling Subject: Re: [PATCH 1/6] gpio: make the gpiochip a real device Date: Thu, 3 Dec 2015 15:26:04 -0600 Message-ID: <20151203212604.GA10240@qwerty.qwertyembedded> References: <1445502750-22672-1-git-send-email-linus.walleij@linaro.org> <1445502750-22672-2-git-send-email-linus.walleij@linaro.org> <20151102103116.GE8676@localhost> <20151105094411.GD7561@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pa0-f42.google.com ([209.85.220.42]:34191 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950AbbLCV0a (ORCPT ); Thu, 3 Dec 2015 16:26:30 -0500 Received: by padhx2 with SMTP id hx2so75250777pad.1 for ; Thu, 03 Dec 2015 13:26:30 -0800 (PST) Content-Disposition: inline In-Reply-To: Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Linus Walleij Cc: Johan Hovold , "linux-gpio@vger.kernel.org" , Alexandre Courbot , Arnd Bergmann , Markus Pargmann , Mark Brown , Amit Kucheria On Thu, Dec 03, 2015 at 03:06:48PM +0100, Linus Walleij wrote: > On Thu, Dec 3, 2015 at 3:04 PM, Linus Walleij wrote: > > > 3-1. Split gpio_chip in a static descriptor with a vtable for callbacks > > and other static config called struct gpio_chip, and > > struct gpio_device that is returned as a pointer from > > gpiochip_add(). It will need to be free:ed by gpiodevice_remove() > > after that. > > This will look something like this uglyhack: > https://git.kernel.org/cgit/linux/kernel/git/linusw/linux-gpio.git/commit/?h=gpiochip-desc&id=610b19c1832acfdf6ff62523addfa08b76f77343 > Lots of red and green just in time for Christmas. Let me take a look at what it would take to recover from said theoretical stab. > Yours, > Linus Walleij