aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/i8042.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/serio/i8042.c')
-rw-r--r--drivers/input/serio/i8042.c41
1 files changed, 31 insertions, 10 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 65a74cfc187b..170f71ee5772 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -885,6 +885,20 @@ static long i8042_panic_blink(long count)
885 885
886#undef DELAY 886#undef DELAY
887 887
888#ifdef CONFIG_X86
889static void i8042_dritek_enable(void)
890{
891 char param = 0x90;
892 int error;
893
894 error = i8042_command(&param, 0x1059);
895 if (error)
896 printk(KERN_WARNING
897 "Failed to enable DRITEK extension: %d\n",
898 error);
899}
900#endif
901
888#ifdef CONFIG_PM 902#ifdef CONFIG_PM
889/* 903/*
890 * Here we try to restore the original BIOS settings. We only want to 904 * Here we try to restore the original BIOS settings. We only want to
@@ -938,10 +952,20 @@ static int i8042_resume(struct platform_device *dev)
938 i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS; 952 i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS;
939 i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT); 953 i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT);
940 if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { 954 if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
941 printk(KERN_ERR "i8042: Can't write CTR to resume\n"); 955 printk(KERN_WARNING "i8042: Can't write CTR to resume, retrying...\n");
942 return -EIO; 956 msleep(50);
957 if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
958 printk(KERN_ERR "i8042: CTR write retry failed\n");
959 return -EIO;
960 }
943 } 961 }
944 962
963
964#ifdef CONFIG_X86
965 if (i8042_dritek)
966 i8042_dritek_enable();
967#endif
968
945 if (i8042_mux_present) { 969 if (i8042_mux_present) {
946 if (i8042_set_mux_mode(1, NULL) || i8042_enable_mux_ports()) 970 if (i8042_set_mux_mode(1, NULL) || i8042_enable_mux_ports())
947 printk(KERN_WARNING 971 printk(KERN_WARNING
@@ -1160,6 +1184,11 @@ static int __devinit i8042_probe(struct platform_device *dev)
1160 if (error) 1184 if (error)
1161 return error; 1185 return error;
1162 1186
1187#ifdef CONFIG_X86
1188 if (i8042_dritek)
1189 i8042_dritek_enable();
1190#endif
1191
1163 if (!i8042_noaux) { 1192 if (!i8042_noaux) {
1164 error = i8042_setup_aux(); 1193 error = i8042_setup_aux();
1165 if (error && error != -ENODEV && error != -EBUSY) 1194 if (error && error != -ENODEV && error != -EBUSY)
@@ -1171,14 +1200,6 @@ static int __devinit i8042_probe(struct platform_device *dev)
1171 if (error) 1200 if (error)
1172 goto out_fail; 1201 goto out_fail;
1173 } 1202 }
1174#ifdef CONFIG_X86
1175 if (i8042_dritek) {
1176 char param = 0x90;
1177 error = i8042_command(&param, 0x1059);
1178 if (error)
1179 goto out_fail;
1180 }
1181#endif
1182/* 1203/*
1183 * Ok, everything is ready, let's register all serio ports 1204 * Ok, everything is ready, let's register all serio ports
1184 */ 1205 */