diff options
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r-- | drivers/platform/x86/chromeos_laptop.c | 41 | ||||
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 12 | ||||
-rw-r--r-- | drivers/platform/x86/toshiba_acpi.c | 8 |
4 files changed, 45 insertions, 18 deletions
diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c index 93d66809355a..3e5b4497a1d0 100644 --- a/drivers/platform/x86/chromeos_laptop.c +++ b/drivers/platform/x86/chromeos_laptop.c | |||
@@ -23,6 +23,9 @@ | |||
23 | 23 | ||
24 | #include <linux/dmi.h> | 24 | #include <linux/dmi.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/i2c/atmel_mxt_ts.h> | ||
27 | #include <linux/input.h> | ||
28 | #include <linux/interrupt.h> | ||
26 | #include <linux/module.h> | 29 | #include <linux/module.h> |
27 | 30 | ||
28 | #define ATMEL_TP_I2C_ADDR 0x4b | 31 | #define ATMEL_TP_I2C_ADDR 0x4b |
@@ -67,15 +70,49 @@ static struct i2c_board_info __initdata tsl2563_als_device = { | |||
67 | I2C_BOARD_INFO("tsl2563", TAOS_ALS_I2C_ADDR), | 70 | I2C_BOARD_INFO("tsl2563", TAOS_ALS_I2C_ADDR), |
68 | }; | 71 | }; |
69 | 72 | ||
73 | static struct mxt_platform_data atmel_224s_tp_platform_data = { | ||
74 | .x_line = 18, | ||
75 | .y_line = 12, | ||
76 | .x_size = 102*20, | ||
77 | .y_size = 68*20, | ||
78 | .blen = 0x80, /* Gain setting is in upper 4 bits */ | ||
79 | .threshold = 0x32, | ||
80 | .voltage = 0, /* 3.3V */ | ||
81 | .orient = MXT_VERTICAL_FLIP, | ||
82 | .irqflags = IRQF_TRIGGER_FALLING, | ||
83 | .is_tp = true, | ||
84 | .key_map = { KEY_RESERVED, | ||
85 | KEY_RESERVED, | ||
86 | KEY_RESERVED, | ||
87 | BTN_LEFT }, | ||
88 | .config = NULL, | ||
89 | .config_length = 0, | ||
90 | }; | ||
91 | |||
70 | static struct i2c_board_info __initdata atmel_224s_tp_device = { | 92 | static struct i2c_board_info __initdata atmel_224s_tp_device = { |
71 | I2C_BOARD_INFO("atmel_mxt_tp", ATMEL_TP_I2C_ADDR), | 93 | I2C_BOARD_INFO("atmel_mxt_tp", ATMEL_TP_I2C_ADDR), |
72 | .platform_data = NULL, | 94 | .platform_data = &atmel_224s_tp_platform_data, |
73 | .flags = I2C_CLIENT_WAKE, | 95 | .flags = I2C_CLIENT_WAKE, |
74 | }; | 96 | }; |
75 | 97 | ||
98 | static struct mxt_platform_data atmel_1664s_platform_data = { | ||
99 | .x_line = 32, | ||
100 | .y_line = 50, | ||
101 | .x_size = 1700, | ||
102 | .y_size = 2560, | ||
103 | .blen = 0x89, /* Gain setting is in upper 4 bits */ | ||
104 | .threshold = 0x28, | ||
105 | .voltage = 0, /* 3.3V */ | ||
106 | .orient = MXT_ROTATED_90_COUNTER, | ||
107 | .irqflags = IRQF_TRIGGER_FALLING, | ||
108 | .is_tp = false, | ||
109 | .config = NULL, | ||
110 | .config_length = 0, | ||
111 | }; | ||
112 | |||
76 | static struct i2c_board_info __initdata atmel_1664s_device = { | 113 | static struct i2c_board_info __initdata atmel_1664s_device = { |
77 | I2C_BOARD_INFO("atmel_mxt_ts", ATMEL_TS_I2C_ADDR), | 114 | I2C_BOARD_INFO("atmel_mxt_ts", ATMEL_TS_I2C_ADDR), |
78 | .platform_data = NULL, | 115 | .platform_data = &atmel_1664s_platform_data, |
79 | .flags = I2C_CLIENT_WAKE, | 116 | .flags = I2C_CLIENT_WAKE, |
80 | }; | 117 | }; |
81 | 118 | ||
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 9557414954fa..14d4dced1def 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
@@ -3689,7 +3689,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf, | |||
3689 | } | 3689 | } |
3690 | 3690 | ||
3691 | if (ret > 0) { | 3691 | if (ret > 0) { |
3692 | struct inode *inode = file->f_path.dentry->d_inode; | 3692 | struct inode *inode = file_inode(file); |
3693 | inode->i_atime = current_fs_time(inode->i_sb); | 3693 | inode->i_atime = current_fs_time(inode->i_sb); |
3694 | } | 3694 | } |
3695 | 3695 | ||
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index be9379923a99..edec135b1685 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
@@ -851,7 +851,7 @@ static ssize_t dispatch_proc_write(struct file *file, | |||
851 | const char __user *userbuf, | 851 | const char __user *userbuf, |
852 | size_t count, loff_t *pos) | 852 | size_t count, loff_t *pos) |
853 | { | 853 | { |
854 | struct ibm_struct *ibm = PDE(file->f_path.dentry->d_inode)->data; | 854 | struct ibm_struct *ibm = PDE(file_inode(file))->data; |
855 | char *kernbuf; | 855 | char *kernbuf; |
856 | int ret; | 856 | int ret; |
857 | 857 | ||
@@ -1964,9 +1964,6 @@ struct tp_nvram_state { | |||
1964 | /* kthread for the hotkey poller */ | 1964 | /* kthread for the hotkey poller */ |
1965 | static struct task_struct *tpacpi_hotkey_task; | 1965 | static struct task_struct *tpacpi_hotkey_task; |
1966 | 1966 | ||
1967 | /* Acquired while the poller kthread is running, use to sync start/stop */ | ||
1968 | static struct mutex hotkey_thread_mutex; | ||
1969 | |||
1970 | /* | 1967 | /* |
1971 | * Acquire mutex to write poller control variables as an | 1968 | * Acquire mutex to write poller control variables as an |
1972 | * atomic block. | 1969 | * atomic block. |
@@ -2462,8 +2459,6 @@ static int hotkey_kthread(void *data) | |||
2462 | unsigned int poll_freq; | 2459 | unsigned int poll_freq; |
2463 | bool was_frozen; | 2460 | bool was_frozen; |
2464 | 2461 | ||
2465 | mutex_lock(&hotkey_thread_mutex); | ||
2466 | |||
2467 | if (tpacpi_lifecycle == TPACPI_LIFE_EXITING) | 2462 | if (tpacpi_lifecycle == TPACPI_LIFE_EXITING) |
2468 | goto exit; | 2463 | goto exit; |
2469 | 2464 | ||
@@ -2523,7 +2518,6 @@ static int hotkey_kthread(void *data) | |||
2523 | } | 2518 | } |
2524 | 2519 | ||
2525 | exit: | 2520 | exit: |
2526 | mutex_unlock(&hotkey_thread_mutex); | ||
2527 | return 0; | 2521 | return 0; |
2528 | } | 2522 | } |
2529 | 2523 | ||
@@ -2533,9 +2527,6 @@ static void hotkey_poll_stop_sync(void) | |||
2533 | if (tpacpi_hotkey_task) { | 2527 | if (tpacpi_hotkey_task) { |
2534 | kthread_stop(tpacpi_hotkey_task); | 2528 | kthread_stop(tpacpi_hotkey_task); |
2535 | tpacpi_hotkey_task = NULL; | 2529 | tpacpi_hotkey_task = NULL; |
2536 | mutex_lock(&hotkey_thread_mutex); | ||
2537 | /* at this point, the thread did exit */ | ||
2538 | mutex_unlock(&hotkey_thread_mutex); | ||
2539 | } | 2530 | } |
2540 | } | 2531 | } |
2541 | 2532 | ||
@@ -3234,7 +3225,6 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
3234 | mutex_init(&hotkey_mutex); | 3225 | mutex_init(&hotkey_mutex); |
3235 | 3226 | ||
3236 | #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL | 3227 | #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL |
3237 | mutex_init(&hotkey_thread_mutex); | ||
3238 | mutex_init(&hotkey_thread_data_mutex); | 3228 | mutex_init(&hotkey_thread_data_mutex); |
3239 | #endif | 3229 | #endif |
3240 | 3230 | ||
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 904476b2fa8f..242abac62d8b 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c | |||
@@ -583,7 +583,7 @@ static int set_lcd_status(struct backlight_device *bd) | |||
583 | static ssize_t lcd_proc_write(struct file *file, const char __user *buf, | 583 | static ssize_t lcd_proc_write(struct file *file, const char __user *buf, |
584 | size_t count, loff_t *pos) | 584 | size_t count, loff_t *pos) |
585 | { | 585 | { |
586 | struct toshiba_acpi_dev *dev = PDE(file->f_path.dentry->d_inode)->data; | 586 | struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data; |
587 | char cmd[42]; | 587 | char cmd[42]; |
588 | size_t len; | 588 | size_t len; |
589 | int value; | 589 | int value; |
@@ -650,7 +650,7 @@ static int video_proc_open(struct inode *inode, struct file *file) | |||
650 | static ssize_t video_proc_write(struct file *file, const char __user *buf, | 650 | static ssize_t video_proc_write(struct file *file, const char __user *buf, |
651 | size_t count, loff_t *pos) | 651 | size_t count, loff_t *pos) |
652 | { | 652 | { |
653 | struct toshiba_acpi_dev *dev = PDE(file->f_path.dentry->d_inode)->data; | 653 | struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data; |
654 | char *cmd, *buffer; | 654 | char *cmd, *buffer; |
655 | int ret; | 655 | int ret; |
656 | int value; | 656 | int value; |
@@ -750,7 +750,7 @@ static int fan_proc_open(struct inode *inode, struct file *file) | |||
750 | static ssize_t fan_proc_write(struct file *file, const char __user *buf, | 750 | static ssize_t fan_proc_write(struct file *file, const char __user *buf, |
751 | size_t count, loff_t *pos) | 751 | size_t count, loff_t *pos) |
752 | { | 752 | { |
753 | struct toshiba_acpi_dev *dev = PDE(file->f_path.dentry->d_inode)->data; | 753 | struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data; |
754 | char cmd[42]; | 754 | char cmd[42]; |
755 | size_t len; | 755 | size_t len; |
756 | int value; | 756 | int value; |
@@ -822,7 +822,7 @@ static int keys_proc_open(struct inode *inode, struct file *file) | |||
822 | static ssize_t keys_proc_write(struct file *file, const char __user *buf, | 822 | static ssize_t keys_proc_write(struct file *file, const char __user *buf, |
823 | size_t count, loff_t *pos) | 823 | size_t count, loff_t *pos) |
824 | { | 824 | { |
825 | struct toshiba_acpi_dev *dev = PDE(file->f_path.dentry->d_inode)->data; | 825 | struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data; |
826 | char cmd[42]; | 826 | char cmd[42]; |
827 | size_t len; | 827 | size_t len; |
828 | int value; | 828 | int value; |