]> git.zerfleddert.de Git - ms2-kexec/blobdiff - hs_cons.c
more non-working serial stuff
[ms2-kexec] / hs_cons.c
index 7983db446a6b430f4adeff52975f92fe415d93a2..9c1f47ddd3e8424e276503a3df2dac5c858e7cb2 100644 (file)
--- a/hs_cons.c
+++ b/hs_cons.c
@@ -34,6 +34,7 @@ static int (*add_preferred_console)(char *, int, char*) = (int (*)(char*, int, c
 void my_omap_serial_init(int wake_gpio_strobe, unsigned int wake_strobe_enable_mask);
 int my_omap_hs_init(void);
 int my_serial_omap_init(void);
+void activate_emu_uart(void);
 
 #define MAPPHONE_BPWAKE_STROBE_GPIO    157
 
@@ -44,9 +45,8 @@ static int __init headphone_cons_init(void)
        if (hs_switch < 0)
                return -EINVAL;
 
-       printk(KERN_INFO "headset_uart_switch: %d\n", hs_switch);
+       printk(KERN_INFO "headset_uart_switch: %d, value: %d\n", hs_switch, gpio_get_value(hs_switch));
 
-       printk(KERN_INFO "value: %d\n", gpio_get_value(hs_switch));
        if (!gpio_get_value(hs_switch))
                return -ENODEV;
 
@@ -58,8 +58,10 @@ static int __init headphone_cons_init(void)
        my_omap_hs_init();
 
        /* route kernel uart out headset jack */
-       gpio_direction_output(hs_switch, 0);
-       printk(KERN_INFO "value: %d\n", gpio_get_value(hs_switch));
+       gpio_set_value(hs_switch, 0);
+       printk(KERN_INFO "headset_uart_switch: %d, value: %d\n", hs_switch, gpio_get_value(hs_switch));
+
+       //activate_emu_uart();
 
        //add_preferred_console("ttyS", 2, "115200");
        return 0;
Impressum, Datenschutz