From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVxzD-0006Vm-AT for barebox@lists.infradead.org; Thu, 21 Jun 2018 11:43:02 +0000 Date: Thu, 21 Jun 2018 13:42:35 +0200 From: Sascha Hauer Message-ID: <20180621114235.cdwsyhsktio7zjun@pengutronix.de> References: <20180619054609.31226-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180619054609.31226-1-andrew.smirnov@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH] video: Port RAVE SP backlight driver from Linux kernel To: Andrey Smirnov Cc: barebox@lists.infradead.org On Mon, Jun 18, 2018 at 10:46:09PM -0700, Andrey Smirnov wrote: > This is a minimal port of a kernel commit 6552d3141064 ("backlight: > Add RAVE SP backlight driver"). All of the changes were kept to a > minimum and limited to impedance matching between Barebox/Linux driver > API. > > Signed-off-by: Andrey Smirnov > --- Applied, thanks Sascha > drivers/video/Kconfig | 7 +++ > drivers/video/Makefile | 2 + > drivers/video/rave-sp-backlight.c | 72 +++++++++++++++++++++++++++++++ > 3 files changed, 81 insertions(+) > create mode 100644 drivers/video/rave-sp-backlight.c > > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig > index 1dcae48f8..79de32cf8 100644 > --- a/drivers/video/Kconfig > +++ b/drivers/video/Kconfig > @@ -124,6 +124,13 @@ config DRIVER_VIDEO_BACKLIGHT_PWM > help > Enable this to get support for backlight devices driven by a PWM. > > +config BACKLIGHT_RAVE_SP > + tristate "RAVE SP Backlight driver" > + depends on RAVE_SP_CORE > + depends on DRIVER_VIDEO_BACKLIGHT > + help > + Support for backlight control on RAVE SP device. > + > comment "Video encoder chips" > > config DRIVER_VIDEO_MTL017 > diff --git a/drivers/video/Makefile b/drivers/video/Makefile > index 081e4463d..01fabe880 100644 > --- a/drivers/video/Makefile > +++ b/drivers/video/Makefile > @@ -23,3 +23,5 @@ obj-$(CONFIG_DRIVER_VIDEO_SIMPLEFB) += simplefb.o > obj-$(CONFIG_DRIVER_VIDEO_IMX_IPUV3) += imx-ipu-v3/ > obj-$(CONFIG_DRIVER_VIDEO_EFI_GOP) += efi_gop.o > obj-$(CONFIG_DRIVER_VIDEO_FB_SSD1307) += ssd1307fb.o > +obj-$(CONFIG_BACKLIGHT_RAVE_SP) += rave-sp-backlight.o > + > diff --git a/drivers/video/rave-sp-backlight.c b/drivers/video/rave-sp-backlight.c > new file mode 100644 > index 000000000..88ec86e73 > --- /dev/null > +++ b/drivers/video/rave-sp-backlight.c > @@ -0,0 +1,72 @@ > +/* > + * LCD Backlight driver for RAVE SP > + * > + * Copyright (C) 2018 Zodiac Inflight Innovations > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation; either version 2 of > + * the License, or (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, see . > + */ > + > +#include > +#include > +#include > +#include