Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754004AbbKCIdw (ORCPT ); Tue, 3 Nov 2015 03:33:52 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:35060 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750754AbbKCIds (ORCPT ); Tue, 3 Nov 2015 03:33:48 -0500 Date: Tue, 3 Nov 2015 08:33:44 +0000 From: Lee Jones To: "Kim, Milo" Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND 00/16] Support TI LMU devices Message-ID: <20151103083344.GA3503@x1> References: <1446441875-1256-1-git-send-email-milo.kim@ti.com> <20151102085924.GP4058@x1> <56385998.5080006@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <56385998.5080006@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2002 Lines: 44 On Tue, 03 Nov 2015, Kim, Milo wrote: > Hi Lee, > > On 11/2/2015 5:59 PM, Lee Jones wrote: > >> drivers/video/backlight/Kconfig | 62 ++ > >>> drivers/video/backlight/Makefile | 7 + > >>> drivers/video/backlight/lm3532_bl.c | 183 +++++ > >>> drivers/video/backlight/lm3631_bl.c | 129 ++++ > >>> drivers/video/backlight/lm3632_bl.c | 125 ++++ > >>> drivers/video/backlight/lm3633_bl.c | 210 ++++++ > >>> drivers/video/backlight/lm3695_bl.c | 91 +++ > >>> drivers/video/backlight/lm3697_bl.c | 187 +++++ > >>> drivers/video/backlight/ti-lmu-backlight.c | 429 ++++++++++++ > >>> drivers/video/backlight/ti-lmu-backlight.h | 152 +++++ > >How different are all of these drivers? > > > >Can you create one driver that supports them all instead? > > > > Thanks for your suggestion. > > 'ti-lmu-backlight' is the common part of lmxxxx_bl drivers. And each > lmxxx_bl has its own operation functions by using ti_lmu_bl_ops. > I've tried to make consolidated driver but it contained too much > device specific code in one file. So I prefer simple drivers > structure - 'common part' and 'device specific operations'. > It would be appreciated if you could introduce better idea. I wish to avoid having to apply the patches to conduct my own analysis of the files, as I am severely restricted on time. Can you tell me how much duplicated code there is between the files? How many lines would be saved by supporting all of the lm* drivers in a single file? -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/