Lines Matching refs:dev

320 static acpi_status tci_raw(struct toshiba_acpi_dev *dev,  in tci_raw()  argument
339 status = acpi_evaluate_object(dev->acpi_dev->handle, in tci_raw()
340 (char *)dev->method_hci, &params, in tci_raw()
357 static u32 hci_write(struct toshiba_acpi_dev *dev, u32 reg, u32 in1) in hci_write() argument
361 acpi_status status = tci_raw(dev, in, out); in hci_write()
366 static u32 hci_read(struct toshiba_acpi_dev *dev, u32 reg, u32 *out1) in hci_read() argument
370 acpi_status status = tci_raw(dev, in, out); in hci_read()
384 static int sci_open(struct toshiba_acpi_dev *dev) in sci_open() argument
388 acpi_status status = tci_raw(dev, in, out); in sci_open()
421 static void sci_close(struct toshiba_acpi_dev *dev) in sci_close() argument
425 acpi_status status = tci_raw(dev, in, out); in sci_close()
440 static u32 sci_read(struct toshiba_acpi_dev *dev, u32 reg, u32 *out1) in sci_read() argument
444 acpi_status status = tci_raw(dev, in, out); in sci_read()
454 static u32 sci_write(struct toshiba_acpi_dev *dev, u32 reg, u32 in1) in sci_write() argument
458 acpi_status status = tci_raw(dev, in, out); in sci_write()
464 static void toshiba_illumination_available(struct toshiba_acpi_dev *dev) in toshiba_illumination_available() argument
470 dev->illumination_supported = 0; in toshiba_illumination_available()
472 if (!sci_open(dev)) in toshiba_illumination_available()
475 status = tci_raw(dev, in, out); in toshiba_illumination_available()
476 sci_close(dev); in toshiba_illumination_available()
485 dev->illumination_supported = 1; in toshiba_illumination_available()
491 struct toshiba_acpi_dev *dev = container_of(cdev, in toshiba_illumination_set() local
497 if (!sci_open(dev)) in toshiba_illumination_set()
502 result = sci_write(dev, SCI_ILLUMINATION, state); in toshiba_illumination_set()
503 sci_close(dev); in toshiba_illumination_set()
510 struct toshiba_acpi_dev *dev = container_of(cdev, in toshiba_illumination_get() local
516 if (!sci_open(dev)) in toshiba_illumination_get()
520 result = sci_read(dev, SCI_ILLUMINATION, &state); in toshiba_illumination_get()
521 sci_close(dev); in toshiba_illumination_get()
533 static void toshiba_kbd_illum_available(struct toshiba_acpi_dev *dev) in toshiba_kbd_illum_available() argument
539 dev->kbd_illum_supported = 0; in toshiba_kbd_illum_available()
540 dev->kbd_event_generated = false; in toshiba_kbd_illum_available()
542 if (!sci_open(dev)) in toshiba_kbd_illum_available()
545 status = tci_raw(dev, in, out); in toshiba_kbd_illum_available()
546 sci_close(dev); in toshiba_kbd_illum_available()
562 dev->kbd_type = 2; in toshiba_kbd_illum_available()
564 dev->kbd_type = 1; in toshiba_kbd_illum_available()
566 dev->kbd_mode = out[2] & SCI_KBD_MODE_MASK; in toshiba_kbd_illum_available()
568 dev->kbd_time = out[2] >> HCI_MISC_SHIFT; in toshiba_kbd_illum_available()
570 dev->kbd_illum_supported = 1; in toshiba_kbd_illum_available()
573 static int toshiba_kbd_illum_status_set(struct toshiba_acpi_dev *dev, u32 time) in toshiba_kbd_illum_status_set() argument
577 if (!sci_open(dev)) in toshiba_kbd_illum_status_set()
580 result = sci_write(dev, SCI_KBD_ILLUM_STATUS, time); in toshiba_kbd_illum_status_set()
581 sci_close(dev); in toshiba_kbd_illum_status_set()
590 static int toshiba_kbd_illum_status_get(struct toshiba_acpi_dev *dev, u32 *time) in toshiba_kbd_illum_status_get() argument
594 if (!sci_open(dev)) in toshiba_kbd_illum_status_get()
597 result = sci_read(dev, SCI_KBD_ILLUM_STATUS, time); in toshiba_kbd_illum_status_get()
598 sci_close(dev); in toshiba_kbd_illum_status_get()
609 struct toshiba_acpi_dev *dev = container_of(cdev, in toshiba_kbd_backlight_get() local
615 result = hci_read(dev, HCI_KBD_ILLUMINATION, &state); in toshiba_kbd_backlight_get()
629 struct toshiba_acpi_dev *dev = container_of(cdev, in toshiba_kbd_backlight_set() local
636 result = hci_write(dev, HCI_KBD_ILLUMINATION, state); in toshiba_kbd_backlight_set()
642 static int toshiba_touchpad_set(struct toshiba_acpi_dev *dev, u32 state) in toshiba_touchpad_set() argument
646 if (!sci_open(dev)) in toshiba_touchpad_set()
649 result = sci_write(dev, SCI_TOUCHPAD, state); in toshiba_touchpad_set()
650 sci_close(dev); in toshiba_touchpad_set()
659 static int toshiba_touchpad_get(struct toshiba_acpi_dev *dev, u32 *state) in toshiba_touchpad_get() argument
663 if (!sci_open(dev)) in toshiba_touchpad_get()
666 result = sci_read(dev, SCI_TOUCHPAD, state); in toshiba_touchpad_get()
667 sci_close(dev); in toshiba_touchpad_get()
677 static void toshiba_eco_mode_available(struct toshiba_acpi_dev *dev) in toshiba_eco_mode_available() argument
683 dev->eco_supported = 0; in toshiba_eco_mode_available()
685 status = tci_raw(dev, in, out); in toshiba_eco_mode_available()
705 status = tci_raw(dev, in, out); in toshiba_eco_mode_available()
714 dev->eco_supported = 1; in toshiba_eco_mode_available()
721 struct toshiba_acpi_dev *dev = container_of(cdev, in toshiba_eco_mode_get_status() local
727 status = tci_raw(dev, in, out); in toshiba_eco_mode_get_status()
742 struct toshiba_acpi_dev *dev = container_of(cdev, in toshiba_eco_mode_set_status() local
750 status = tci_raw(dev, in, out); in toshiba_eco_mode_set_status()
756 static void toshiba_accelerometer_available(struct toshiba_acpi_dev *dev) in toshiba_accelerometer_available() argument
762 dev->accelerometer_supported = 0; in toshiba_accelerometer_available()
768 status = tci_raw(dev, in, out); in toshiba_accelerometer_available()
777 dev->accelerometer_supported = 1; in toshiba_accelerometer_available()
780 static int toshiba_accelerometer_get(struct toshiba_acpi_dev *dev, in toshiba_accelerometer_get() argument
788 status = tci_raw(dev, in, out); in toshiba_accelerometer_get()
807 static void toshiba_usb_sleep_charge_available(struct toshiba_acpi_dev *dev) in toshiba_usb_sleep_charge_available() argument
813 dev->usb_sleep_charge_supported = 0; in toshiba_usb_sleep_charge_available()
815 if (!sci_open(dev)) in toshiba_usb_sleep_charge_available()
818 status = tci_raw(dev, in, out); in toshiba_usb_sleep_charge_available()
821 sci_close(dev); in toshiba_usb_sleep_charge_available()
826 sci_close(dev); in toshiba_usb_sleep_charge_available()
830 dev->usbsc_mode_base = out[4]; in toshiba_usb_sleep_charge_available()
833 status = tci_raw(dev, in, out); in toshiba_usb_sleep_charge_available()
834 sci_close(dev); in toshiba_usb_sleep_charge_available()
843 dev->usbsc_bat_level = out[2]; in toshiba_usb_sleep_charge_available()
845 dev->usb_sleep_charge_supported = 1; in toshiba_usb_sleep_charge_available()
848 static int toshiba_usb_sleep_charge_get(struct toshiba_acpi_dev *dev, in toshiba_usb_sleep_charge_get() argument
853 if (!sci_open(dev)) in toshiba_usb_sleep_charge_get()
856 result = sci_read(dev, SCI_USB_SLEEP_CHARGE, mode); in toshiba_usb_sleep_charge_get()
857 sci_close(dev); in toshiba_usb_sleep_charge_get()
866 static int toshiba_usb_sleep_charge_set(struct toshiba_acpi_dev *dev, in toshiba_usb_sleep_charge_set() argument
871 if (!sci_open(dev)) in toshiba_usb_sleep_charge_set()
874 result = sci_write(dev, SCI_USB_SLEEP_CHARGE, mode); in toshiba_usb_sleep_charge_set()
875 sci_close(dev); in toshiba_usb_sleep_charge_set()
884 static int toshiba_sleep_functions_status_get(struct toshiba_acpi_dev *dev, in toshiba_sleep_functions_status_get() argument
891 if (!sci_open(dev)) in toshiba_sleep_functions_status_get()
895 status = tci_raw(dev, in, out); in toshiba_sleep_functions_status_get()
896 sci_close(dev); in toshiba_sleep_functions_status_get()
914 static int toshiba_sleep_functions_status_set(struct toshiba_acpi_dev *dev, in toshiba_sleep_functions_status_set() argument
921 if (!sci_open(dev)) in toshiba_sleep_functions_status_set()
926 status = tci_raw(dev, in, out); in toshiba_sleep_functions_status_set()
927 sci_close(dev); in toshiba_sleep_functions_status_set()
939 static int toshiba_usb_rapid_charge_get(struct toshiba_acpi_dev *dev, in toshiba_usb_rapid_charge_get() argument
946 if (!sci_open(dev)) in toshiba_usb_rapid_charge_get()
950 status = tci_raw(dev, in, out); in toshiba_usb_rapid_charge_get()
951 sci_close(dev); in toshiba_usb_rapid_charge_get()
968 static int toshiba_usb_rapid_charge_set(struct toshiba_acpi_dev *dev, in toshiba_usb_rapid_charge_set() argument
975 if (!sci_open(dev)) in toshiba_usb_rapid_charge_set()
980 status = tci_raw(dev, in, out); in toshiba_usb_rapid_charge_set()
981 sci_close(dev); in toshiba_usb_rapid_charge_set()
993 static int toshiba_usb_sleep_music_get(struct toshiba_acpi_dev *dev, u32 *state) in toshiba_usb_sleep_music_get() argument
997 if (!sci_open(dev)) in toshiba_usb_sleep_music_get()
1000 result = sci_read(dev, SCI_USB_SLEEP_MUSIC, state); in toshiba_usb_sleep_music_get()
1001 sci_close(dev); in toshiba_usb_sleep_music_get()
1010 static int toshiba_usb_sleep_music_set(struct toshiba_acpi_dev *dev, u32 state) in toshiba_usb_sleep_music_set() argument
1014 if (!sci_open(dev)) in toshiba_usb_sleep_music_set()
1017 result = sci_write(dev, SCI_USB_SLEEP_MUSIC, state); in toshiba_usb_sleep_music_set()
1018 sci_close(dev); in toshiba_usb_sleep_music_set()
1028 static int toshiba_function_keys_get(struct toshiba_acpi_dev *dev, u32 *mode) in toshiba_function_keys_get() argument
1032 if (!sci_open(dev)) in toshiba_function_keys_get()
1035 result = sci_read(dev, SCI_KBD_FUNCTION_KEYS, mode); in toshiba_function_keys_get()
1036 sci_close(dev); in toshiba_function_keys_get()
1045 static int toshiba_function_keys_set(struct toshiba_acpi_dev *dev, u32 mode) in toshiba_function_keys_set() argument
1049 if (!sci_open(dev)) in toshiba_function_keys_set()
1052 result = sci_write(dev, SCI_KBD_FUNCTION_KEYS, mode); in toshiba_function_keys_set()
1053 sci_close(dev); in toshiba_function_keys_set()
1063 static int toshiba_panel_power_on_get(struct toshiba_acpi_dev *dev, u32 *state) in toshiba_panel_power_on_get() argument
1067 if (!sci_open(dev)) in toshiba_panel_power_on_get()
1070 result = sci_read(dev, SCI_PANEL_POWER_ON, state); in toshiba_panel_power_on_get()
1071 sci_close(dev); in toshiba_panel_power_on_get()
1080 static int toshiba_panel_power_on_set(struct toshiba_acpi_dev *dev, u32 state) in toshiba_panel_power_on_set() argument
1084 if (!sci_open(dev)) in toshiba_panel_power_on_set()
1087 result = sci_write(dev, SCI_PANEL_POWER_ON, state); in toshiba_panel_power_on_set()
1088 sci_close(dev); in toshiba_panel_power_on_set()
1098 static int toshiba_usb_three_get(struct toshiba_acpi_dev *dev, u32 *state) in toshiba_usb_three_get() argument
1102 if (!sci_open(dev)) in toshiba_usb_three_get()
1105 result = sci_read(dev, SCI_USB_THREE, state); in toshiba_usb_three_get()
1106 sci_close(dev); in toshiba_usb_three_get()
1115 static int toshiba_usb_three_set(struct toshiba_acpi_dev *dev, u32 state) in toshiba_usb_three_set() argument
1119 if (!sci_open(dev)) in toshiba_usb_three_set()
1122 result = sci_write(dev, SCI_USB_THREE, state); in toshiba_usb_three_set()
1123 sci_close(dev); in toshiba_usb_three_set()
1133 static int toshiba_hotkey_event_type_get(struct toshiba_acpi_dev *dev, in toshiba_hotkey_event_type_get() argument
1140 status = tci_raw(dev, in, out); in toshiba_hotkey_event_type_get()
1158 static int toshiba_wireless_status(struct toshiba_acpi_dev *dev) in toshiba_wireless_status() argument
1165 status = tci_raw(dev, in, out); in toshiba_wireless_status()
1178 dev->killswitch = !!(out[2] & HCI_WIRELESS_STATUS); in toshiba_wireless_status()
1184 static void toshiba_wwan_available(struct toshiba_acpi_dev *dev) in toshiba_wwan_available() argument
1190 dev->wwan_supported = 0; in toshiba_wwan_available()
1203 status = tci_raw(dev, in, out); in toshiba_wwan_available()
1212 dev->wwan_supported = (out[2] == HCI_WIRELESS_WWAN_STATUS); in toshiba_wwan_available()
1215 static int toshiba_wwan_set(struct toshiba_acpi_dev *dev, u32 state) in toshiba_wwan_set() argument
1222 status = tci_raw(dev, in, out); in toshiba_wwan_set()
1240 status = tci_raw(dev, in, out); in toshiba_wwan_set()
1253 static void toshiba_cooling_method_available(struct toshiba_acpi_dev *dev) in toshiba_cooling_method_available() argument
1259 dev->cooling_method_supported = 0; in toshiba_cooling_method_available()
1260 dev->max_cooling_method = 0; in toshiba_cooling_method_available()
1262 status = tci_raw(dev, in, out); in toshiba_cooling_method_available()
1271 dev->cooling_method_supported = 1; in toshiba_cooling_method_available()
1272 dev->max_cooling_method = out[3]; in toshiba_cooling_method_available()
1275 static int toshiba_cooling_method_get(struct toshiba_acpi_dev *dev, u32 *state) in toshiba_cooling_method_get() argument
1277 u32 result = hci_read(dev, HCI_COOLING_METHOD, state); in toshiba_cooling_method_get()
1288 static int toshiba_cooling_method_set(struct toshiba_acpi_dev *dev, u32 state) in toshiba_cooling_method_set() argument
1290 u32 result = hci_write(dev, HCI_COOLING_METHOD, state); in toshiba_cooling_method_set()
1302 static void toshiba_battery_charge_mode_available(struct toshiba_acpi_dev *dev) in toshiba_battery_charge_mode_available() argument
1308 dev->battery_charge_mode_supported = 0; in toshiba_battery_charge_mode_available()
1310 status = tci_raw(dev, in, out); in toshiba_battery_charge_mode_available()
1319 dev->battery_charge_mode_supported = 1; in toshiba_battery_charge_mode_available()
1322 static int toshiba_battery_charge_mode_get(struct toshiba_acpi_dev *dev, u32 *state) in toshiba_battery_charge_mode_get() argument
1329 acpi_status status = tci_raw(dev, in, out); in toshiba_battery_charge_mode_get()
1351 static int toshiba_battery_charge_mode_set(struct toshiba_acpi_dev *dev, u32 state) in toshiba_battery_charge_mode_set() argument
1353 u32 result = hci_write(dev, HCI_BATTERY_CHARGE_MODE, state); in toshiba_battery_charge_mode_set()
1365 static int get_tr_backlight_status(struct toshiba_acpi_dev *dev, u32 *status) in get_tr_backlight_status() argument
1367 u32 result = hci_read(dev, HCI_TR_BACKLIGHT, status); in get_tr_backlight_status()
1377 static int set_tr_backlight_status(struct toshiba_acpi_dev *dev, u32 status) in set_tr_backlight_status() argument
1379 u32 result = hci_write(dev, HCI_TR_BACKLIGHT, !status); in set_tr_backlight_status()
1392 static int __get_lcd_brightness(struct toshiba_acpi_dev *dev) in __get_lcd_brightness() argument
1398 if (dev->tr_backlight_supported) { in __get_lcd_brightness()
1399 int ret = get_tr_backlight_status(dev, &value); in __get_lcd_brightness()
1408 result = hci_read(dev, HCI_LCD_BRIGHTNESS, &value); in __get_lcd_brightness()
1421 struct toshiba_acpi_dev *dev = bl_get_data(bd); in get_lcd_brightness() local
1423 return __get_lcd_brightness(dev); in get_lcd_brightness()
1428 struct toshiba_acpi_dev *dev = m->private; in lcd_proc_show() local
1432 if (!dev->backlight_dev) in lcd_proc_show()
1435 levels = dev->backlight_dev->props.max_brightness + 1; in lcd_proc_show()
1436 value = get_lcd_brightness(dev->backlight_dev); in lcd_proc_show()
1453 static int set_lcd_brightness(struct toshiba_acpi_dev *dev, int value) in set_lcd_brightness() argument
1457 if (dev->tr_backlight_supported) { in set_lcd_brightness()
1458 int ret = set_tr_backlight_status(dev, !value); in set_lcd_brightness()
1467 result = hci_write(dev, HCI_LCD_BRIGHTNESS, value); in set_lcd_brightness()
1478 struct toshiba_acpi_dev *dev = bl_get_data(bd); in set_lcd_status() local
1480 return set_lcd_brightness(dev, bd->props.brightness); in set_lcd_status()
1486 struct toshiba_acpi_dev *dev = pde_data(file_inode(file)); in lcd_proc_write() local
1497 levels = dev->backlight_dev->props.max_brightness + 1; in lcd_proc_write()
1502 if (set_lcd_brightness(dev, value)) in lcd_proc_write()
1517 static int get_video_status(struct toshiba_acpi_dev *dev, u32 *status) in get_video_status() argument
1519 u32 result = hci_read(dev, HCI_VIDEO_OUT, status); in get_video_status()
1531 struct toshiba_acpi_dev *dev = m->private; in video_proc_show() local
1535 if (get_video_status(dev, &value)) in video_proc_show()
1557 struct toshiba_acpi_dev *dev = pde_data(file_inode(file)); in video_proc_write() local
1592 ret = get_video_status(dev, &video_out); in video_proc_write()
1622 static int get_fan_status(struct toshiba_acpi_dev *dev, u32 *status) in get_fan_status() argument
1624 u32 result = hci_read(dev, HCI_FAN, status); in get_fan_status()
1634 static int set_fan_status(struct toshiba_acpi_dev *dev, u32 status) in set_fan_status() argument
1636 u32 result = hci_write(dev, HCI_FAN, status); in set_fan_status()
1648 struct toshiba_acpi_dev *dev = m->private; in fan_proc_show() local
1651 if (get_fan_status(dev, &value)) in fan_proc_show()
1655 seq_printf(m, "force_on: %d\n", dev->force_fan); in fan_proc_show()
1668 struct toshiba_acpi_dev *dev = pde_data(file_inode(file)); in fan_proc_write() local
1682 if (set_fan_status(dev, value)) in fan_proc_write()
1685 dev->force_fan = value; in fan_proc_write()
1699 static int get_fan_rpm(struct toshiba_acpi_dev *dev, u32 *rpm) in get_fan_rpm() argument
1703 acpi_status status = tci_raw(dev, in, out); in get_fan_rpm()
1723 struct toshiba_acpi_dev *dev = m->private; in keys_proc_show() local
1725 seq_printf(m, "hotkey_ready: %d\n", dev->key_event_valid); in keys_proc_show()
1726 seq_printf(m, "hotkey: 0x%04x\n", dev->last_key_event); in keys_proc_show()
1739 struct toshiba_acpi_dev *dev = pde_data(file_inode(file)); in keys_proc_write() local
1750 dev->key_event_valid = 0; in keys_proc_write()
1778 static void create_toshiba_proc_entries(struct toshiba_acpi_dev *dev) in create_toshiba_proc_entries() argument
1780 if (dev->backlight_dev) in create_toshiba_proc_entries()
1782 &lcd_proc_ops, dev); in create_toshiba_proc_entries()
1783 if (dev->video_supported) in create_toshiba_proc_entries()
1785 &video_proc_ops, dev); in create_toshiba_proc_entries()
1786 if (dev->fan_supported) in create_toshiba_proc_entries()
1788 &fan_proc_ops, dev); in create_toshiba_proc_entries()
1789 if (dev->hotkey_dev) in create_toshiba_proc_entries()
1791 &keys_proc_ops, dev); in create_toshiba_proc_entries()
1793 version_proc_show, dev); in create_toshiba_proc_entries()
1796 static void remove_toshiba_proc_entries(struct toshiba_acpi_dev *dev) in remove_toshiba_proc_entries() argument
1798 if (dev->backlight_dev) in remove_toshiba_proc_entries()
1800 if (dev->video_supported) in remove_toshiba_proc_entries()
1802 if (dev->fan_supported) in remove_toshiba_proc_entries()
1804 if (dev->hotkey_dev) in remove_toshiba_proc_entries()
1823 static ssize_t version_show(struct device *dev, in version_show() argument
1830 static ssize_t fan_store(struct device *dev, in fan_store() argument
1834 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in fan_store()
1852 static ssize_t fan_show(struct device *dev, in fan_show() argument
1855 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in fan_show()
1867 static ssize_t kbd_backlight_mode_store(struct device *dev, in kbd_backlight_mode_store() argument
1871 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in kbd_backlight_mode_store()
1943 static ssize_t kbd_backlight_mode_show(struct device *dev, in kbd_backlight_mode_show() argument
1947 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in kbd_backlight_mode_show()
1957 static ssize_t kbd_type_show(struct device *dev, in kbd_type_show() argument
1960 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in kbd_type_show()
1966 static ssize_t available_kbd_modes_show(struct device *dev, in available_kbd_modes_show() argument
1970 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in available_kbd_modes_show()
1981 static ssize_t kbd_backlight_timeout_store(struct device *dev, in kbd_backlight_timeout_store() argument
1985 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in kbd_backlight_timeout_store()
2024 static ssize_t kbd_backlight_timeout_show(struct device *dev, in kbd_backlight_timeout_show() argument
2028 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in kbd_backlight_timeout_show()
2038 static ssize_t touchpad_store(struct device *dev, in touchpad_store() argument
2042 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in touchpad_store()
2060 static ssize_t touchpad_show(struct device *dev, in touchpad_show() argument
2063 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in touchpad_show()
2075 static ssize_t usb_sleep_charge_show(struct device *dev, in usb_sleep_charge_show() argument
2078 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in usb_sleep_charge_show()
2089 static ssize_t usb_sleep_charge_store(struct device *dev, in usb_sleep_charge_store() argument
2093 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in usb_sleep_charge_store()
2130 static ssize_t sleep_functions_on_battery_show(struct device *dev, in sleep_functions_on_battery_show() argument
2134 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in sleep_functions_on_battery_show()
2153 static ssize_t sleep_functions_on_battery_store(struct device *dev, in sleep_functions_on_battery_store() argument
2157 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in sleep_functions_on_battery_store()
2192 static ssize_t usb_rapid_charge_show(struct device *dev, in usb_rapid_charge_show() argument
2195 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in usb_rapid_charge_show()
2206 static ssize_t usb_rapid_charge_store(struct device *dev, in usb_rapid_charge_store() argument
2210 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in usb_rapid_charge_store()
2228 static ssize_t usb_sleep_music_show(struct device *dev, in usb_sleep_music_show() argument
2231 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in usb_sleep_music_show()
2242 static ssize_t usb_sleep_music_store(struct device *dev, in usb_sleep_music_store() argument
2246 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in usb_sleep_music_store()
2264 static ssize_t kbd_function_keys_show(struct device *dev, in kbd_function_keys_show() argument
2267 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in kbd_function_keys_show()
2278 static ssize_t kbd_function_keys_store(struct device *dev, in kbd_function_keys_store() argument
2282 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in kbd_function_keys_store()
2307 static ssize_t panel_power_on_show(struct device *dev, in panel_power_on_show() argument
2310 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in panel_power_on_show()
2321 static ssize_t panel_power_on_store(struct device *dev, in panel_power_on_store() argument
2325 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in panel_power_on_store()
2345 static ssize_t usb_three_show(struct device *dev, in usb_three_show() argument
2348 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in usb_three_show()
2359 static ssize_t usb_three_store(struct device *dev, in usb_three_store() argument
2363 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in usb_three_store()
2388 static ssize_t cooling_method_show(struct device *dev, in cooling_method_show() argument
2391 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in cooling_method_show()
2402 static ssize_t cooling_method_store(struct device *dev, in cooling_method_store() argument
2406 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); in cooling_method_store()
2458 struct device *dev = kobj_to_dev(kobj); in toshiba_sysfs_is_visible() local
2459 struct toshiba_acpi_dev *drv = dev_get_drvdata(dev); in toshiba_sysfs_is_visible()
2498 if (sysfs_update_group(&toshiba_acpi->acpi_dev->dev.kobj, in toshiba_acpi_kbd_bl_work()
2511 dev_name(&toshiba_acpi->acpi_dev->dev), in toshiba_acpi_kbd_bl_work()
2669 struct toshiba_acpi_dev *dev = data; in toshiba_acpi_wwan_set_block() local
2672 ret = toshiba_wireless_status(dev); in toshiba_acpi_wwan_set_block()
2676 if (!dev->killswitch) in toshiba_acpi_wwan_set_block()
2679 return toshiba_wwan_set(dev, !blocked); in toshiba_acpi_wwan_set_block()
2684 struct toshiba_acpi_dev *dev = data; in toshiba_acpi_wwan_poll() local
2686 if (toshiba_wireless_status(dev)) in toshiba_acpi_wwan_poll()
2689 rfkill_set_hw_state(dev->wwan_rfk, !dev->killswitch); in toshiba_acpi_wwan_poll()
2697 static int toshiba_acpi_setup_wwan_rfkill(struct toshiba_acpi_dev *dev) in toshiba_acpi_setup_wwan_rfkill() argument
2699 int ret = toshiba_wireless_status(dev); in toshiba_acpi_setup_wwan_rfkill()
2704 dev->wwan_rfk = rfkill_alloc("Toshiba WWAN", in toshiba_acpi_setup_wwan_rfkill()
2705 &dev->acpi_dev->dev, in toshiba_acpi_setup_wwan_rfkill()
2708 dev); in toshiba_acpi_setup_wwan_rfkill()
2709 if (!dev->wwan_rfk) { in toshiba_acpi_setup_wwan_rfkill()
2714 rfkill_set_hw_state(dev->wwan_rfk, !dev->killswitch); in toshiba_acpi_setup_wwan_rfkill()
2716 ret = rfkill_register(dev->wwan_rfk); in toshiba_acpi_setup_wwan_rfkill()
2719 rfkill_destroy(dev->wwan_rfk); in toshiba_acpi_setup_wwan_rfkill()
2728 static int toshiba_acpi_enable_hotkeys(struct toshiba_acpi_dev *dev) in toshiba_acpi_enable_hotkeys() argument
2733 status = acpi_evaluate_object(dev->acpi_dev->handle, in toshiba_acpi_enable_hotkeys()
2745 result = hci_write(dev, HCI_HOTKEY_EVENT, in toshiba_acpi_enable_hotkeys()
2747 else if (dev->kbd_function_keys_supported && dev->special_functions) in toshiba_acpi_enable_hotkeys()
2748 result = hci_write(dev, HCI_HOTKEY_EVENT, in toshiba_acpi_enable_hotkeys()
2751 result = hci_write(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_ENABLE); in toshiba_acpi_enable_hotkeys()
2794 static int toshiba_acpi_query_hotkey(struct toshiba_acpi_dev *dev) in toshiba_acpi_query_hotkey() argument
2799 status = acpi_evaluate_integer(dev->acpi_dev->handle, "INFO", in toshiba_acpi_query_hotkey()
2809 static void toshiba_acpi_report_hotkey(struct toshiba_acpi_dev *dev, in toshiba_acpi_report_hotkey() argument
2819 if (!sparse_keymap_report_event(dev->hotkey_dev, scancode, 1, true)) in toshiba_acpi_report_hotkey()
2823 static void toshiba_acpi_process_hotkeys(struct toshiba_acpi_dev *dev) in toshiba_acpi_process_hotkeys() argument
2825 if (dev->info_supported) { in toshiba_acpi_process_hotkeys()
2826 int scancode = toshiba_acpi_query_hotkey(dev); in toshiba_acpi_process_hotkeys()
2831 toshiba_acpi_report_hotkey(dev, scancode); in toshiba_acpi_process_hotkeys()
2832 dev->key_event_valid = 1; in toshiba_acpi_process_hotkeys()
2833 dev->last_key_event = scancode; in toshiba_acpi_process_hotkeys()
2835 } else if (dev->system_event_supported) { in toshiba_acpi_process_hotkeys()
2841 result = hci_read(dev, HCI_SYSTEM_EVENT, &value); in toshiba_acpi_process_hotkeys()
2844 toshiba_acpi_report_hotkey(dev, (int)value); in toshiba_acpi_process_hotkeys()
2845 dev->key_event_valid = 1; in toshiba_acpi_process_hotkeys()
2846 dev->last_key_event = value; in toshiba_acpi_process_hotkeys()
2854 result = hci_write(dev, HCI_SYSTEM_EVENT, 1); in toshiba_acpi_process_hotkeys()
2866 static int toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev) in toshiba_acpi_setup_keyboard() argument
2882 error = toshiba_acpi_enable_hotkeys(dev); in toshiba_acpi_setup_keyboard()
2886 if (toshiba_hotkey_event_type_get(dev, &dev->hotkey_event_type)) in toshiba_acpi_setup_keyboard()
2889 dev->hotkey_dev = input_allocate_device(); in toshiba_acpi_setup_keyboard()
2890 if (!dev->hotkey_dev) in toshiba_acpi_setup_keyboard()
2893 dev->hotkey_dev->name = "Toshiba input device"; in toshiba_acpi_setup_keyboard()
2894 dev->hotkey_dev->phys = "toshiba_acpi/input0"; in toshiba_acpi_setup_keyboard()
2895 dev->hotkey_dev->id.bustype = BUS_HOST; in toshiba_acpi_setup_keyboard()
2896 dev->hotkey_dev->dev.parent = &dev->acpi_dev->dev; in toshiba_acpi_setup_keyboard()
2898 if (dev->hotkey_event_type == HCI_SYSTEM_TYPE1 || in toshiba_acpi_setup_keyboard()
2899 !dev->kbd_function_keys_supported) in toshiba_acpi_setup_keyboard()
2901 else if (dev->hotkey_event_type == HCI_SYSTEM_TYPE2 || in toshiba_acpi_setup_keyboard()
2902 dev->kbd_function_keys_supported) in toshiba_acpi_setup_keyboard()
2906 dev->hotkey_event_type); in toshiba_acpi_setup_keyboard()
2907 error = sparse_keymap_setup(dev->hotkey_dev, keymap, NULL); in toshiba_acpi_setup_keyboard()
2920 INIT_WORK(&dev->hotkey_work, toshiba_acpi_hotkey_work); in toshiba_acpi_setup_keyboard()
2928 dev->ntfy_supported = 1; in toshiba_acpi_setup_keyboard()
2935 if (acpi_has_method(dev->acpi_dev->handle, "INFO")) in toshiba_acpi_setup_keyboard()
2936 dev->info_supported = 1; in toshiba_acpi_setup_keyboard()
2937 else if (hci_write(dev, HCI_SYSTEM_EVENT, 1) == TOS_SUCCESS) in toshiba_acpi_setup_keyboard()
2938 dev->system_event_supported = 1; in toshiba_acpi_setup_keyboard()
2940 if (!dev->info_supported && !dev->system_event_supported) { in toshiba_acpi_setup_keyboard()
2946 error = input_register_device(dev->hotkey_dev); in toshiba_acpi_setup_keyboard()
2955 if (dev->ntfy_supported) in toshiba_acpi_setup_keyboard()
2958 input_free_device(dev->hotkey_dev); in toshiba_acpi_setup_keyboard()
2959 dev->hotkey_dev = NULL; in toshiba_acpi_setup_keyboard()
2963 static int toshiba_acpi_setup_backlight(struct toshiba_acpi_dev *dev) in toshiba_acpi_setup_backlight() argument
2975 brightness = __get_lcd_brightness(dev); in toshiba_acpi_setup_backlight()
2984 if (dev->tr_backlight_supported && brightness == 0) in toshiba_acpi_setup_backlight()
2986 ret = set_lcd_brightness(dev, brightness); in toshiba_acpi_setup_backlight()
3000 if (dev->tr_backlight_supported) in toshiba_acpi_setup_backlight()
3003 dev->backlight_dev = backlight_device_register("toshiba", in toshiba_acpi_setup_backlight()
3004 &dev->acpi_dev->dev, in toshiba_acpi_setup_backlight()
3005 dev, in toshiba_acpi_setup_backlight()
3008 if (IS_ERR(dev->backlight_dev)) { in toshiba_acpi_setup_backlight()
3009 ret = PTR_ERR(dev->backlight_dev); in toshiba_acpi_setup_backlight()
3011 dev->backlight_dev = NULL; in toshiba_acpi_setup_backlight()
3015 dev->backlight_dev->props.brightness = brightness; in toshiba_acpi_setup_backlight()
3028 static int toshiba_acpi_hwmon_read(struct device *dev, enum hwmon_sensor_types type, in toshiba_acpi_hwmon_read() argument
3091 static ssize_t charge_control_end_threshold_store(struct device *dev, in charge_control_end_threshold_store() argument
3135 if (device_add_groups(&battery->dev, toshiba_acpi_battery_groups)) in toshiba_acpi_battery_add()
3142 device_remove_groups(&battery->dev, toshiba_acpi_battery_groups); in toshiba_acpi_battery_remove()
3152 static void print_supported_features(struct toshiba_acpi_dev *dev) in print_supported_features() argument
3156 if (dev->hotkey_dev) in print_supported_features()
3158 if (dev->backlight_dev) in print_supported_features()
3160 if (dev->video_supported) in print_supported_features()
3162 if (dev->fan_supported) in print_supported_features()
3164 if (dev->fan_rpm_supported) in print_supported_features()
3166 if (dev->tr_backlight_supported) in print_supported_features()
3168 if (dev->illumination_supported) in print_supported_features()
3170 if (dev->kbd_illum_supported) in print_supported_features()
3172 if (dev->touchpad_supported) in print_supported_features()
3174 if (dev->eco_supported) in print_supported_features()
3176 if (dev->accelerometer_supported) in print_supported_features()
3178 if (dev->usb_sleep_charge_supported) in print_supported_features()
3180 if (dev->usb_rapid_charge_supported) in print_supported_features()
3182 if (dev->usb_sleep_music_supported) in print_supported_features()
3184 if (dev->kbd_function_keys_supported) in print_supported_features()
3186 if (dev->panel_power_on_supported) in print_supported_features()
3188 if (dev->usb_three_supported) in print_supported_features()
3190 if (dev->wwan_supported) in print_supported_features()
3192 if (dev->cooling_method_supported) in print_supported_features()
3194 if (dev->battery_charge_mode_supported) in print_supported_features()
3202 struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev); in toshiba_acpi_remove() local
3204 misc_deregister(&dev->miscdev); in toshiba_acpi_remove()
3206 remove_toshiba_proc_entries(dev); in toshiba_acpi_remove()
3209 if (dev->hwmon_device) in toshiba_acpi_remove()
3210 hwmon_device_unregister(dev->hwmon_device); in toshiba_acpi_remove()
3213 if (dev->accelerometer_supported && dev->indio_dev) { in toshiba_acpi_remove()
3214 iio_device_unregister(dev->indio_dev); in toshiba_acpi_remove()
3215 iio_device_free(dev->indio_dev); in toshiba_acpi_remove()
3218 if (dev->sysfs_created) in toshiba_acpi_remove()
3219 sysfs_remove_group(&dev->acpi_dev->dev.kobj, in toshiba_acpi_remove()
3222 if (dev->ntfy_supported) { in toshiba_acpi_remove()
3224 cancel_work_sync(&dev->hotkey_work); in toshiba_acpi_remove()
3227 if (dev->hotkey_dev) in toshiba_acpi_remove()
3228 input_unregister_device(dev->hotkey_dev); in toshiba_acpi_remove()
3230 backlight_device_unregister(dev->backlight_dev); in toshiba_acpi_remove()
3232 led_classdev_unregister(&dev->led_dev); in toshiba_acpi_remove()
3233 led_classdev_unregister(&dev->kbd_led); in toshiba_acpi_remove()
3234 led_classdev_unregister(&dev->eco_led); in toshiba_acpi_remove()
3236 if (dev->wwan_rfk) { in toshiba_acpi_remove()
3237 rfkill_unregister(dev->wwan_rfk); in toshiba_acpi_remove()
3238 rfkill_destroy(dev->wwan_rfk); in toshiba_acpi_remove()
3241 if (dev->battery_charge_mode_supported) in toshiba_acpi_remove()
3247 kfree(dev); in toshiba_acpi_remove()
3311 struct toshiba_acpi_dev *dev; in toshiba_acpi_add() local
3328 dev = kzalloc(sizeof(*dev), GFP_KERNEL); in toshiba_acpi_add()
3329 if (!dev) in toshiba_acpi_add()
3331 dev->acpi_dev = acpi_dev; in toshiba_acpi_add()
3332 dev->method_hci = hci_method; in toshiba_acpi_add()
3333 dev->miscdev.minor = MISC_DYNAMIC_MINOR; in toshiba_acpi_add()
3334 dev->miscdev.name = "toshiba_acpi"; in toshiba_acpi_add()
3335 dev->miscdev.fops = &toshiba_acpi_fops; in toshiba_acpi_add()
3337 ret = misc_register(&dev->miscdev); in toshiba_acpi_add()
3340 kfree(dev); in toshiba_acpi_add()
3344 acpi_dev->driver_data = dev; in toshiba_acpi_add()
3345 dev_set_drvdata(&acpi_dev->dev, dev); in toshiba_acpi_add()
3354 ret = toshiba_function_keys_get(dev, &dev->special_functions); in toshiba_acpi_add()
3355 dev->kbd_function_keys_supported = !ret; in toshiba_acpi_add()
3357 dev->hotkey_event_type = 0; in toshiba_acpi_add()
3358 if (toshiba_acpi_setup_keyboard(dev)) in toshiba_acpi_add()
3362 ret = get_tr_backlight_status(dev, &dummy); in toshiba_acpi_add()
3363 dev->tr_backlight_supported = !ret; in toshiba_acpi_add()
3365 ret = toshiba_acpi_setup_backlight(dev); in toshiba_acpi_add()
3369 toshiba_illumination_available(dev); in toshiba_acpi_add()
3370 if (dev->illumination_supported) { in toshiba_acpi_add()
3371 dev->led_dev.name = "toshiba::illumination"; in toshiba_acpi_add()
3372 dev->led_dev.max_brightness = 1; in toshiba_acpi_add()
3373 dev->led_dev.brightness_set = toshiba_illumination_set; in toshiba_acpi_add()
3374 dev->led_dev.brightness_get = toshiba_illumination_get; in toshiba_acpi_add()
3375 led_classdev_register(&acpi_dev->dev, &dev->led_dev); in toshiba_acpi_add()
3378 toshiba_eco_mode_available(dev); in toshiba_acpi_add()
3379 if (dev->eco_supported) { in toshiba_acpi_add()
3380 dev->eco_led.name = "toshiba::eco_mode"; in toshiba_acpi_add()
3381 dev->eco_led.max_brightness = 1; in toshiba_acpi_add()
3382 dev->eco_led.brightness_set = toshiba_eco_mode_set_status; in toshiba_acpi_add()
3383 dev->eco_led.brightness_get = toshiba_eco_mode_get_status; in toshiba_acpi_add()
3384 led_classdev_register(&dev->acpi_dev->dev, &dev->eco_led); in toshiba_acpi_add()
3387 toshiba_kbd_illum_available(dev); in toshiba_acpi_add()
3393 if (dev->kbd_illum_supported && in toshiba_acpi_add()
3394 (dev->kbd_mode == SCI_KBD_MODE_FNZ || dev->kbd_type == 2)) { in toshiba_acpi_add()
3395 dev->kbd_led.name = "toshiba::kbd_backlight"; in toshiba_acpi_add()
3396 dev->kbd_led.flags = LED_BRIGHT_HW_CHANGED; in toshiba_acpi_add()
3397 dev->kbd_led.max_brightness = 1; in toshiba_acpi_add()
3398 dev->kbd_led.brightness_set = toshiba_kbd_backlight_set; in toshiba_acpi_add()
3399 dev->kbd_led.brightness_get = toshiba_kbd_backlight_get; in toshiba_acpi_add()
3400 led_classdev_register(&dev->acpi_dev->dev, &dev->kbd_led); in toshiba_acpi_add()
3403 ret = toshiba_touchpad_get(dev, &dummy); in toshiba_acpi_add()
3404 dev->touchpad_supported = !ret; in toshiba_acpi_add()
3406 toshiba_accelerometer_available(dev); in toshiba_acpi_add()
3407 if (dev->accelerometer_supported) { in toshiba_acpi_add()
3408 dev->indio_dev = iio_device_alloc(&acpi_dev->dev, sizeof(*dev)); in toshiba_acpi_add()
3409 if (!dev->indio_dev) { in toshiba_acpi_add()
3416 dev->indio_dev->info = &toshiba_iio_accel_info; in toshiba_acpi_add()
3417 dev->indio_dev->name = "Toshiba accelerometer"; in toshiba_acpi_add()
3418 dev->indio_dev->modes = INDIO_DIRECT_MODE; in toshiba_acpi_add()
3419 dev->indio_dev->channels = toshiba_iio_accel_channels; in toshiba_acpi_add()
3420 dev->indio_dev->num_channels = in toshiba_acpi_add()
3423 ret = iio_device_register(dev->indio_dev); in toshiba_acpi_add()
3426 iio_device_free(dev->indio_dev); in toshiba_acpi_add()
3431 toshiba_usb_sleep_charge_available(dev); in toshiba_acpi_add()
3433 ret = toshiba_usb_rapid_charge_get(dev, &dummy); in toshiba_acpi_add()
3434 dev->usb_rapid_charge_supported = !ret; in toshiba_acpi_add()
3436 ret = toshiba_usb_sleep_music_get(dev, &dummy); in toshiba_acpi_add()
3437 dev->usb_sleep_music_supported = !ret; in toshiba_acpi_add()
3439 ret = toshiba_panel_power_on_get(dev, &dummy); in toshiba_acpi_add()
3440 dev->panel_power_on_supported = !ret; in toshiba_acpi_add()
3442 ret = toshiba_usb_three_get(dev, &dummy); in toshiba_acpi_add()
3443 dev->usb_three_supported = !ret; in toshiba_acpi_add()
3445 ret = get_video_status(dev, &dummy); in toshiba_acpi_add()
3446 dev->video_supported = !ret; in toshiba_acpi_add()
3448 ret = get_fan_status(dev, &dummy); in toshiba_acpi_add()
3449 dev->fan_supported = !ret; in toshiba_acpi_add()
3451 ret = get_fan_rpm(dev, &dummy); in toshiba_acpi_add()
3452 dev->fan_rpm_supported = !ret; in toshiba_acpi_add()
3455 if (dev->fan_rpm_supported) { in toshiba_acpi_add()
3456 dev->hwmon_device = hwmon_device_register_with_info( in toshiba_acpi_add()
3457 &dev->acpi_dev->dev, "toshiba_acpi_sensors", NULL, in toshiba_acpi_add()
3459 if (IS_ERR(dev->hwmon_device)) { in toshiba_acpi_add()
3460 dev->hwmon_device = NULL; in toshiba_acpi_add()
3466 toshiba_wwan_available(dev); in toshiba_acpi_add()
3467 if (dev->wwan_supported) in toshiba_acpi_add()
3468 toshiba_acpi_setup_wwan_rfkill(dev); in toshiba_acpi_add()
3470 toshiba_cooling_method_available(dev); in toshiba_acpi_add()
3472 toshiba_battery_charge_mode_available(dev); in toshiba_acpi_add()
3474 print_supported_features(dev); in toshiba_acpi_add()
3476 ret = sysfs_create_group(&dev->acpi_dev->dev.kobj, in toshiba_acpi_add()
3479 dev->sysfs_created = 0; in toshiba_acpi_add()
3482 dev->sysfs_created = !ret; in toshiba_acpi_add()
3484 create_toshiba_proc_entries(dev); in toshiba_acpi_add()
3486 toshiba_acpi = dev; in toshiba_acpi_add()
3492 if (dev->battery_charge_mode_supported) in toshiba_acpi_add()
3504 struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev); in toshiba_acpi_notify() local
3516 toshiba_acpi_process_hotkeys(dev); in toshiba_acpi_notify()
3534 dev->kbd_event_generated = true; in toshiba_acpi_notify()
3536 if (sysfs_update_group(&acpi_dev->dev.kobj, in toshiba_acpi_notify()
3540 if (dev->kbd_type == 2 && dev->kbd_mode != SCI_KBD_MODE_AUTO) in toshiba_acpi_notify()
3541 led_classdev_notify_brightness_hw_changed(&dev->kbd_led, in toshiba_acpi_notify()
3542 (dev->kbd_mode == SCI_KBD_MODE_ON) ? in toshiba_acpi_notify()
3556 dev_name(&acpi_dev->dev), in toshiba_acpi_notify()
3558 dev->last_key_event : 0); in toshiba_acpi_notify()
3564 struct toshiba_acpi_dev *dev = acpi_driver_data(to_acpi_device(device)); in toshiba_acpi_suspend() local
3566 if (dev->hotkey_dev) { in toshiba_acpi_suspend()
3569 result = hci_write(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_DISABLE); in toshiba_acpi_suspend()
3579 struct toshiba_acpi_dev *dev = acpi_driver_data(to_acpi_device(device)); in toshiba_acpi_resume() local
3581 if (dev->hotkey_dev) { in toshiba_acpi_resume()
3582 if (toshiba_acpi_enable_hotkeys(dev)) in toshiba_acpi_resume()
3586 if (dev->wwan_rfk) { in toshiba_acpi_resume()
3587 if (!toshiba_wireless_status(dev)) in toshiba_acpi_resume()
3588 rfkill_set_hw_state(dev->wwan_rfk, !dev->killswitch); in toshiba_acpi_resume()
3592 hci_write(dev, HCI_PANEL_POWER_ON, 1); in toshiba_acpi_resume()