[PATCH] atmel_lcdfb: fix atmel,lcd-wiring-mode; BGR => BRG
Sascha Hauer
s.hauer at pengutronix.de
Tue Apr 13 10:10:02 BST 2021
From: Sam Ravnborg <sam at ravnborg.org>
Fix spelling error that prevented us from getting
the atmel,lcd-wiring-mode
The Bindings mandate the use of BRG.
Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
---
drivers/video/atmel_lcdfb_core.c | 14 +++++++-------
include/video/atmel_lcdc.h | 4 ++--
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/video/atmel_lcdfb_core.c b/drivers/video/atmel_lcdfb_core.c
index d8c35b2755..daabfe92d2 100644
--- a/drivers/video/atmel_lcdfb_core.c
+++ b/drivers/video/atmel_lcdfb_core.c
@@ -129,7 +129,7 @@ static int atmel_lcdfb_check_var(struct fb_info *info)
= info->bits_per_pixel;
break;
case 16:
- /* Older SOCs use BGR:555 rather than BGR:565. */
+ /* Older SOCs use BRG:555 rather than BRG:565. */
if (sinfo->have_intensity_bit)
info->green.length = 5;
else
@@ -139,7 +139,7 @@ static int atmel_lcdfb_check_var(struct fb_info *info)
info->red.offset = info->green.length + 5;
info->blue.offset = 0;
} else {
- /* BGR:5X5 mode */
+ /* BRG:5X5 mode */
info->red.offset = 0;
info->blue.offset = info->green.length + 5;
}
@@ -156,7 +156,7 @@ static int atmel_lcdfb_check_var(struct fb_info *info)
info->red.offset = 16;
info->blue.offset = 0;
} else {
- /* BGR:888 mode */
+ /* BRG:888 mode */
info->red.offset = 0;
info->blue.offset = 16;
}
@@ -279,7 +279,7 @@ static int power_control_init(struct device_d *dev,
}
/*
- * Syntax: atmel,lcd-wiring-mode: lcd wiring mode "RGB", "BGR"
+ * Syntax: atmel,lcd-wiring-mode: lcd wiring mode "RGB", "BRG"
*/
static int of_get_wiring_mode(struct device_node *np,
struct atmel_lcdfb_info *sinfo)
@@ -290,12 +290,12 @@ static int of_get_wiring_mode(struct device_node *np,
ret = of_property_read_string(np, "atmel,lcd-wiring-mode", &mode);
if (ret < 0) {
/* Not present, use defaults */
- sinfo->lcd_wiring_mode = ATMEL_LCDC_WIRING_BGR;
+ sinfo->lcd_wiring_mode = ATMEL_LCDC_WIRING_BRG;
return 0;
}
- if (!strcasecmp(mode, "BGR")) {
- sinfo->lcd_wiring_mode = ATMEL_LCDC_WIRING_BGR;
+ if (!strcasecmp(mode, "BRG")) {
+ sinfo->lcd_wiring_mode = ATMEL_LCDC_WIRING_BRG;
} else if (!strcasecmp(mode, "RGB")) {
sinfo->lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB;
} else {
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h
index 07a30e2e6f..7e3f95873c 100644
--- a/include/video/atmel_lcdc.h
+++ b/include/video/atmel_lcdc.h
@@ -23,10 +23,10 @@
#define __ATMEL_LCDC_H__
/* Way LCD wires are connected to the chip:
- * Some Atmel chips use BGR color mode (instead of standard RGB)
+ * Some Atmel chips use BRG color mode (instead of standard RGB)
* A swapped wiring onboard can bring to RGB mode.
*/
-#define ATMEL_LCDC_WIRING_BGR 0
+#define ATMEL_LCDC_WIRING_BRG 0
#define ATMEL_LCDC_WIRING_RGB 1
#define ATMEL_LCDC_WIRING_RGB555 2
--
2.29.2
More information about the barebox
mailing list