Lines Matching +full:wifi +full:- +full:2
1 // SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/input/sparse-keymap.h>
25 /* How often we poll keys - msecs */
30 #define WIFI 0x35 macro
70 : "=a" (regs->eax), "=b" (regs->ebx), "=c" (regs->ecx) in call_bios()
71 : "0" (regs->eax), "1" (regs->ebx), "2" (regs->ecx), in call_bios()
89 return -1; in locate_wistron_bios()
103 return -ENODEV; in map_bios()
136 return -ENOMEM; in map_bios()
217 #define KE_BLUETOOTH (KE_LAST + 2)
232 keymap = dmi->driver_data; in dmi_matched()
233 for (key = keymap; key->type != KE_END; key++) { in dmi_matched()
234 if (key->type == KE_WIFI) in dmi_matched()
236 else if (key->type == KE_BLUETOOTH) in dmi_matched()
239 leds_present = key->code & (FE_MAIL_LED | FE_WIFI_LED); in dmi_matched()
481 /* Wifi subsystem only activates the led. Therefore we need to pass
482 * wifi event as a normal key, then userspace can really change the wifi state.
483 * TODO we need to export led state to userspace (wifi and mail) */
637 /* Fujitsu-Siemens Amilo Pro V2000 */
646 /* Fujitsu-Siemens Amilo Pro Edition V3505 */
655 /* Fujitsu-Siemens Amilo Pro Edition V8210 */
664 /* Fujitsu-Siemens Amilo M7400 */
990 for (key = keymap; key->type != KE_END; key++) in copy_keymap()
996 return -ENOMEM; in copy_keymap()
1017 return -EINVAL; in select_keymap()
1023 return -ENODEV; in select_keymap()
1045 /* same as setting up wifi card, but for laptops on which the led is managed */
1049 bios_set_state(WIFI, (value != LED_OFF) ? 1 : 0); in wistron_wifi_led_set()
1058 .name = "wistron:red:wifi",
1065 u16 wifi = bios_get_default_setting(WIFI); in wistron_led_init() local
1066 if (wifi & 1) { in wistron_led_init()
1067 wistron_wifi_led.brightness = (wifi & 2) ? LED_FULL : LED_OFF; in wistron_led_init()
1071 bios_set_state(WIFI, wistron_wifi_led.brightness); in wistron_led_init()
1120 switch (key->type) { in handle_key()
1124 bios_set_state(WIFI, wifi_enabled); in handle_key()
1173 /* Increase poll frequency if user is currently pressing keys (< 2s ago) */ in wistron_poll()
1174 if (time_before(jiffies, jiffies_last_press + 2 * HZ)) in wistron_poll()
1183 switch (entry->type) { in wistron_setup_keymap()
1185 /* if wifi or bluetooth are not available, create normal keys */ in wistron_setup_keymap()
1188 entry->type = KE_KEY; in wistron_setup_keymap()
1189 entry->keycode = KEY_WLAN; in wistron_setup_keymap()
1195 entry->type = KE_KEY; in wistron_setup_keymap()
1196 entry->keycode = KEY_BLUETOOTH; in wistron_setup_keymap()
1201 if (entry->code & FE_UNTESTED) in wistron_setup_keymap()
1204 "eric.piel@tremplin-utc.net\n"); in wistron_setup_keymap()
1217 return -ENOMEM; in setup_input_dev()
1219 wistron_idev->name = "Wistron laptop buttons"; in setup_input_dev()
1220 wistron_idev->phys = "wistron/input0"; in setup_input_dev()
1221 wistron_idev->id.bustype = BUS_HOST; in setup_input_dev()
1222 wistron_idev->dev.parent = &wistron_device->dev; in setup_input_dev()
1224 wistron_idev->open = wistron_flush; in setup_input_dev()
1257 u16 wifi = bios_get_default_setting(WIFI); in wistron_probe() local
1258 if (wifi & 1) in wistron_probe()
1259 wifi_enabled = wifi & 2; in wistron_probe()
1264 bios_set_state(WIFI, wifi_enabled); in wistron_probe()
1270 bluetooth_enabled = bt & 2; in wistron_probe()
1278 wistron_led_init(&dev->dev); in wistron_probe()
1301 bios_set_state(WIFI, 0); in wistron_suspend()
1314 bios_set_state(WIFI, wifi_enabled); in wistron_resume()
1335 .name = "wistron-bios",
1358 wistron_device = platform_device_alloc("wistron-bios", -1); in wb_module_init()
1360 err = -ENOMEM; in wb_module_init()