summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-03-12 09:31:29 +0100
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-03-12 14:46:52 +0100
commit32ed6ef133f95f960d19e3f3b30246aebf8ecd36 (patch)
treefb4b491c6e8cb45a216839ab8816f418a6cb10c3 /include
parentvideomode: combine videomode dmt_flags and data_flags (diff)
downloadlinux-32ed6ef133f95f960d19e3f3b30246aebf8ecd36.tar.xz
linux-32ed6ef133f95f960d19e3f3b30246aebf8ecd36.zip
videomode: create enum for videomode's display flags
Instead of having plain defines for the videomode's flags, add an enum for the flags. This makes the flags clearer to use, as the enum tells which values can be used with the flags field. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/video/display_timing.h28
-rw-r--r--include/video/videomode.h2
2 files changed, 18 insertions, 12 deletions
diff --git a/include/video/display_timing.h b/include/video/display_timing.h
index a8a4be5b0af7..b63471d14097 100644
--- a/include/video/display_timing.h
+++ b/include/video/display_timing.h
@@ -12,16 +12,22 @@
#include <linux/bitops.h>
#include <linux/types.h>
-#define DISPLAY_FLAGS_HSYNC_LOW BIT(0)
-#define DISPLAY_FLAGS_HSYNC_HIGH BIT(1)
-#define DISPLAY_FLAGS_VSYNC_LOW BIT(2)
-#define DISPLAY_FLAGS_VSYNC_HIGH BIT(3)
-#define DISPLAY_FLAGS_DE_LOW BIT(4) /* data enable flag */
-#define DISPLAY_FLAGS_DE_HIGH BIT(5)
-#define DISPLAY_FLAGS_PIXDATA_POSEDGE BIT(6) /* drive data on pos. edge */
-#define DISPLAY_FLAGS_PIXDATA_NEGEDGE BIT(7) /* drive data on neg. edge */
-#define DISPLAY_FLAGS_INTERLACED BIT(8)
-#define DISPLAY_FLAGS_DOUBLESCAN BIT(9)
+enum display_flags {
+ DISPLAY_FLAGS_HSYNC_LOW = BIT(0),
+ DISPLAY_FLAGS_HSYNC_HIGH = BIT(1),
+ DISPLAY_FLAGS_VSYNC_LOW = BIT(2),
+ DISPLAY_FLAGS_VSYNC_HIGH = BIT(3),
+
+ /* data enable flag */
+ DISPLAY_FLAGS_DE_LOW = BIT(4),
+ DISPLAY_FLAGS_DE_HIGH = BIT(5),
+ /* drive data on pos. edge */
+ DISPLAY_FLAGS_PIXDATA_POSEDGE = BIT(6),
+ /* drive data on neg. edge */
+ DISPLAY_FLAGS_PIXDATA_NEGEDGE = BIT(7),
+ DISPLAY_FLAGS_INTERLACED = BIT(8),
+ DISPLAY_FLAGS_DOUBLESCAN = BIT(9),
+};
/*
* A single signal can be specified via a range of minimal and maximal values
@@ -69,7 +75,7 @@ struct display_timing {
struct timing_entry vback_porch; /* ver. back porch */
struct timing_entry vsync_len; /* ver. sync len */
- unsigned int flags; /* display flags */
+ enum display_flags flags; /* display flags */
};
/*
diff --git a/include/video/videomode.h b/include/video/videomode.h
index f4ae6edfeb08..8b12e60b6173 100644
--- a/include/video/videomode.h
+++ b/include/video/videomode.h
@@ -29,7 +29,7 @@ struct videomode {
u32 vback_porch;
u32 vsync_len;
- unsigned int flags; /* display flags */
+ enum display_flags flags; /* display flags */
};
/**