Re: [PATCH mmotm] hid-picolcd: depends on LCD_CLASS_DEVICE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 6 Apr 2010 23:04:34 +0200 Bruno Prémont wrote:

> On Tue, 06 April 2010 Randy Dunlap <randy.dunlap@xxxxxxxxxx> wrote:
> > > It triggers the issue by having PicoLCD built-in while one of the
> > > optional dependencies as a module.
> > 
> > Yes, basically what the patch description said.
> 
> Oops, sorry I didn't completely read the patch description.
> 
> > > Any idea of how this can be solved with kbuild in order to keep the
> > > dependencies optional?
> > > 
> > > Something that would satisfy the following pseudocode:
> > >   if CONFIG_HID_PICOLCD == y
> > >     assert(CONFIG_LCD_CLASS_DEVICE != m)
> > > 
> > 
> > If you don't want the kconfig machinery to do that (it appears that you don't),
> > then I guess that you'll need to expand the source code to handle
> > CONFIG_LCD_CLASS_DEVICE=y and CONFIG_LCD_CLASS_DEVICE=m differently.
> > Or only handle them differently if HID_PICOLCD=y.  :(
> 
> Below a patch (against 2.6.34-rc3 + Jiri's picolcd branch) which
> should fix above issue keeping the deps optional.
> 
> With it it's not yet possible to select the deps from HID menu.
> 
> I did a few oldconfig and compile-tests with PICOLCD=y/m and same for
> the deps (not switched FB for those tests).
> 
> Bruno
> 
> 
> 
> 
> 
> HID_PICOLCD should depend on LCD_CLASS_DEVICE, otherwise the
> build fails when HID_PICOLCD=y and LCD_CLASS_DEVICE=m:
> 
> hid-picolcd.c:(.text+0x84523f): undefined reference to `lcd_device_unregister'
> hid-picolcd.c:(.text+0x8478ab): undefined reference to `lcd_device_register'
> hid-picolcd.c:(.text+0x84c15f): undefined reference to `lcd_device_unregister'
> 
> Reported-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
> Signed-off-by: Bruno Prémont <bonbons@xxxxxxxxxxxxxxxxx>
> 
> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> index a2ecd83..39df4f5 100644
> --- a/drivers/hid/Kconfig
> +++ b/drivers/hid/Kconfig
> @@ -285,6 +285,35 @@ config HID_PICOLCD
>  	  Features that are not (yet) supported:
>  	  - IR
>  

All of these user-visible kconfig options need help text also...

> +config HID_PICOLCD_FB
> +	bool "Framebuffer support"
> +	default !EMBEDDED
> +	depends on HID_PICOLCD
> +	depends on HID_PICOLCD=FB || FB=y
> +	select FB_DEFERRED_IO
> +	select FB_SYS_FILLRECT
> +	select FB_SYS_COPYAREA
> +	select FB_SYS_IMAGEBLIT
> +	select FB_SYS_FOPS
> +
> +config HID_PICOLCD_BACKLIGHT
> +	bool "Backlight control"
> +	default !EMBEDDED
> +	depends on HID_PICOLCD
> +	depends on HID_PICOLCD=BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=y
> +
> +config HID_PICOLCD_LCD
> +	bool "Contrast control"
> +	default !EMBEDDED
> +	depends on HID_PICOLCD
> +	depends on HID_PICOLCD=LCD_CLASS_DEVICE || LCD_CLASS_DEVICE=y
> +
> +config HID_PICOLCD_LEDS
> +	bool "GPO via leds class"
> +	default !EMBEDDED
> +	depends on HID_PICOLCD
> +	depends on HID_PICOLCD=LEDS_CLASS || LEDS_CLASS=y
> +
>  config HID_QUANTA
>  	tristate "Quanta Optical Touch"
>  	depends on USB_HID


---
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux