From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH v3 1/3] video: fbdev: omapfb: lcd_ams_delta: use GPIO lookup table Date: Mon, 10 Sep 2018 09:15:13 +0200 Message-ID: References: <20180717231448.14958-1-jmkrzyszt@gmail.com> <20180909225605.16463-1-jmkrzyszt@gmail.com> <20180909225605.16463-2-jmkrzyszt@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <20180909225605.16463-2-jmkrzyszt@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: Janusz Krzysztofik Cc: ext Tony Lindgren , Aaro Koskinen , Boris Brezillon , =?UTF-8?Q?Miqu=C3=A8l_Raynal?= , Richard Weinberger , David Woodhouse , Brian Norris , Mark Vasut , Bartlomiej Zolnierkiewicz , Linux-OMAP , Linux ARM , linux-mtd@lists.infradead.org, linux-fbdev@vger.kernel.org, "open list:DRM PANEL DRIVERS" , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" List-Id: linux-gpio@vger.kernel.org On Mon, Sep 10, 2018 at 12:55 AM Janusz Krzysztofik wrote: > Now as Amstrad Delta board - the only user of this driver - provides > GPIO lookup tables, switch from GPIO numbers to GPIO descriptors and > use the table to locate required GPIO pins. > > Declare static variables for storing GPIO descriptors and replace > gpio_ function calls with their gpiod_ equivalents. Move GPIO lookup > to the driver probe function so device initialization can be deferred > instead of aborted if a GPIO pin is not yet available. > > Pin naming used by the driver should be followed while respective GPIO > lookup table is initialized by a board init code. > > Cc: Bartlomiej Zolnierkiewicz > Signed-off-by: Janusz Krzysztofik Good work as usual: Reviewed-by: Linus Walleij FWIW I think the entire drivers/video/fbdev/omap/* could be pretty easy to migrate to DRM if you compare the simple drivers/gpu/drm/pl111 or drivers/gpu/drm/tve200 drivers. Just inspiration! :) Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Date: Mon, 10 Sep 2018 07:15:13 +0000 Subject: Re: [PATCH v3 1/3] video: fbdev: omapfb: lcd_ams_delta: use GPIO lookup table Message-Id: List-Id: References: <20180717231448.14958-1-jmkrzyszt@gmail.com> <20180909225605.16463-1-jmkrzyszt@gmail.com> <20180909225605.16463-2-jmkrzyszt@gmail.com> In-Reply-To: <20180909225605.16463-2-jmkrzyszt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Janusz Krzysztofik Cc: ext Tony Lindgren , Aaro Koskinen , Boris Brezillon , =?UTF-8?Q?Miqu=C3=A8l_Raynal?= , Richard Weinberger , David Woodhouse , Brian Norris , Mark Vasut , Bartlomiej Zolnierkiewicz , Linux-OMAP , Linux ARM , linux-mtd@lists.infradead.org, linux-fbdev@vger.kernel.org, "open list:DRM PANEL DRIVERS" , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" On Mon, Sep 10, 2018 at 12:55 AM Janusz Krzysztofik wrote: > Now as Amstrad Delta board - the only user of this driver - provides > GPIO lookup tables, switch from GPIO numbers to GPIO descriptors and > use the table to locate required GPIO pins. > > Declare static variables for storing GPIO descriptors and replace > gpio_ function calls with their gpiod_ equivalents. Move GPIO lookup > to the driver probe function so device initialization can be deferred > instead of aborted if a GPIO pin is not yet available. > > Pin naming used by the driver should be followed while respective GPIO > lookup table is initialized by a board init code. > > Cc: Bartlomiej Zolnierkiewicz > Signed-off-by: Janusz Krzysztofik Good work as usual: Reviewed-by: Linus Walleij FWIW I think the entire drivers/video/fbdev/omap/* could be pretty easy to migrate to DRM if you compare the simple drivers/gpu/drm/pl111 or drivers/gpu/drm/tve200 drivers. Just inspiration! :) Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 From: linus.walleij@linaro.org (Linus Walleij) Date: Mon, 10 Sep 2018 09:15:13 +0200 Subject: [PATCH v3 1/3] video: fbdev: omapfb: lcd_ams_delta: use GPIO lookup table In-Reply-To: <20180909225605.16463-2-jmkrzyszt@gmail.com> References: <20180717231448.14958-1-jmkrzyszt@gmail.com> <20180909225605.16463-1-jmkrzyszt@gmail.com> <20180909225605.16463-2-jmkrzyszt@gmail.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Sep 10, 2018 at 12:55 AM Janusz Krzysztofik wrote: > Now as Amstrad Delta board - the only user of this driver - provides > GPIO lookup tables, switch from GPIO numbers to GPIO descriptors and > use the table to locate required GPIO pins. > > Declare static variables for storing GPIO descriptors and replace > gpio_ function calls with their gpiod_ equivalents. Move GPIO lookup > to the driver probe function so device initialization can be deferred > instead of aborted if a GPIO pin is not yet available. > > Pin naming used by the driver should be followed while respective GPIO > lookup table is initialized by a board init code. > > Cc: Bartlomiej Zolnierkiewicz > Signed-off-by: Janusz Krzysztofik Good work as usual: Reviewed-by: Linus Walleij FWIW I think the entire drivers/video/fbdev/omap/* could be pretty easy to migrate to DRM if you compare the simple drivers/gpu/drm/pl111 or drivers/gpu/drm/tve200 drivers. Just inspiration! :) Yours, Linus Walleij