diff options
| -rw-r--r-- | drivers/staging/panel/panel.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index 79ac19246548..70b8f4fabfad 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c | |||
| @@ -825,8 +825,7 @@ static void lcd_write_cmd_s(int cmd) | |||
| 825 | lcd_send_serial(0x1F); /* R/W=W, RS=0 */ | 825 | lcd_send_serial(0x1F); /* R/W=W, RS=0 */ |
| 826 | lcd_send_serial(cmd & 0x0F); | 826 | lcd_send_serial(cmd & 0x0F); |
| 827 | lcd_send_serial((cmd >> 4) & 0x0F); | 827 | lcd_send_serial((cmd >> 4) & 0x0F); |
| 828 | /* the shortest command takes at least 40 us */ | 828 | udelay(40); /* the shortest command takes at least 40 us */ |
| 829 | usleep_range(40, 100); | ||
| 830 | spin_unlock_irq(&pprt_lock); | 829 | spin_unlock_irq(&pprt_lock); |
| 831 | } | 830 | } |
| 832 | 831 | ||
| @@ -837,8 +836,7 @@ static void lcd_write_data_s(int data) | |||
| 837 | lcd_send_serial(0x5F); /* R/W=W, RS=1 */ | 836 | lcd_send_serial(0x5F); /* R/W=W, RS=1 */ |
| 838 | lcd_send_serial(data & 0x0F); | 837 | lcd_send_serial(data & 0x0F); |
| 839 | lcd_send_serial((data >> 4) & 0x0F); | 838 | lcd_send_serial((data >> 4) & 0x0F); |
| 840 | /* the shortest data takes at least 40 us */ | 839 | udelay(40); /* the shortest data takes at least 40 us */ |
| 841 | usleep_range(40, 100); | ||
| 842 | spin_unlock_irq(&pprt_lock); | 840 | spin_unlock_irq(&pprt_lock); |
| 843 | } | 841 | } |
| 844 | 842 | ||
| @@ -848,20 +846,19 @@ static void lcd_write_cmd_p8(int cmd) | |||
| 848 | spin_lock_irq(&pprt_lock); | 846 | spin_lock_irq(&pprt_lock); |
| 849 | /* present the data to the data port */ | 847 | /* present the data to the data port */ |
| 850 | w_dtr(pprt, cmd); | 848 | w_dtr(pprt, cmd); |
| 851 | /* maintain the data during 20 us before the strobe */ | 849 | udelay(20); /* maintain the data during 20 us before the strobe */ |
| 852 | usleep_range(20, 100); | ||
| 853 | 850 | ||
| 854 | bits.e = BIT_SET; | 851 | bits.e = BIT_SET; |
| 855 | bits.rs = BIT_CLR; | 852 | bits.rs = BIT_CLR; |
| 856 | bits.rw = BIT_CLR; | 853 | bits.rw = BIT_CLR; |
| 857 | set_ctrl_bits(); | 854 | set_ctrl_bits(); |
| 858 | 855 | ||
| 859 | usleep_range(40, 100); /* maintain the strobe during 40 us */ | 856 | udelay(40); /* maintain the strobe during 40 us */ |
| 860 | 857 | ||
| 861 | bits.e = BIT_CLR; | 858 | bits.e = BIT_CLR; |
| 862 | set_ctrl_bits(); | 859 | set_ctrl_bits(); |
| 863 | 860 | ||
| 864 | usleep_range(120, 500); /* the shortest command takes at least 120 us */ | 861 | udelay(120); /* the shortest command takes at least 120 us */ |
| 865 | spin_unlock_irq(&pprt_lock); | 862 | spin_unlock_irq(&pprt_lock); |
| 866 | } | 863 | } |
| 867 | 864 | ||
| @@ -871,20 +868,19 @@ static void lcd_write_data_p8(int data) | |||
| 871 | spin_lock_irq(&pprt_lock); | 868 | spin_lock_irq(&pprt_lock); |
| 872 | /* present the data to the data port */ | 869 | /* present the data to the data port */ |
| 873 | w_dtr(pprt, data); | 870 | w_dtr(pprt, data); |
| 874 | /* maintain the data during 20 us before the strobe */ | 871 | udelay(20); /* maintain the data during 20 us before the strobe */ |
| 875 | usleep_range(20, 100); | ||
| 876 | 872 | ||
| 877 | bits.e = BIT_SET; | 873 | bits.e = BIT_SET; |
| 878 | bits.rs = BIT_SET; | 874 | bits.rs = BIT_SET; |
| 879 | bits.rw = BIT_CLR; | 875 | bits.rw = BIT_CLR; |
| 880 | set_ctrl_bits(); | 876 | set_ctrl_bits(); |
| 881 | 877 | ||
| 882 | usleep_range(40, 100); /* maintain the strobe during 40 us */ | 878 | udelay(40); /* maintain the strobe during 40 us */ |
| 883 | 879 | ||
| 884 | bits.e = BIT_CLR; | 880 | bits.e = BIT_CLR; |
| 885 | set_ctrl_bits(); | 881 | set_ctrl_bits(); |
| 886 | 882 | ||
| 887 | usleep_range(45, 100); /* the shortest data takes at least 45 us */ | 883 | udelay(45); /* the shortest data takes at least 45 us */ |
| 888 | spin_unlock_irq(&pprt_lock); | 884 | spin_unlock_irq(&pprt_lock); |
| 889 | } | 885 | } |
| 890 | 886 | ||
| @@ -894,7 +890,7 @@ static void lcd_write_cmd_tilcd(int cmd) | |||
| 894 | spin_lock_irq(&pprt_lock); | 890 | spin_lock_irq(&pprt_lock); |
| 895 | /* present the data to the control port */ | 891 | /* present the data to the control port */ |
| 896 | w_ctr(pprt, cmd); | 892 | w_ctr(pprt, cmd); |
| 897 | usleep_range(60, 120); | 893 | udelay(60); |
| 898 | spin_unlock_irq(&pprt_lock); | 894 | spin_unlock_irq(&pprt_lock); |
| 899 | } | 895 | } |
| 900 | 896 | ||
| @@ -904,7 +900,7 @@ static void lcd_write_data_tilcd(int data) | |||
| 904 | spin_lock_irq(&pprt_lock); | 900 | spin_lock_irq(&pprt_lock); |
| 905 | /* present the data to the data port */ | 901 | /* present the data to the data port */ |
| 906 | w_dtr(pprt, data); | 902 | w_dtr(pprt, data); |
| 907 | usleep_range(60, 120); | 903 | udelay(60); |
| 908 | spin_unlock_irq(&pprt_lock); | 904 | spin_unlock_irq(&pprt_lock); |
| 909 | } | 905 | } |
| 910 | 906 | ||
| @@ -947,7 +943,7 @@ static void lcd_clear_fast_s(void) | |||
| 947 | lcd_send_serial(0x5F); /* R/W=W, RS=1 */ | 943 | lcd_send_serial(0x5F); /* R/W=W, RS=1 */ |
| 948 | lcd_send_serial(' ' & 0x0F); | 944 | lcd_send_serial(' ' & 0x0F); |
| 949 | lcd_send_serial((' ' >> 4) & 0x0F); | 945 | lcd_send_serial((' ' >> 4) & 0x0F); |
| 950 | usleep_range(40, 100); /* the shortest data takes at least 40 us */ | 946 | udelay(40); /* the shortest data takes at least 40 us */ |
| 951 | } | 947 | } |
| 952 | spin_unlock_irq(&pprt_lock); | 948 | spin_unlock_irq(&pprt_lock); |
| 953 | 949 | ||
| @@ -971,7 +967,7 @@ static void lcd_clear_fast_p8(void) | |||
| 971 | w_dtr(pprt, ' '); | 967 | w_dtr(pprt, ' '); |
| 972 | 968 | ||
| 973 | /* maintain the data during 20 us before the strobe */ | 969 | /* maintain the data during 20 us before the strobe */ |
| 974 | usleep_range(20, 100); | 970 | udelay(20); |
| 975 | 971 | ||
| 976 | bits.e = BIT_SET; | 972 | bits.e = BIT_SET; |
| 977 | bits.rs = BIT_SET; | 973 | bits.rs = BIT_SET; |
| @@ -979,13 +975,13 @@ static void lcd_clear_fast_p8(void) | |||
| 979 | set_ctrl_bits(); | 975 | set_ctrl_bits(); |
| 980 | 976 | ||
| 981 | /* maintain the strobe during 40 us */ | 977 | /* maintain the strobe during 40 us */ |
| 982 | usleep_range(40, 100); | 978 | udelay(40); |
| 983 | 979 | ||
| 984 | bits.e = BIT_CLR; | 980 | bits.e = BIT_CLR; |
| 985 | set_ctrl_bits(); | 981 | set_ctrl_bits(); |
| 986 | 982 | ||
| 987 | /* the shortest data takes at least 45 us */ | 983 | /* the shortest data takes at least 45 us */ |
| 988 | usleep_range(45, 100); | 984 | udelay(45); |
| 989 | } | 985 | } |
| 990 | spin_unlock_irq(&pprt_lock); | 986 | spin_unlock_irq(&pprt_lock); |
| 991 | 987 | ||
| @@ -1007,7 +1003,7 @@ static void lcd_clear_fast_tilcd(void) | |||
| 1007 | for (pos = 0; pos < lcd.height * lcd.hwidth; pos++) { | 1003 | for (pos = 0; pos < lcd.height * lcd.hwidth; pos++) { |
| 1008 | /* present the data to the data port */ | 1004 | /* present the data to the data port */ |
| 1009 | w_dtr(pprt, ' '); | 1005 | w_dtr(pprt, ' '); |
| 1010 | usleep_range(60, 120); | 1006 | udelay(60); |
| 1011 | } | 1007 | } |
| 1012 | 1008 | ||
| 1013 | spin_unlock_irq(&pprt_lock); | 1009 | spin_unlock_irq(&pprt_lock); |
