Lines Matching refs:status

208 	TP_HKEY_EV_AC_CHANGED		= 0x6040, /* AC status changed */
250 #define onoff(status, bit) ((status) & (1 << (bit)) ? "on" : "off")
251 #define enabled(status, bit) ((status) & (1 << (bit)) ? "enabled" : "disabled")
574 acpi_status status;
621 status = acpi_evaluate_object(handle, method, &params, resultp);
625 success = (status == AE_OK &&
631 success = status == AE_OK;
642 method, fmt0, acpi_format_exception(status));
700 acpi_status status;
706 status = acpi_get_handle(parent, paths[i], handle);
707 if (ACPI_SUCCESS(status)) {
740 acpi_status status;
749 status = acpi_get_devices(hid, tpacpi_acpi_handle_locate_callback,
754 if (ACPI_SUCCESS(status)) {
761 name, acpi_format_exception(status));
780 acpi_status status;
802 status = acpi_install_notify_handler(*ibm->acpi->handle,
804 if (ACPI_FAILURE(status)) {
805 if (status == AE_ALREADY_EXISTS) {
810 ibm->name, acpi_format_exception(status));
1158 int status;
1163 status = (tp_rfk->ops->get_status)();
1164 if (status < 0)
1165 return status;
1168 (status == TPACPI_RFK_RADIO_OFF));
1170 return status;
1321 int status;
1327 status = TPACPI_RFK_RADIO_OFF;
1329 status = tpacpi_rfk_update_swstate(tpacpi_rfkill_switches[id]);
1330 if (status < 0)
1331 return status;
1335 (status == TPACPI_RFK_RADIO_ON) ? 1 : 0);
1367 seq_printf(m, "status:\t\tnot supported\n");
1369 int status;
1373 status = TPACPI_RFK_RADIO_OFF;
1375 status = tpacpi_rfk_update_swstate(
1377 if (status < 0)
1378 return status;
1381 seq_printf(m, "status:\t\t%s\n",
1382 (status == TPACPI_RFK_RADIO_ON) ?
1393 int status = -1;
1401 status = TPACPI_RFK_RADIO_ON;
1403 status = TPACPI_RFK_RADIO_OFF;
1408 if (status != -1) {
1410 (status == TPACPI_RFK_RADIO_ON) ?
1413 res = (tpacpi_rfkill_switches[id]->ops->set_status)(status);
2049 * reporting the status to userspace. i.e. in all these modes it makes
2061 int status;
2072 if (!acpi_evalf(hkey_handle, &status, "WLSW", "d"))
2075 return (status) ? TPACPI_RFK_RADIO_ON : TPACPI_RFK_RADIO_OFF;
2117 pr_err("Unknown multi mode status type %d with value 0x%04X, please report this to %s\n",
2146 pr_warn("Multi mode status is undetected, assuming laptop\n");
2160 static int hotkey_get_tablet_mode(int *status)
2169 *status = ((s & TP_HOTKEY_TABLET_MASK) != 0);
2175 *status = hotkey_gmms_get_tablet_mode(s, NULL);
2331 static int hotkey_status_get(int *status)
2333 if (!acpi_evalf(hkey_handle, status, "DHKC", "d"))
2730 int res, status;
2735 res = hotkey_status_get(&status);
2739 return snprintf(buf, PAGE_SIZE, "%d\n", status);
3149 "restoring original HKEY status and mask\n");
3461 int status;
3613 if (acpi_evalf(hkey_handle, &status, "WLSW", "qd")) {
3615 radiosw_state = !!status;
3617 enabled(status, 0));
4063 * AC status changed; can be triggered by plugging or
4077 /* Get the media key status to foce the status LED to update */
4250 int res, status;
4253 seq_printf(m, "status:\t\tnot supported\n");
4259 res = hotkey_status_get(&status);
4266 seq_printf(m, "status:\t\t%s\n", enabled(status, 0));
4380 int status;
4388 if (!acpi_evalf(hkey_handle, &status, "GBDC", "d"))
4391 return ((status & TP_ACPI_BLUETOOTH_RADIOSSW) != 0) ?
4397 int status;
4411 status = TP_ACPI_BLUETOOTH_RADIOSSW
4414 status = 0;
4416 if (!acpi_evalf(hkey_handle, NULL, "SBDC", "vd", status))
4549 int status = 0;
4559 acpi_evalf(hkey_handle, &status, "GBDC", "qd");
4562 "bluetooth is %s, status 0x%02x\n",
4564 status);
4573 !(status & TP_ACPI_BLUETOOTH_HWPRESENT)) {
4636 int status;
4644 if (!acpi_evalf(hkey_handle, &status, "GWAN", "d"))
4647 return ((status & TP_ACPI_WANCARD_RADIOSSW) != 0) ?
4653 int status;
4667 status = TP_ACPI_WANCARD_RADIOSSW
4670 status = 0;
4672 if (!acpi_evalf(hkey_handle, NULL, "SWAN", "vd", status))
4738 int status = 0;
4746 acpi_evalf(hkey_handle, &status, "GWAN", "qd");
4749 "wan is %s, status 0x%02x\n",
4751 status);
4760 !(status & TP_ACPI_WANCARD_HWPRESENT)) {
4822 int status;
4830 if (!acpi_evalf(hkey_handle, &status, "GUWB", "d"))
4833 return ((status & TP_ACPI_UWB_RADIOSSW) != 0) ?
4839 int status;
4853 status = TP_ACPI_UWB_RADIOSSW;
4855 status = 0;
4857 if (!acpi_evalf(hkey_handle, NULL, "SUWB", "vd", status))
4878 int status = 0;
4886 acpi_evalf(hkey_handle, &status, "GUWB", "qd");
4889 "uwb is %s, status 0x%02x\n",
4891 status);
4900 !(status & TP_ACPI_UWB_HWPRESENT)) {
4937 enum { /* video status flags, based on VIDEO_570 */
5014 int status = 0;
5022 status = i & TP_ACPI_VIDEO_570_PHSMASK;
5028 status |= TP_ACPI_VIDEO_S_LCD;
5032 status |= TP_ACPI_VIDEO_S_CRT;
5039 status |= TP_ACPI_VIDEO_S_CRT;
5045 status |= TP_ACPI_VIDEO_S_LCD;
5049 status |= TP_ACPI_VIDEO_S_DVI;
5055 return status;
5058 static int video_outputsw_set(int status)
5068 status | TP_ACPI_VIDEO_570_PHS2SET);
5079 "ASWT", "vdd", status * 0x100, 0);
5087 acpi_evalf(NULL, NULL, "\\VSDS", "vdd", status, 1);
5177 int status, autosw;
5180 seq_printf(m, "status:\t\tnot supported\n");
5188 status = video_outputsw_get();
5189 if (status < 0)
5190 return status;
5196 seq_printf(m, "status:\t\tsupported\n");
5197 seq_printf(m, "lcd:\t\t%s\n", enabled(status, 0));
5198 seq_printf(m, "crt:\t\t%s\n", enabled(status, 1));
5200 seq_printf(m, "dvi:\t\t%s\n", enabled(status, 3));
5215 int enable, disable, status;
5264 status = video_outputsw_get();
5265 if (status < 0)
5266 return status;
5267 res = video_outputsw_set((status & ~disable) | enable);
5312 int status = 0;
5317 if (!acpi_evalf(hkey_handle, &status, "MLCG", "dd", 0))
5320 if (status < 0)
5321 return status;
5323 return status & 0x3;
5328 int status = 0;
5338 if (!acpi_evalf(hkey_handle, &status, "MLCG", "qdd", 0)) {
5343 if (status < 0) {
5344 vdbg_printk(TPACPI_DBG_INIT, "kbdlight MLCG err: %d\n", status);
5348 vdbg_printk(TPACPI_DBG_INIT, "kbdlight MLCG returned 0x%x\n", status);
5368 return status & BIT(9);
5451 seq_printf(m, "status:\t\tnot supported\n");
5455 seq_printf(m, "status:\t\terror %d\n", level);
5457 seq_printf(m, "status:\t\t%d\n", level);
5522 int status = 0;
5525 if (!acpi_evalf(ec_handle, &status, "KBLT", "d"))
5527 return (!!status);
5533 static int light_set_status(int status)
5540 (status) ?
5545 (status) ? 1 : 0);
5589 /* light status not supported on
5594 vdbg_printk(TPACPI_DBG_INIT, "light is %s, light status is %s\n",
5621 int status;
5624 seq_printf(m, "status:\t\tnot supported\n");
5626 seq_printf(m, "status:\t\tunknown\n");
5629 status = light_get_status();
5630 if (status < 0)
5631 return status;
5632 seq_printf(m, "status:\t\t%s\n", onoff(status, 0));
5718 seq_printf(m, "status:\t\tnot supported\n");
5720 seq_printf(m, "status:\t\tsupported\n");
5807 int status;
5813 &status, "GLED", "dd", 1 << led))
5815 led_s = (status == 0) ?
5817 ((status == 1) ?
6008 acpi_status status;
6012 status = acpi_get_handle(ec_handle, "SLED", &led_handle);
6013 if (ACPI_SUCCESS(status))
6017 status = acpi_get_handle(ec_handle, "SYSL", &led_handle);
6018 if (ACPI_SUCCESS(status))
6023 status = acpi_get_handle(ec_handle, "LED", &led_handle);
6024 if (ACPI_SUCCESS(status))
6090 seq_printf(m, "status:\t\tnot supported\n");
6093 seq_printf(m, "status:\t\tsupported\n");
6097 int i, status;
6099 status = led_get_status(i);
6100 if (status < 0)
6103 i, str_led_status(status));
6191 seq_printf(m, "status:\t\tnot supported\n");
6193 seq_printf(m, "status:\t\tsupported\n");
6610 * brightness_get_raw returns status data in the HBRV layout
6697 static int tpacpi_brightness_get_raw(int *status)
6703 *status = tpacpi_brightness_nvram_get();
6709 *status = lec;
6807 int status, res;
6813 res = tpacpi_brightness_get_raw(&status);
6820 return status & TP_EC_BACKLIGHT_LVLMSK;
6853 acpi_status status = acpi_evaluate_object(child->handle, "_BCL",
6855 if (ACPI_FAILURE(status)) {
7293 "updated NVRAM mixer status to 0x%02x (0x%02x)\n",
7297 "NVRAM mixer status already is 0x%02x (0x%02x)\n",
7305 static int volume_get_status_ec(u8 *status)
7312 *status = s;
7314 dbg_printk(TPACPI_DBG_MIXER, "status 0x%02x\n", s);
7319 static int volume_get_status(u8 *status)
7321 return volume_get_status_ec(status);
7324 static int volume_set_status_ec(const u8 status)
7326 if (!acpi_ec_write(TP_EC_AUDIO, status))
7329 dbg_printk(TPACPI_DBG_MIXER, "set EC mixer to 0x%02x\n", status);
7340 static int volume_set_status(const u8 status)
7342 return volume_set_status_ec(status);
7811 u8 status;
7813 if (volume_get_status(&status) < 0) {
7820 status & TP_EC_AUDIO_LVL_MSK);
7823 onoff(status, TP_EC_AUDIO_MUTESW));
8074 TPACPI_FAN_NONE = 0, /* No fan status or control */
8136 pr_notice("fan_init: initial fan status is unknown, assuming it is in auto mode\n");
8150 /* Return most likely status. In fact, it
8151 * might be the only possible status */
8192 static void fan_update_desired_level(u8 status)
8194 if ((status &
8196 if (status > 7)
8199 fan_control_desired_level = status;
8203 static int fan_get_status(u8 *status)
8218 if (likely(status))
8219 *status = res & 0x07;
8228 if (likely(status)) {
8229 *status = s;
8230 fan_quirk1_handle(status);
8242 static int fan_get_status_safe(u8 *status)
8256 if (status)
8257 *status = s;
8584 u8 status;
8586 res = fan_get_status_safe(&status);
8590 if (status & TP_EC_FAN_FULLSPEED) {
8592 } else if (status & TP_EC_FAN_AUTO) {
8650 u8 status;
8652 res = fan_get_status_safe(&status);
8656 if ((status &
8658 status = fan_control_desired_level;
8660 if (status > 7)
8661 status = 7;
8663 return snprintf(buf, PAGE_SIZE, "%u\n", (status * 255) / 7);
8672 u8 status, newlevel;
8686 rc = fan_get_status(&status);
8687 if (!rc && (status &
8849 pr_err("ThinkPad ACPI EC access misbehaving, fan status and control unavailable\n");
8944 /* Store fan status in cache */
8963 /* DSDT *always* updates status on resume */
9015 u8 status;
9021 rc = fan_get_status_safe(&status);
9025 seq_printf(m, "status:\t\t%s\n"
9027 (status != 0) ? "enabled" : "disabled", status);
9032 rc = fan_get_status_safe(&status);
9036 seq_printf(m, "status:\t\t%s\n",
9037 (status != 0) ? "enabled" : "disabled");
9045 if (status & TP_EC_FAN_FULLSPEED)
9048 else if (status & TP_EC_FAN_AUTO)
9051 seq_printf(m, "level:\t\t%d\n", status);
9056 seq_printf(m, "status:\t\tnot supported\n");
9816 seq_puts(m, "status:\t\tnot supported\n");
9818 seq_printf(m, "status:\t\t%d\n", lcdshadow_state);