From 4a0728a4d30b374d19ef680ea93427a00ac3d2ce Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 19 Jul 2011 22:55:01 +0200 Subject: Add configure option for using new JBT6k74 sysfs codes Signed-off-by: Thomas White --- configure.ac | 7 +++++++ src/glamo-output.c | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 037a98a..441ba64 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,13 @@ AC_ARG_ENABLE(jbt6k74-set-state, AS_HELP_STRING([--disable-jbt6k74-set-state], enabled)]), [JBT6K74_SET_STATE=$enableval], [JBT6K74_SET_STATE=yes]) + +AC_ARG_ENABLE(jbt6k74-new-state-codes, AS_HELP_STRING([--enable-jbt6k74-new-state-codes], + [Whether the driver should use the new jbt6k74 + codes when writing to sysfs (default: + disabled)]), + [JBT6K74_NEW_STATE_CODES=$enableval], [JBT6K74_NEW_STATE_CODES=yes]) + AC_ARG_WITH(jbt6k74-state-path, AS_HELP_STRING([--with-jbt6k74-state-path=PATH], [Path to the jbt6k74 sysfs state file [[default=/sys/bus/spi/devices/spi2.0/state]]]), [JBT6K74_STATE_PATH="$withval"], diff --git a/src/glamo-output.c b/src/glamo-output.c index eea3cb2..974e192 100644 --- a/src/glamo-output.c +++ b/src/glamo-output.c @@ -40,9 +40,14 @@ #include "glamo.h" #ifdef JBT6K74_SET_STATE +#ifdef JBT6K74_NEW_STATE_CODES +static const char jbt6k74_state_vga[] = "vga"; +static const char jbt6k74_state_qvga[] = "qvga"; +#else /* JBT6K74_NEW_STATE_CODES */ static const char jbt6k74_state_vga[] = "normal"; static const char jbt6k74_state_qvga[] = "qvga-normal"; -#endif +#endif /* JBT6K74_NEW_STATE_CODES */ +#endif /* JBT6K74_SET_STATE */ typedef struct _GlamoOutput { DisplayModePtr modes; -- cgit v1.2.3