mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/4] gpmc: depend on MTD
@ 2015-08-12  8:46 Lucas Stach
  2015-08-12  8:46 ` [PATCH 2/4] video: MTL017: depend on I2C Lucas Stach
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Lucas Stach @ 2015-08-12  8:46 UTC (permalink / raw)
  To: barebox

From: Lucas Stach <dev@lynxeye.de>

Fixes:
drivers/built-in.o: In function `gpmc_probe':
:(.text.gpmc_probe+0x164): undefined reference to `of_get_nand_bus_width'

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 drivers/bus/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index 202df59762e8..61f9064f5d3a 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -4,6 +4,7 @@ config BUS_OMAP_GPMC
 	depends on ARCH_OMAP
 	depends on OFDEVICE
 	depends on OMAP_GPMC
+	depends on MTD
 	bool "TI OMAP/AM33xx GPMC support"
 
 config IMX_WEIM
-- 
2.4.6


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2/4] video: MTL017: depend on I2C
  2015-08-12  8:46 [PATCH 1/4] gpmc: depend on MTD Lucas Stach
@ 2015-08-12  8:46 ` Lucas Stach
  2015-08-19 14:11   ` Sascha Hauer
  2015-08-12  8:46 ` [PATCH 3/4] video: simple-panel: mode support depends on I2C and EDID Lucas Stach
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Lucas Stach @ 2015-08-12  8:46 UTC (permalink / raw)
  To: barebox

This driver uses I2C functions and isn't useful without them.

Fixes:
In function `mtl017_init':
drivers/video/mtl017.c:278: undefined reference to `i2c_bus'

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/video/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index d7f5b0763705..812c540d71a2 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -119,6 +119,7 @@ comment "Video encoder chips"
 config DRIVER_VIDEO_MTL017
 	bool "MTL017 LVDS encoder"
 	select VIDEO_VPL
+	depends on I2C
 	help
 	  The MTL017 is a parallel to lvds video encoder chip found on the
 	  Efika MX Smartbook.
-- 
2.4.6


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 3/4] video: simple-panel: mode support depends on I2C and EDID
  2015-08-12  8:46 [PATCH 1/4] gpmc: depend on MTD Lucas Stach
  2015-08-12  8:46 ` [PATCH 2/4] video: MTL017: depend on I2C Lucas Stach
@ 2015-08-12  8:46 ` Lucas Stach
  2015-08-19 14:12   ` Sascha Hauer
  2015-08-12  8:46 ` [PATCH 4/4] video: backlight: add fallbacks for client functions Lucas Stach
  2015-08-19 14:10 ` [PATCH 1/4] gpmc: depend on MTD Sascha Hauer
  3 siblings, 1 reply; 8+ messages in thread
From: Lucas Stach @ 2015-08-12  8:46 UTC (permalink / raw)
  To: barebox

Reading modes from EDID EEPROMs requires both I2C and EDID support to
be available. As the simple panel driver is also useful without mode
reading support, only built it in if the requirements are met.

Fixes:
In function `simple_panel_get_modes':
simple-panel.c:88: undefined reference to `of_find_i2c_adapter_by_node'
simple-panel.c:91: undefined reference to `edid_read_i2c'
simple-panel.c:95: undefined reference to `edid_to_display_timings'

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/video/simple-panel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/video/simple-panel.c b/drivers/video/simple-panel.c
index dceedc60c31d..3dd760b38538 100644
--- a/drivers/video/simple-panel.c
+++ b/drivers/video/simple-panel.c
@@ -82,7 +82,8 @@ static int simple_panel_get_modes(struct simple_panel *panel, struct display_tim
 {
 	int ret = -ENOENT;
 
-	if (panel->ddc_node) {
+	if (panel->ddc_node && IS_ENABLED(CONFIG_DRIVER_VIDEO_EDID) &&
+	    IS_ENABLED(CONFIG_I2C)) {
 		struct i2c_adapter *i2c;
 
                 i2c = of_find_i2c_adapter_by_node(panel->ddc_node);
-- 
2.4.6


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 4/4] video: backlight: add fallbacks for client functions
  2015-08-12  8:46 [PATCH 1/4] gpmc: depend on MTD Lucas Stach
  2015-08-12  8:46 ` [PATCH 2/4] video: MTL017: depend on I2C Lucas Stach
  2015-08-12  8:46 ` [PATCH 3/4] video: simple-panel: mode support depends on I2C and EDID Lucas Stach
@ 2015-08-12  8:46 ` Lucas Stach
  2015-08-19 14:13   ` Sascha Hauer
  2015-08-19 14:10 ` [PATCH 1/4] gpmc: depend on MTD Sascha Hauer
  3 siblings, 1 reply; 8+ messages in thread
From: Lucas Stach @ 2015-08-12  8:46 UTC (permalink / raw)
  To: barebox

Add empty static inline function fallbacks if backlight support
is not enabled, so that drivers using the backlight don't fail to
build.

Fixes:
In function `simple_panel_ioctl':
undefined reference to `of_backlight_find'
undefined reference to `backlight_set_brightness_default'
undefined reference to `backlight_set_brightness'

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 include/video/backlight.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/include/video/backlight.h b/include/video/backlight.h
index 56e0341ea470..8dc49dc113e3 100644
--- a/include/video/backlight.h
+++ b/include/video/backlight.h
@@ -1,6 +1,7 @@
 #ifndef __VIDEO_BACKLIGHT_H
 #define __VIDEO_BACKLIGHT_H
 
