Lines Matching +full:0 +full:xf100
58 "Call HCI_PANEL_POWER_ON on resume (-1 = auto, 0 = no, 1 = yes");
63 … "Call HCI_HOTKEY_EVENT with value 0x5 for quickstart button support (-1 = auto, 0 = no, 1 = yes");
68 #define TOS1900_FN_SCAN 0x6e
91 #define HCI_SET 0xff00
92 #define HCI_GET 0xfe00
93 #define SCI_OPEN 0xf100
94 #define SCI_CLOSE 0xf200
95 #define SCI_GET 0xf300
96 #define SCI_SET 0xf400
99 #define TOS_SUCCESS 0x0000
100 #define TOS_SUCCESS2 0x0001
101 #define TOS_OPEN_CLOSE_OK 0x0044
102 #define TOS_FAILURE 0x1000
103 #define TOS_NOT_SUPPORTED 0x8000
104 #define TOS_ALREADY_OPEN 0x8100
105 #define TOS_NOT_OPENED 0x8200
106 #define TOS_INPUT_DATA_ERROR 0x8300
107 #define TOS_WRITE_PROTECTED 0x8400
108 #define TOS_NOT_PRESENT 0x8600
109 #define TOS_FIFO_EMPTY 0x8c00
110 #define TOS_DATA_NOT_AVAILABLE 0x8d20
111 #define TOS_NOT_INITIALIZED 0x8d50
112 #define TOS_NOT_INSTALLED 0x8e00
115 #define HCI_PANEL_POWER_ON 0x0002
116 #define HCI_FAN 0x0004
117 #define HCI_TR_BACKLIGHT 0x0005
118 #define HCI_SYSTEM_EVENT 0x0016
119 #define HCI_VIDEO_OUT 0x001c
120 #define HCI_HOTKEY_EVENT 0x001e
121 #define HCI_LCD_BRIGHTNESS 0x002a
122 #define HCI_FAN_RPM 0x0045
123 #define HCI_WIRELESS 0x0056
124 #define HCI_ACCELEROMETER 0x006d
125 #define HCI_COOLING_METHOD 0x007f
126 #define HCI_KBD_ILLUMINATION 0x0095
127 #define HCI_ECO_MODE 0x0097
128 #define HCI_ACCELEROMETER2 0x00a6
129 #define HCI_BATTERY_CHARGE_MODE 0x00ba
130 #define HCI_SYSTEM_INFO 0xc000
131 #define SCI_PANEL_POWER_ON 0x010d
132 #define SCI_ILLUMINATION 0x014e
133 #define SCI_USB_SLEEP_CHARGE 0x0150
134 #define SCI_KBD_ILLUM_STATUS 0x015c
135 #define SCI_USB_SLEEP_MUSIC 0x015e
136 #define SCI_USB_THREE 0x0169
137 #define SCI_TOUCHPAD 0x050e
138 #define SCI_KBD_FUNCTION_KEYS 0x0522
141 #define HCI_ACCEL_MASK 0x7fff
142 #define HCI_ACCEL_DIRECTION_MASK 0x8000
143 #define HCI_HOTKEY_DISABLE 0x0b
144 #define HCI_HOTKEY_ENABLE_QUICKSTART 0x05
145 #define HCI_HOTKEY_ENABLE 0x09
146 #define HCI_HOTKEY_SPECIAL_FUNCTIONS 0x10
150 #define HCI_MISC_SHIFT 0x10
151 #define HCI_SYSTEM_TYPE1 0x10
152 #define HCI_SYSTEM_TYPE2 0x11
153 #define HCI_VIDEO_OUT_LCD 0x1
154 #define HCI_VIDEO_OUT_CRT 0x2
155 #define HCI_VIDEO_OUT_TV 0x4
156 #define SCI_KBD_MODE_MASK 0x1f
157 #define SCI_KBD_MODE_FNZ 0x1
158 #define SCI_KBD_MODE_AUTO 0x2
159 #define SCI_KBD_MODE_ON 0x8
160 #define SCI_KBD_MODE_OFF 0x10
161 #define SCI_KBD_TIME_MAX 0x3c001a
162 #define HCI_WIRELESS_STATUS 0x1
163 #define HCI_WIRELESS_WWAN 0x3
164 #define HCI_WIRELESS_WWAN_STATUS 0x2000
165 #define HCI_WIRELESS_WWAN_POWER 0x4000
166 #define SCI_USB_CHARGE_MODE_MASK 0xff
167 #define SCI_USB_CHARGE_DISABLED 0x00
168 #define SCI_USB_CHARGE_ALTERNATE 0x09
169 #define SCI_USB_CHARGE_TYPICAL 0x11
170 #define SCI_USB_CHARGE_AUTO 0x21
171 #define SCI_USB_CHARGE_BAT_MASK 0x7
172 #define SCI_USB_CHARGE_BAT_LVL_OFF 0x1
173 #define SCI_USB_CHARGE_BAT_LVL_ON 0x4
174 #define SCI_USB_CHARGE_BAT_LVL 0x0200
175 #define SCI_USB_CHARGE_RAPID_DSP 0x0300
239 {"TOS6200", 0},
240 {"TOS6207", 0},
241 {"TOS6208", 0},
242 {"TOS1900", 0},
243 {"", 0},
248 { KE_KEY, 0x9e, { KEY_RFKILL } },
249 { KE_KEY, 0x101, { KEY_MUTE } },
250 { KE_KEY, 0x102, { KEY_ZOOMOUT } },
251 { KE_KEY, 0x103, { KEY_ZOOMIN } },
252 { KE_KEY, 0x10f, { KEY_TAB } },
253 { KE_KEY, 0x12c, { KEY_KBDILLUMTOGGLE } },
254 { KE_KEY, 0x139, { KEY_ZOOMRESET } },
255 { KE_KEY, 0x13b, { KEY_COFFEE } },
256 { KE_KEY, 0x13c, { KEY_BATTERY } },
257 { KE_KEY, 0x13d, { KEY_SLEEP } },
258 { KE_KEY, 0x13e, { KEY_SUSPEND } },
259 { KE_KEY, 0x13f, { KEY_SWITCHVIDEOMODE } },
260 { KE_KEY, 0x140, { KEY_BRIGHTNESSDOWN } },
261 { KE_KEY, 0x141, { KEY_BRIGHTNESSUP } },
262 { KE_KEY, 0x142, { KEY_WLAN } },
263 { KE_KEY, 0x143, { KEY_TOUCHPAD_TOGGLE } },
264 { KE_KEY, 0x17f, { KEY_FN } },
265 { KE_KEY, 0xb05, { KEY_PROG2 } },
266 { KE_KEY, 0xb06, { KEY_WWW } },
267 { KE_KEY, 0xb07, { KEY_MAIL } },
268 { KE_KEY, 0xb30, { KEY_STOP } },
269 { KE_KEY, 0xb31, { KEY_PREVIOUSSONG } },
270 { KE_KEY, 0xb32, { KEY_NEXTSONG } },
271 { KE_KEY, 0xb33, { KEY_PLAYPAUSE } },
272 { KE_KEY, 0xb5a, { KEY_MEDIA } },
273 { KE_IGNORE, 0x0e00, { KEY_RESERVED } }, /* Wake from sleep */
274 { KE_IGNORE, 0x1430, { KEY_RESERVED } }, /* Wake from sleep */
275 { KE_IGNORE, 0x1501, { KEY_RESERVED } }, /* Output changed */
276 { KE_IGNORE, 0x1502, { KEY_RESERVED } }, /* HDMI plugged/unplugged */
277 { KE_IGNORE, 0x1ABE, { KEY_RESERVED } }, /* Protection level set */
278 { KE_IGNORE, 0x1ABF, { KEY_RESERVED } }, /* Protection level off */
279 { KE_END, 0 },
283 { KE_KEY, 0x102, { KEY_ZOOMOUT } },
284 { KE_KEY, 0x103, { KEY_ZOOMIN } },
285 { KE_KEY, 0x12c, { KEY_KBDILLUMTOGGLE } },
286 { KE_KEY, 0x139, { KEY_ZOOMRESET } },
287 { KE_KEY, 0x13c, { KEY_BRIGHTNESSDOWN } },
288 { KE_KEY, 0x13d, { KEY_BRIGHTNESSUP } },
289 { KE_KEY, 0x13e, { KEY_SWITCHVIDEOMODE } },
290 { KE_KEY, 0x13f, { KEY_TOUCHPAD_TOGGLE } },
291 { KE_KEY, 0x157, { KEY_MUTE } },
292 { KE_KEY, 0x158, { KEY_WLAN } },
293 { KE_END, 0 },
314 return (status == AE_OK) ? 0 : -EIO; in write_acpi_int()
332 for (i = 0; i < TCI_WORDS; ++i) { in tci_raw()
344 for (i = 0; i < out_objs->package.count; ++i) in tci_raw()
360 u32 in[TCI_WORDS] = { HCI_SET, reg, in1, 0, 0, 0 }; in hci_write()
364 return ACPI_SUCCESS(status) ? out[0] : TOS_FAILURE; in hci_write()
369 u32 in[TCI_WORDS] = { HCI_GET, reg, 0, 0, 0, 0 }; in hci_read()
378 return out[0]; in hci_read()
387 u32 in[TCI_WORDS] = { SCI_OPEN, 0, 0, 0, 0, 0 }; in sci_open()
393 return 0; in sci_open()
396 if (out[0] == TOS_OPEN_CLOSE_OK) { in sci_open()
398 } else if (out[0] == TOS_ALREADY_OPEN) { in sci_open()
401 } else if (out[0] == TOS_NOT_SUPPORTED) { in sci_open()
404 * implemented and return 0x8000 (Not Supported), failing to in sci_open()
415 } else if (out[0] == TOS_NOT_PRESENT) { in sci_open()
419 return 0; in sci_open()
424 u32 in[TCI_WORDS] = { SCI_CLOSE, 0, 0, 0, 0, 0 }; in sci_close()
433 if (out[0] == TOS_OPEN_CLOSE_OK) in sci_close()
435 else if (out[0] == TOS_NOT_OPENED) in sci_close()
437 else if (out[0] == TOS_NOT_PRESENT) in sci_close()
443 u32 in[TCI_WORDS] = { SCI_GET, reg, 0, 0, 0, 0 }; in sci_read()
452 return out[0]; in sci_read()
457 u32 in[TCI_WORDS] = { SCI_SET, reg, in1, 0, 0, 0 }; in sci_write()
461 return ACPI_SUCCESS(status) ? out[0] : TOS_FAILURE; in sci_write()
467 u32 in[TCI_WORDS] = { SCI_GET, SCI_ILLUMINATION, 0, 0, 0, 0 }; in toshiba_illumination_available()
471 dev->illumination_supported = 0; in toshiba_illumination_available()
483 if (out[0] != TOS_SUCCESS) in toshiba_illumination_available()
502 state = brightness ? 1 : 0; in toshiba_illumination_set()
536 u32 in[TCI_WORDS] = { SCI_GET, SCI_KBD_ILLUM_STATUS, 0, 0, 0, 0 }; in toshiba_kbd_illum_available()
540 dev->kbd_illum_supported = 0; in toshiba_kbd_illum_available()
553 if (out[0] != TOS_SUCCESS) in toshiba_kbd_illum_available()
559 * 0x3c0003, and now the new implementation set this in toshiba_kbd_illum_available()
560 * to 0x3c001a, use this to distinguish between them. in toshiba_kbd_illum_available()
588 return result == TOS_SUCCESS ? 0 : -EIO; in toshiba_kbd_illum_status_set()
605 return result == TOS_SUCCESS ? 0 : -EIO; in toshiba_kbd_illum_status_get()
636 state = brightness ? 1 : 0; in toshiba_kbd_backlight_set()
657 return result == TOS_SUCCESS ? 0 : -EIO; in toshiba_touchpad_set()
674 return result == TOS_SUCCESS ? 0 : -EIO; in toshiba_touchpad_get()
680 u32 in[TCI_WORDS] = { HCI_GET, HCI_ECO_MODE, 0, 0, 0, 0 }; in toshiba_eco_mode_available()
684 dev->eco_supported = 0; in toshiba_eco_mode_available()
692 if (out[0] == TOS_INPUT_DATA_ERROR || out[0] == TOS_NOT_SUPPORTED) { in toshiba_eco_mode_available()
694 * If we receive 0x8300 (Input Data Error), it means that the in toshiba_eco_mode_available()
698 * On some laptops 0x8000 (Not supported) is also returned in in toshiba_eco_mode_available()
712 if (out[0] != TOS_SUCCESS) in toshiba_eco_mode_available()
724 u32 in[TCI_WORDS] = { HCI_GET, HCI_ECO_MODE, 0, 1, 0, 0 }; in toshiba_eco_mode_get_status()
734 if (out[0] != TOS_SUCCESS) in toshiba_eco_mode_get_status()
745 u32 in[TCI_WORDS] = { HCI_SET, HCI_ECO_MODE, 0, 1, 0, 0 }; in toshiba_eco_mode_set_status()
750 in[2] = (brightness) ? 1 : 0; in toshiba_eco_mode_set_status()
759 u32 in[TCI_WORDS] = { HCI_GET, HCI_ACCELEROMETER2, 0, 0, 0, 0 }; in toshiba_accelerometer_available()
763 dev->accelerometer_supported = 0; in toshiba_accelerometer_available()
775 if (out[0] != TOS_SUCCESS) in toshiba_accelerometer_available()
784 u32 in[TCI_WORDS] = { HCI_GET, HCI_ACCELEROMETER, 0, 1, 0, 0 }; in toshiba_accelerometer_get()
795 if (out[0] == TOS_NOT_SUPPORTED) in toshiba_accelerometer_get()
798 if (out[0] != TOS_SUCCESS) in toshiba_accelerometer_get()
804 return 0; in toshiba_accelerometer_get()
810 u32 in[TCI_WORDS] = { SCI_GET, SCI_USB_SLEEP_CHARGE, 0, 0, 0, 0 }; in toshiba_usb_sleep_charge_available()
814 dev->usb_sleep_charge_supported = 0; in toshiba_usb_sleep_charge_available()
826 if (out[0] != TOS_SUCCESS) { in toshiba_usb_sleep_charge_available()
841 if (out[0] != TOS_SUCCESS) in toshiba_usb_sleep_charge_available()
864 return result == TOS_SUCCESS ? 0 : -EIO; in toshiba_usb_sleep_charge_get()
882 return result == TOS_SUCCESS ? 0 : -EIO; in toshiba_usb_sleep_charge_set()
888 u32 in[TCI_WORDS] = { SCI_GET, SCI_USB_SLEEP_CHARGE, 0, 0, 0, 0 }; in toshiba_sleep_functions_status_get()
903 if (out[0] == TOS_NOT_SUPPORTED) in toshiba_sleep_functions_status_get()
906 if (out[0] != TOS_SUCCESS) in toshiba_sleep_functions_status_get()
911 return 0; in toshiba_sleep_functions_status_get()
918 u32 in[TCI_WORDS] = { SCI_SET, SCI_USB_SLEEP_CHARGE, 0, 0, 0, 0 }; in toshiba_sleep_functions_status_set()
934 if (out[0] == TOS_NOT_SUPPORTED) in toshiba_sleep_functions_status_set()
937 return out[0] == TOS_SUCCESS ? 0 : -EIO; in toshiba_sleep_functions_status_set()
943 u32 in[TCI_WORDS] = { SCI_GET, SCI_USB_SLEEP_CHARGE, 0, 0, 0, 0 }; in toshiba_usb_rapid_charge_get()
958 if (out[0] == TOS_NOT_SUPPORTED) in toshiba_usb_rapid_charge_get()
961 if (out[0] != TOS_SUCCESS && out[0] != TOS_SUCCESS2) in toshiba_usb_rapid_charge_get()
966 return 0; in toshiba_usb_rapid_charge_get()
972 u32 in[TCI_WORDS] = { SCI_SET, SCI_USB_SLEEP_CHARGE, 0, 0, 0, 0 }; in toshiba_usb_rapid_charge_set()
988 if (out[0] == TOS_NOT_SUPPORTED) in toshiba_usb_rapid_charge_set()
991 return (out[0] == TOS_SUCCESS || out[0] == TOS_SUCCESS2) ? 0 : -EIO; in toshiba_usb_rapid_charge_set()
1008 return result == TOS_SUCCESS ? 0 : -EIO; in toshiba_usb_sleep_music_get()
1025 return result == TOS_SUCCESS ? 0 : -EIO; in toshiba_usb_sleep_music_set()
1043 return (result == TOS_SUCCESS || result == TOS_SUCCESS2) ? 0 : -EIO; in toshiba_function_keys_get()
1060 return (result == TOS_SUCCESS || result == TOS_SUCCESS2) ? 0 : -EIO; in toshiba_function_keys_set()
1078 return result == TOS_SUCCESS ? 0 : -EIO; in toshiba_panel_power_on_get()
1095 return result == TOS_SUCCESS ? 0 : -EIO; in toshiba_panel_power_on_set()
1113 return (result == TOS_SUCCESS || result == TOS_SUCCESS2) ? 0 : -EIO; in toshiba_usb_three_get()
1130 return (result == TOS_SUCCESS || result == TOS_SUCCESS2) ? 0 : -EIO; in toshiba_usb_three_set()
1137 u32 in[TCI_WORDS] = { HCI_GET, HCI_SYSTEM_INFO, 0x03, 0, 0, 0 }; in toshiba_hotkey_event_type_get()
1147 if (out[0] == TOS_NOT_SUPPORTED) in toshiba_hotkey_event_type_get()
1150 if (out[0] != TOS_SUCCESS) in toshiba_hotkey_event_type_get()
1155 return 0; in toshiba_hotkey_event_type_get()
1161 u32 in[TCI_WORDS] = { HCI_GET, HCI_WIRELESS, 0, 0, 0, 0 }; in toshiba_wireless_status()
1173 if (out[0] == TOS_NOT_SUPPORTED) in toshiba_wireless_status()
1176 if (out[0] != TOS_SUCCESS) in toshiba_wireless_status()
1181 return 0; in toshiba_wireless_status()
1187 u32 in[TCI_WORDS] = { HCI_GET, HCI_WIRELESS, 0, 0, 0, 0 }; in toshiba_wwan_available()
1191 dev->wwan_supported = 0; in toshiba_wwan_available()
1195 * HCI_WIRELESS_WWAN (0x03). in toshiba_wwan_available()
1197 * If supported, out[0] contains TOS_SUCCESS and out[2] contains in toshiba_wwan_available()
1198 * HCI_WIRELESS_WWAN_STATUS (0x2000). in toshiba_wwan_available()
1200 * If not supported, out[0] contains TOS_INPUT_DATA_ERROR (0x8300) in toshiba_wwan_available()
1201 * or TOS_NOT_SUPPORTED (0x8000). in toshiba_wwan_available()
1210 if (out[0] != TOS_SUCCESS) in toshiba_wwan_available()
1218 u32 in[TCI_WORDS] = { HCI_SET, HCI_WIRELESS, state, 0, 0, 0 }; in toshiba_wwan_set()
1229 if (out[0] == TOS_NOT_SUPPORTED) in toshiba_wwan_set()
1232 if (out[0] != TOS_SUCCESS) in toshiba_wwan_set()
1247 if (out[0] == TOS_NOT_SUPPORTED) in toshiba_wwan_set()
1250 return out[0] == TOS_SUCCESS ? 0 : -EIO; in toshiba_wwan_set()
1256 u32 in[TCI_WORDS] = { HCI_GET, HCI_COOLING_METHOD, 0, 0, 0, 0 }; in toshiba_cooling_method_available()
1260 dev->cooling_method_supported = 0; in toshiba_cooling_method_available()
1261 dev->max_cooling_method = 0; in toshiba_cooling_method_available()
1269 if (out[0] != TOS_SUCCESS && out[0] != TOS_SUCCESS2) in toshiba_cooling_method_available()
1286 return (result == TOS_SUCCESS || result == TOS_SUCCESS2) ? 0 : -EIO; in toshiba_cooling_method_get()
1299 return (result == TOS_SUCCESS || result == TOS_SUCCESS2) ? 0 : -EIO; in toshiba_cooling_method_set()
1305 u32 in[TCI_WORDS] = { HCI_GET, HCI_BATTERY_CHARGE_MODE, 0, 0, 0, 0 }; in toshiba_battery_charge_mode_available()
1309 dev->battery_charge_mode_supported = 0; in toshiba_battery_charge_mode_available()
1317 if (out[0] != TOS_SUCCESS && out[0] != TOS_SUCCESS2) in toshiba_battery_charge_mode_available()
1325 u32 in[TCI_WORDS] = { HCI_GET, HCI_BATTERY_CHARGE_MODE, 0, 0, 0, 0x1 }; in toshiba_battery_charge_mode_get()
1334 switch (out[0]) { in toshiba_battery_charge_mode_get()
1338 return 0; in toshiba_battery_charge_mode_get()
1362 return (result == TOS_SUCCESS || result == TOS_SUCCESS2) ? 0 : -EIO; in toshiba_battery_charge_mode_set()
1375 return result == TOS_SUCCESS ? 0 : -EIO; in get_tr_backlight_status()
1387 return result == TOS_SUCCESS ? 0 : -EIO; in set_tr_backlight_status()
1395 int brightness = 0; in __get_lcd_brightness()
1405 return 0; in __get_lcd_brightness()
1438 if (value < 0) { in lcd_proc_show()
1446 return 0; in lcd_proc_show()
1474 return result == TOS_SUCCESS ? 0 : -EIO; in set_lcd_brightness()
1496 cmd[len] = '\0'; in lcd_proc_write()
1500 value < 0 && value > levels) in lcd_proc_write()
1527 return result == TOS_SUCCESS ? 0 : -EIO; in get_video_status()
1539 is_lcd = (value & HCI_VIDEO_OUT_LCD) ? 1 : 0; in video_proc_show()
1540 is_crt = (value & HCI_VIDEO_OUT_CRT) ? 1 : 0; in video_proc_show()
1541 is_tv = (value & HCI_VIDEO_OUT_TV) ? 1 : 0; in video_proc_show()
1547 return 0; in video_proc_show()
1632 return result == TOS_SUCCESS ? 0 : -EIO; in get_fan_status()
1644 return result == TOS_SUCCESS ? 0 : -EIO; in set_fan_status()
1655 seq_printf(m, "running: %d\n", (value > 0)); in fan_proc_show()
1658 return 0; in fan_proc_show()
1677 cmd[len] = '\0'; in fan_proc_write()
1680 value != 0 && value != 1) in fan_proc_write()
1702 u32 in[TCI_WORDS] = { HCI_GET, HCI_FAN_RPM, 0, 1, 0, 0 }; in get_fan_rpm()
1711 if (out[0] == TOS_NOT_SUPPORTED) in get_fan_rpm()
1714 if (out[0] == TOS_SUCCESS) { in get_fan_rpm()
1716 return 0; in get_fan_rpm()
1727 seq_printf(m, "hotkey: 0x%04x\n", dev->last_key_event); in keys_proc_show()
1729 return 0; in keys_proc_show()
1748 cmd[len] = '\0'; in keys_proc_write()
1750 if (sscanf(cmd, " hotkey_ready : %i", &value) == 1 && value == 0) in keys_proc_write()
1751 dev->key_event_valid = 0; in keys_proc_write()
1770 return 0; in version_proc_show()
1834 ret = kstrtoint(buf, 0, &state); in fan_store()
1838 if (state != 0 && state != 1) in fan_store()
1872 ret = kstrtoint(buf, 0, &mode); in kbd_backlight_mode_store()
1898 /* Shift the time to "base time" (0x3c0000 == 60 seconds) */ in kbd_backlight_mode_store()
1920 * changed event (0x92), and thus, the driver will never update in kbd_backlight_mode_store()
1946 if (toshiba_kbd_illum_status_get(toshiba, &time) < 0) in kbd_backlight_mode_show()
1969 return sprintf(buf, "0x%x 0x%x\n", in available_kbd_modes_show()
1972 return sprintf(buf, "0x%x 0x%x 0x%x\n", in available_kbd_modes_show()
1985 ret = kstrtoint(buf, 0, &time); in kbd_backlight_timeout_store()
1991 if (time < 0 || time > 60) in kbd_backlight_timeout_store()
2002 /* Shift the time to "base time" (0x3c0000 == 60 seconds) */ in kbd_backlight_timeout_store()
2027 if (toshiba_kbd_illum_status_get(toshiba, &time) < 0) in kbd_backlight_timeout_show()
2042 /* Set the TouchPad on/off, 0 - Disable | 1 - Enable */ in touchpad_store()
2043 ret = kstrtoint(buf, 0, &state); in touchpad_store()
2046 if (state != 0 && state != 1) in touchpad_store()
2064 if (ret < 0) in touchpad_show()
2079 if (ret < 0) in usb_sleep_charge_show()
2094 ret = kstrtoint(buf, 0, &state); in usb_sleep_charge_store()
2099 * 0 - Disabled in usb_sleep_charge_store()
2104 if (state != 0 && state != 1 && state != 2 && state != 3) in usb_sleep_charge_store()
2109 if (state == 0) in usb_sleep_charge_store()
2137 if (ret < 0) in sleep_functions_on_battery_show()
2140 /* Determine the status: 0x4 - Enabled | 0x1 - Disabled */ in sleep_functions_on_battery_show()
2142 status = (tmp == 0x4) ? 1 : 0; in sleep_functions_on_battery_show()
2159 ret = kstrtoint(buf, 0, &value); in sleep_functions_on_battery_store()
2165 * 0 - Disabled in sleep_functions_on_battery_store()
2168 if (value < 0 || value > 100) in sleep_functions_on_battery_store()
2171 if (value == 0) { in sleep_functions_on_battery_store()
2179 if (ret < 0) in sleep_functions_on_battery_store()
2196 if (ret < 0) in usb_rapid_charge_show()
2210 ret = kstrtoint(buf, 0, &state); in usb_rapid_charge_store()
2213 if (state != 0 && state != 1) in usb_rapid_charge_store()
2232 if (ret < 0) in usb_sleep_music_show()
2246 ret = kstrtoint(buf, 0, &state); in usb_sleep_music_store()
2249 if (state != 0 && state != 1) in usb_sleep_music_store()
2268 if (ret < 0) in kbd_function_keys_show()
2282 ret = kstrtoint(buf, 0, &mode); in kbd_function_keys_store()
2287 * 0 - Normal operation (F{1-12} as usual and hotkeys via FN-F{1-12}) in kbd_function_keys_store()
2290 if (mode != 0 && mode != 1) in kbd_function_keys_store()
2311 if (ret < 0) in panel_power_on_show()
2325 ret = kstrtoint(buf, 0, &state); in panel_power_on_store()
2328 if (state != 0 && state != 1) in panel_power_on_store()
2349 if (ret < 0) in usb_three_show()
2363 ret = kstrtoint(buf, 0, &state); in usb_three_store()
2368 * 0 - Disabled (Acts like a USB 2 port, saving power) in usb_three_store()
2371 if (state != 0 && state != 1) in usb_three_store()
2392 if (ret < 0) in cooling_method_show()
2406 ret = kstrtoint(buf, 0, &state); in cooling_method_store()
2413 * 0 - Maximum Performance in cooling_method_store()
2417 * 0 - Maximum Performance in cooling_method_store()
2421 if (state < 0 || state > toshiba->max_cooling_method) in cooling_method_store()
2483 return exists ? attr->mode : 0; in toshiba_sysfs_is_visible()
2508 0x92, 0); in toshiba_acpi_kbd_bl_work()
2527 if (ret < 0) in toshiba_iio_accel_get_axis()
2602 regs->eax = out[0]; in toshiba_acpi_smm_bridge()
2609 return 0; in toshiba_acpi_smm_bridge()
2651 return 0; in toshiba_acpi_ioctl()
2673 return 0; in toshiba_acpi_wwan_set_block()
2754 return 0; in toshiba_acpi_enable_hotkeys()
2763 if (unlikely(data == 0xe0)) in toshiba_acpi_i8042_filter()
2766 if ((data & 0x7f) == TOS1900_FN_SCAN) { in toshiba_acpi_i8042_filter()
2788 * Returns hotkey scancode, or < 0 on failure.
2808 if (scancode == 0x100) in toshiba_acpi_report_hotkey()
2812 if (scancode & 0x80) in toshiba_acpi_report_hotkey()
2824 if (scancode < 0) { in toshiba_acpi_process_hotkeys()
2826 } else if (scancode != 0) { in toshiba_acpi_process_hotkeys()
2870 return 0; in toshiba_acpi_setup_keyboard()
2875 return 0; in toshiba_acpi_setup_keyboard()
2948 return 0; in toshiba_acpi_setup_keyboard()
2972 if (brightness < 0) in toshiba_acpi_setup_backlight()
2973 return 0; in toshiba_acpi_setup_backlight()
2980 if (dev->tr_backlight_supported && brightness == 0) in toshiba_acpi_setup_backlight()
2985 return 0; in toshiba_acpi_setup_backlight()
2989 return 0; in toshiba_acpi_setup_backlight()
2991 memset(&props, 0, sizeof(props)); in toshiba_acpi_setup_backlight()
2995 /* Adding an extra level and having 0 change to transflective mode */ in toshiba_acpi_setup_backlight()
3012 return 0; in toshiba_acpi_setup_backlight()
3033 if (type == hwmon_fan && channel == 0 && attr == hwmon_fan_input) { in toshiba_acpi_hwmon_read()
3042 return 0; in toshiba_acpi_hwmon_read()
3078 if (status != 0) in charge_control_end_threshold_show()
3107 (value < 90) ? 1 : 0); in charge_control_end_threshold_store()
3108 if (rval < 0) in charge_control_end_threshold_store()
3133 return 0; in toshiba_acpi_battery_add()
3139 return 0; in toshiba_acpi_battery_remove()
3267 #define QUIRK_TURN_ON_PANEL_ON_RESUME BIT(0)
3310 int ret = 0; in toshiba_acpi_add()
3353 dev->hotkey_event_type = 0; in toshiba_acpi_add()
3420 if (ret < 0) { in toshiba_acpi_add()
3475 dev->sysfs_created = 0; in toshiba_acpi_add()
3491 return 0; in toshiba_acpi_add()
3503 case 0x80: /* Hotkeys and some system events */ in toshiba_acpi_notify()
3514 case 0x81: /* Dock events */ in toshiba_acpi_notify()
3515 case 0x82: in toshiba_acpi_notify()
3516 case 0x83: in toshiba_acpi_notify()
3519 case 0x88: /* Thermal events */ in toshiba_acpi_notify()
3522 case 0x8f: /* LID closed */ in toshiba_acpi_notify()
3523 case 0x90: /* LID is closed and Dock has been ejected */ in toshiba_acpi_notify()
3525 case 0x8c: /* SATA power events */ in toshiba_acpi_notify()
3526 case 0x8b: in toshiba_acpi_notify()
3529 case 0x92: /* Keyboard backlight mode changed */ in toshiba_acpi_notify()
3541 case 0x8e: /* Power button pressed */ in toshiba_acpi_notify()
3543 case 0x85: /* Unknown */ in toshiba_acpi_notify()
3544 case 0x8d: /* Unknown */ in toshiba_acpi_notify()
3545 case 0x94: /* Unknown */ in toshiba_acpi_notify()
3546 case 0x95: /* Unknown */ in toshiba_acpi_notify()
3554 event, (event == 0x80) ? in toshiba_acpi_notify()
3555 dev->last_key_event : 0); in toshiba_acpi_notify()
3571 return 0; in toshiba_acpi_suspend()
3591 return 0; in toshiba_acpi_resume()
3613 long quirks = 0; in toshiba_dmi_init()