diff options
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/compal-laptop.c | 14 | ||||
-rw-r--r-- | drivers/platform/x86/msi-laptop.c | 12 |
2 files changed, 13 insertions, 13 deletions
diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c index c16a27641ced..9b3afb6f0b13 100644 --- a/drivers/platform/x86/compal-laptop.c +++ b/drivers/platform/x86/compal-laptop.c | |||
@@ -200,8 +200,8 @@ static bool extra_features; | |||
200 | * watching the output of address 0x4F (do an ec_transaction writing 0x33 | 200 | * watching the output of address 0x4F (do an ec_transaction writing 0x33 |
201 | * into 0x4F and read a few bytes from the output, like so: | 201 | * into 0x4F and read a few bytes from the output, like so: |
202 | * u8 writeData = 0x33; | 202 | * u8 writeData = 0x33; |
203 | * ec_transaction(0x4F, &writeData, 1, buffer, 32, 0); | 203 | * ec_transaction(0x4F, &writeData, 1, buffer, 32); |
204 | * That address is labelled "fan1 table information" in the service manual. | 204 | * That address is labeled "fan1 table information" in the service manual. |
205 | * It should be clear which value in 'buffer' changes). This seems to be | 205 | * It should be clear which value in 'buffer' changes). This seems to be |
206 | * related to fan speed. It isn't a proper 'realtime' fan speed value | 206 | * related to fan speed. It isn't a proper 'realtime' fan speed value |
207 | * though, because physically stopping or speeding up the fan doesn't | 207 | * though, because physically stopping or speeding up the fan doesn't |
@@ -286,7 +286,7 @@ static int get_backlight_level(void) | |||
286 | static void set_backlight_state(bool on) | 286 | static void set_backlight_state(bool on) |
287 | { | 287 | { |
288 | u8 data = on ? BACKLIGHT_STATE_ON_DATA : BACKLIGHT_STATE_OFF_DATA; | 288 | u8 data = on ? BACKLIGHT_STATE_ON_DATA : BACKLIGHT_STATE_OFF_DATA; |
289 | ec_transaction(BACKLIGHT_STATE_ADDR, &data, 1, NULL, 0, 0); | 289 | ec_transaction(BACKLIGHT_STATE_ADDR, &data, 1, NULL, 0); |
290 | } | 290 | } |
291 | 291 | ||
292 | 292 | ||
@@ -294,24 +294,24 @@ static void set_backlight_state(bool on) | |||
294 | static void pwm_enable_control(void) | 294 | static void pwm_enable_control(void) |
295 | { | 295 | { |
296 | unsigned char writeData = PWM_ENABLE_DATA; | 296 | unsigned char writeData = PWM_ENABLE_DATA; |
297 | ec_transaction(PWM_ENABLE_ADDR, &writeData, 1, NULL, 0, 0); | 297 | ec_transaction(PWM_ENABLE_ADDR, &writeData, 1, NULL, 0); |
298 | } | 298 | } |
299 | 299 | ||
300 | static void pwm_disable_control(void) | 300 | static void pwm_disable_control(void) |
301 | { | 301 | { |
302 | unsigned char writeData = PWM_DISABLE_DATA; | 302 | unsigned char writeData = PWM_DISABLE_DATA; |
303 | ec_transaction(PWM_DISABLE_ADDR, &writeData, 1, NULL, 0, 0); | 303 | ec_transaction(PWM_DISABLE_ADDR, &writeData, 1, NULL, 0); |
304 | } | 304 | } |
305 | 305 | ||
306 | static void set_pwm(int pwm) | 306 | static void set_pwm(int pwm) |
307 | { | 307 | { |
308 | ec_transaction(PWM_ADDRESS, &pwm_lookup_table[pwm], 1, NULL, 0, 0); | 308 | ec_transaction(PWM_ADDRESS, &pwm_lookup_table[pwm], 1, NULL, 0); |
309 | } | 309 | } |
310 | 310 | ||
311 | static int get_fan_rpm(void) | 311 | static int get_fan_rpm(void) |
312 | { | 312 | { |
313 | u8 value, data = FAN_DATA; | 313 | u8 value, data = FAN_DATA; |
314 | ec_transaction(FAN_ADDRESS, &data, 1, &value, 1, 0); | 314 | ec_transaction(FAN_ADDRESS, &data, 1, &value, 1); |
315 | return 100 * (int)value; | 315 | return 100 * (int)value; |
316 | } | 316 | } |
317 | 317 | ||
diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c index 23fb2afda00b..821ad7bc1e26 100644 --- a/drivers/platform/x86/msi-laptop.c +++ b/drivers/platform/x86/msi-laptop.c | |||
@@ -135,7 +135,7 @@ static int set_lcd_level(int level) | |||
135 | buf[1] = (u8) (level*31); | 135 | buf[1] = (u8) (level*31); |
136 | 136 | ||
137 | return ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, buf, sizeof(buf), | 137 | return ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, buf, sizeof(buf), |
138 | NULL, 0, 1); | 138 | NULL, 0); |
139 | } | 139 | } |
140 | 140 | ||
141 | static int get_lcd_level(void) | 141 | static int get_lcd_level(void) |
@@ -144,7 +144,7 @@ static int get_lcd_level(void) | |||
144 | int result; | 144 | int result; |
145 | 145 | ||
146 | result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, &wdata, 1, | 146 | result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, &wdata, 1, |
147 | &rdata, 1, 1); | 147 | &rdata, 1); |
148 | if (result < 0) | 148 | if (result < 0) |
149 | return result; | 149 | return result; |
150 | 150 | ||
@@ -157,7 +157,7 @@ static int get_auto_brightness(void) | |||
157 | int result; | 157 | int result; |
158 | 158 | ||
159 | result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, &wdata, 1, | 159 | result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, &wdata, 1, |
160 | &rdata, 1, 1); | 160 | &rdata, 1); |
161 | if (result < 0) | 161 | if (result < 0) |
162 | return result; | 162 | return result; |
163 | 163 | ||
@@ -172,7 +172,7 @@ static int set_auto_brightness(int enable) | |||
172 | wdata[0] = 4; | 172 | wdata[0] = 4; |
173 | 173 | ||
174 | result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, wdata, 1, | 174 | result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, wdata, 1, |
175 | &rdata, 1, 1); | 175 | &rdata, 1); |
176 | if (result < 0) | 176 | if (result < 0) |
177 | return result; | 177 | return result; |
178 | 178 | ||
@@ -180,7 +180,7 @@ static int set_auto_brightness(int enable) | |||
180 | wdata[1] = (rdata & 0xF7) | (enable ? 8 : 0); | 180 | wdata[1] = (rdata & 0xF7) | (enable ? 8 : 0); |
181 | 181 | ||
182 | return ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, wdata, 2, | 182 | return ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, wdata, 2, |
183 | NULL, 0, 1); | 183 | NULL, 0); |
184 | } | 184 | } |
185 | 185 | ||
186 | static ssize_t set_device_state(const char *buf, size_t count, u8 mask) | 186 | static ssize_t set_device_state(const char *buf, size_t count, u8 mask) |
@@ -217,7 +217,7 @@ static int get_wireless_state(int *wlan, int *bluetooth) | |||
217 | u8 wdata = 0, rdata; | 217 | u8 wdata = 0, rdata; |
218 | int result; | 218 | int result; |
219 | 219 | ||
220 | result = ec_transaction(MSI_EC_COMMAND_WIRELESS, &wdata, 1, &rdata, 1, 1); | 220 | result = ec_transaction(MSI_EC_COMMAND_WIRELESS, &wdata, 1, &rdata, 1); |
221 | if (result < 0) | 221 | if (result < 0) |
222 | return -1; | 222 | return -1; |
223 | 223 | ||