+#ifdef CONFIG_DRIVER_VIDEO_BACKLIGHT
 struct backlight_device {
 	int brightness;
 	int brightness_cur;
@@ -16,5 +17,21 @@ int backlight_set_brightness(struct backlight_device *, int brightness);
 int backlight_set_brightness_default(struct backlight_device *);
 int backlight_register(struct backlight_device *);
 struct backlight_device *of_backlight_find(struct device_node *node);
+#else
+struct backlight_device ;
+
+static inline int
+backlight_set_brightness(struct backlight_device *dev, int brightness)
+{
+	return 0;
+}
+static inline int
+backlight_set_brightness_default(struct backlight_device *dev)
+{
+	return 0;
+}
+static inline struct backlight_device *
+of_backlight_find(struct device_node *node) { return NULL; }
+#endif
 
 #endif /* __VIDEO_BACKLIGHT_H */
-- 
2.4.6


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/4] gpmc: depend on MTD
  2015-08-12  8:46 [PATCH 1/4] gpmc: depend on MTD Lucas Stach
                   ` (2 preceding siblings ...)
  2015-08-12  8:46 ` [PATCH 4/4] video: backlight: add fallbacks for client functions Lucas Stach
@ 2015-08-19 14:10 ` Sascha Hauer
  3 siblings, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2015-08-19 14:10 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Wed, Aug 12, 2015 at 10:46:42AM +0200, Lucas Stach wrote:
> From: Lucas Stach <dev@lynxeye.de>
> 
> Fixes:
> drivers/built-in.o: In function `gpmc_probe':
> :(.text.gpmc_probe+0x164): undefined reference to `of_get_nand_bus_width'
> 
> Signed-off-by: Lucas Stach <dev@lynxeye.de>
> ---
>  drivers/bus/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
> index 202df59762e8..61f9064f5d3a 100644
> --- a/drivers/bus/Kconfig
> +++ b/drivers/bus/Kconfig
> @@ -4,6 +4,7 @@ config BUS_OMAP_GPMC
>  	depends on ARCH_OMAP
>  	depends on OFDEVICE
>  	depends on OMAP_GPMC
> +	depends on MTD

Not a good idea. The GPMC is also used as a general parallel bus for
example to connect external ethernet controllers. This should work
without MTD support. What we could to instead is:


diff --git a/drivers/bus/omap-gpmc.c b/drivers/bus/omap-gpmc.c
index 8ae909a..6b3d49a 100644
--- a/drivers/bus/omap-gpmc.c
+++ b/drivers/bus/omap-gpmc.c
@@ -624,7 +624,7 @@ static int gpmc_probe(struct device_d *dev)
 		if (!child->name)
 			continue;
 
-		if (!strncmp(child->name, "nand", 4))
+		if (IS_ENABLED(CONFIG_MTD) && !strncmp(child->name, "nand", 4))
 			ret = gpmc_probe_nand_child(dev, child);
 		else if (strncmp(child->name, "ethernet", 8) == 0 ||
 				strncmp(child->name, "nor", 3) == 0 ||
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/4] video: MTL017: depend on I2C
  2015-08-12  8:46 ` [PATCH 2/4] video: MTL017: depend on I2C Lucas Stach
@ 2015-08-19 14:11   ` Sascha Hauer
  0 siblings, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2015-08-19 14:11 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Wed, Aug 12, 2015 at 10:46:43AM +0200, Lucas Stach wrote:
> This driver uses I2C functions and isn't useful without them.
> 
> Fixes:
> In function `mtl017_init':
> drivers/video/mtl017.c:278: undefined reference to `i2c_bus'
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/4] video: simple-panel: mode support depends on I2C and EDID
  2015-08-12  8:46 ` [PATCH 3/4] video: simple-panel: mode support depends on I2C and EDID Lucas Stach
@ 2015-08-19 14:12   ` Sascha Hauer
  0 siblings, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2015-08-19 14:12 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Wed, Aug 12, 2015 at 10:46:44AM +0200, Lucas Stach wrote:
> Reading modes from EDID EEPROMs requires both I2C and EDID support to
> be available. As the simple panel driver is also useful without mode
> reading support, only built it in if the requirements are met.
> 
> Fixes:
> In function `simple_panel_get_modes':
> simple-panel.c:88: undefined reference to `of_find_i2c_adapter_by_node'
> simple-panel.c:91: undefined reference to `edid_read_i2c'
> simple-panel.c:95: undefined reference to `edid_to_display_timings'
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/4] video: backlight: add fallbacks for client functions
  2015-08-12  8:46 ` [PATCH 4/4] video: backlight: add fallbacks for client functions Lucas Stach
@ 2015-08-19 14:13   ` Sascha Hauer
  0 siblings, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2015-08-19 14:13 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Wed, Aug 12, 2015 at 10:46:45AM +0200, Lucas Stach wrote:
> Add empty static inline function fallbacks if backlight support
> is not enabled, so that drivers using the backlight don't fail to
> build.
> 
> Fixes:
> In function `simple_panel_ioctl':
> undefined reference to `of_backlight_find'
> undefined reference to `backlight_set_brightness_default'
> undefined reference to `backlight_set_brightness'
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  include/video/backlight.h | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-08-19 14:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-12  8:46 [PATCH 1/4] gpmc: depend on MTD Lucas Stach
2015-08-12  8:46 ` [PATCH 2/4] video: MTL017: depend on I2C Lucas Stach
2015-08-19 14:11   ` Sascha Hauer
2015-08-12  8:46 ` [PATCH 3/4] video: simple-panel: mode support depends on I2C and EDID Lucas Stach
2015-08-19 14:12   ` Sascha Hauer
2015-08-12  8:46 ` [PATCH 4/4] video: backlight: add fallbacks for client functions Lucas Stach
2015-08-19 14:13   ` Sascha Hauer
2015-08-19 14:10 ` [PATCH 1/4] gpmc: depend on MTD Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox