diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-07-19 22:55:01 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2011-07-19 22:58:33 +0200 |
commit | 4a0728a4d30b374d19ef680ea93427a00ac3d2ce (patch) | |
tree | 949e3ffe2c4ad01004d930217201e5dbcc3a4796 | |
parent | 797a16b6b053803640cfe94465cddc07fcb045ee (diff) |
Add configure option for using new JBT6k74 sysfs codes
Signed-off-by: Thomas White <taw@bitwiz.org.uk>
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | src/glamo-output.c | 7 |
2 files changed, 13 insertions, 1 deletions
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; |