Lines Matching refs:status
225 TP_HKEY_EV_AC_CHANGED = 0x6040, /* AC status changed */
596 acpi_status status;
643 status = acpi_evaluate_object(handle, method, ¶ms, resultp);
647 success = (status == AE_OK &&
653 success = status == AE_OK;
664 method, fmt0, acpi_format_exception(status));
722 acpi_status status;
728 status = acpi_get_handle(parent, paths[i], handle);
729 if (ACPI_SUCCESS(status)) {
761 acpi_status status;
770 status = acpi_get_devices(hid, tpacpi_acpi_handle_locate_callback,
775 if (ACPI_SUCCESS(status)) {
782 name, acpi_format_exception(status));
801 acpi_status status;
822 status = acpi_install_notify_handler(*ibm->acpi->handle,
824 if (ACPI_FAILURE(status)) {
825 if (status == AE_ALREADY_EXISTS) {
830 ibm->name, acpi_format_exception(status));
1084 int status;
1089 status = (tp_rfk->ops->get_status)();
1090 if (status < 0)
1091 return status;
1094 (status == TPACPI_RFK_RADIO_OFF));
1096 return status;
1247 int status;
1253 status = TPACPI_RFK_RADIO_OFF;
1255 status = tpacpi_rfk_update_swstate(tpacpi_rfkill_switches[id]);
1256 if (status < 0)
1257 return status;
1261 (status == TPACPI_RFK_RADIO_ON) ? 1 : 0);
1293 seq_printf(m, "status:\t\tnot supported\n");
1295 int status;
1299 status = TPACPI_RFK_RADIO_OFF;
1301 status = tpacpi_rfk_update_swstate(
1303 if (status < 0)
1304 return status;
1307 seq_printf(m, "status:\t\t%s\n", str_enabled_disabled(status == TPACPI_RFK_RADIO_ON));
1317 int status = -1;
1325 status = TPACPI_RFK_RADIO_ON;
1327 status = TPACPI_RFK_RADIO_OFF;
1332 if (status != -1) {
1334 str_enable_disable(status == TPACPI_RFK_RADIO_ON),
1336 res = (tpacpi_rfkill_switches[id]->ops->set_status)(status);
1923 * reporting the status to userspace. i.e. in all these modes it makes
1935 int status;
1946 if (!acpi_evalf(hkey_handle, &status, "WLSW", "d"))
1949 return (status) ? TPACPI_RFK_RADIO_ON : TPACPI_RFK_RADIO_OFF;
1991 pr_err("Unknown multi mode status type %d with value 0x%04X, please report this to %s\n",
2020 pr_warn("Multi mode status is undetected, assuming laptop\n");
2034 static int hotkey_get_tablet_mode(int *status)
2043 *status = ((s & TP_HOTKEY_TABLET_MASK) != 0);
2049 *status = hotkey_gmms_get_tablet_mode(s, NULL);
2205 static int hotkey_status_get(int *status)
2207 if (!acpi_evalf(hkey_handle, status, "DHKC", "d"))
2607 int res, status;
2612 res = hotkey_status_get(&status);
2616 return sysfs_emit(buf, "%d\n", status);
3051 "restoring original HKEY status and mask\n");
3358 int status;
3493 if (acpi_evalf(hkey_handle, &status, "WLSW", "qd")) {
3495 radiosw_state = !!status;
3496 pr_info("radio switch found; radios are %s\n", str_enabled_disabled(status & BIT(0)));
3955 * AC status changed; can be triggered by plugging or
3969 /* Get the media key status to force the status LED to update */
4144 int res, status;
4147 seq_printf(m, "status:\t\tnot supported\n");
4153 res = hotkey_status_get(&status);
4160 seq_printf(m, "status:\t\t%s\n", str_enabled_disabled(status & BIT(0)));
4274 int status;
4282 if (!acpi_evalf(hkey_handle, &status, "GBDC", "d"))
4285 return ((status & TP_ACPI_BLUETOOTH_RADIOSSW) != 0) ?
4291 int status;
4304 status = TP_ACPI_BLUETOOTH_RADIOSSW
4307 status = 0;
4309 if (!acpi_evalf(hkey_handle, NULL, "SBDC", "vd", status))
4452 int status = 0;
4462 acpi_evalf(hkey_handle, &status, "GBDC", "qd");
4465 "bluetooth is %s, status 0x%02x\n",
4467 status);
4476 !(status & TP_ACPI_BLUETOOTH_HWPRESENT)) {
4529 int status;
4537 if (!acpi_evalf(hkey_handle, &status, "GWAN", "d"))
4540 return ((status & TP_ACPI_WANCARD_RADIOSSW) != 0) ?
4546 int status;
4559 status = TP_ACPI_WANCARD_RADIOSSW
4562 status = 0;
4564 if (!acpi_evalf(hkey_handle, NULL, "SWAN", "vd", status))
4633 int status = 0;
4641 acpi_evalf(hkey_handle, &status, "GWAN", "qd");
4644 "wan is %s, status 0x%02x\n",
4646 status);
4655 !(status & TP_ACPI_WANCARD_HWPRESENT)) {
4706 int status;
4714 if (!acpi_evalf(hkey_handle, &status, "GUWB", "d"))
4717 return ((status & TP_ACPI_UWB_RADIOSSW) != 0) ?
4723 int status;
4736 status = TP_ACPI_UWB_RADIOSSW;
4738 status = 0;
4740 if (!acpi_evalf(hkey_handle, NULL, "SUWB", "vd", status))
4761 int status = 0;
4769 acpi_evalf(hkey_handle, &status, "GUWB", "qd");
4772 "uwb is %s, status 0x%02x\n",
4774 status);
4783 !(status & TP_ACPI_UWB_HWPRESENT)) {
4820 enum { /* video status flags, based on VIDEO_570 */
4897 int status = 0;
4905 status = i & TP_ACPI_VIDEO_570_PHSMASK;
4911 status |= TP_ACPI_VIDEO_S_LCD;
4915 status |= TP_ACPI_VIDEO_S_CRT;
4922 status |= TP_ACPI_VIDEO_S_CRT;
4928 status |= TP_ACPI_VIDEO_S_LCD;
4932 status |= TP_ACPI_VIDEO_S_DVI;
4938 return status;
4941 static int video_outputsw_set(int status)
4951 status | TP_ACPI_VIDEO_570_PHS2SET);
4962 "ASWT", "vdd", status * 0x100, 0);
4970 acpi_evalf(NULL, NULL, "\\VSDS", "vdd", status, 1);
5060 int status, autosw;
5063 seq_printf(m, "status:\t\tnot supported\n");
5071 status = video_outputsw_get();
5072 if (status < 0)
5073 return status;
5079 seq_printf(m, "status:\t\tsupported\n");
5080 seq_printf(m, "lcd:\t\t%s\n", str_enabled_disabled(status & BIT(0)));
5081 seq_printf(m, "crt:\t\t%s\n", str_enabled_disabled(status & BIT(1)));
5083 seq_printf(m, "dvi:\t\t%s\n", str_enabled_disabled(status & BIT(3)));
5098 int enable, disable, status;
5147 status = video_outputsw_get();
5148 if (status < 0)
5149 return status;
5150 res = video_outputsw_set((status & ~disable) | enable);
5195 int status = 0;
5200 if (!acpi_evalf(hkey_handle, &status, "MLCG", "dd", 0))
5203 if (status < 0)
5204 return status;
5206 return status & 0x3;
5211 int status = 0;
5221 if (!acpi_evalf(hkey_handle, &status, "MLCG", "qdd", 0)) {
5226 if (status < 0) {
5227 vdbg_printk(TPACPI_DBG_INIT, "kbdlight MLCG err: %d\n", status);
5231 vdbg_printk(TPACPI_DBG_INIT, "kbdlight MLCG returned 0x%x\n", status);
5251 return status & BIT(9);
5334 seq_printf(m, "status:\t\tnot supported\n");
5338 seq_printf(m, "status:\t\terror %d\n", level);
5340 seq_printf(m, "status:\t\t%d\n", level);
5405 int status = 0;
5408 if (!acpi_evalf(ec_handle, &status, "KBLT", "d"))
5410 return (!!status);
5416 static int light_set_status(int status)
5423 (status) ?
5428 (status) ? 1 : 0);
5473 /* light status not supported on
5478 vdbg_printk(TPACPI_DBG_INIT, "light is %s, light status is %s\n",
5505 int status;
5508 seq_printf(m, "status:\t\tnot supported\n");
5510 seq_printf(m, "status:\t\tunknown\n");
5513 status = light_get_status();
5514 if (status < 0)
5515 return status;
5516 seq_printf(m, "status:\t\t%s\n", str_on_off(status & BIT(0)));
5607 seq_printf(m, "status:\t\tnot supported\n");
5609 seq_printf(m, "status:\t\tsupported\n");
5695 int status;
5701 &status, "GLED", "dd", 1 << led))
5703 led_s = (status == 0) ?
5705 ((status == 1) ?
5897 acpi_status status;
5901 status = acpi_get_handle(ec_handle, "SLED", &led_handle);
5902 if (ACPI_SUCCESS(status))
5906 status = acpi_get_handle(ec_handle, "SYSL", &led_handle);
5907 if (ACPI_SUCCESS(status))
5912 status = acpi_get_handle(ec_handle, "LED", &led_handle);
5913 if (ACPI_SUCCESS(status))
5977 seq_printf(m, "status:\t\tnot supported\n");
5980 seq_printf(m, "status:\t\tsupported\n");
5984 int i, status;
5986 status = led_get_status(i);
5987 if (status < 0)
5989 seq_printf(m, "%d:\t\t%s\n", i, str_led_status(status));
6077 seq_printf(m, "status:\t\tnot supported\n");
6079 seq_printf(m, "status:\t\tsupported\n");
6501 * brightness_get_raw returns status data in the HBRV layout
6588 static int tpacpi_brightness_get_raw(int *status)
6596 *status = tpacpi_brightness_nvram_get();
6602 *status = lec;
6699 int status, res;
6705 res = tpacpi_brightness_get_raw(&status);
6712 return status & TP_EC_BACKLIGHT_LVLMSK;
6732 acpi_status status;
6735 status = acpi_evaluate_object(adev->handle, "_BCL", NULL, &buffer);
6736 if (ACPI_FAILURE(status))
7187 "updated NVRAM mixer status to 0x%02x (0x%02x)\n",
7191 "NVRAM mixer status already is 0x%02x (0x%02x)\n",
7199 static int volume_get_status_ec(u8 *status)
7206 *status = s;
7208 dbg_printk(TPACPI_DBG_MIXER, "status 0x%02x\n", s);
7213 static int volume_get_status(u8 *status)
7215 return volume_get_status_ec(status);
7218 static int volume_set_status_ec(const u8 status)
7220 if (!acpi_ec_write(TP_EC_AUDIO, status))
7223 dbg_printk(TPACPI_DBG_MIXER, "set EC mixer to 0x%02x\n", status);
7234 static int volume_set_status(const u8 status)
7236 return volume_set_status_ec(status);
7705 u8 status;
7707 if (volume_get_status(&status) < 0) {
7714 status & TP_EC_AUDIO_LVL_MSK);
7716 seq_printf(m, "mute:\t\t%s\n", str_on_off(status & BIT(TP_EC_AUDIO_MUTESW)));
7971 fan_status_offset_ns = 0x93, /* Special status/control offset for non-standard EC Fan1 */
7972 fan2_status_offset_ns = 0x96, /* Special status/control offset for non-standard EC Fan2 */
7973 fan_rpm_status_ns = 0x95, /* Special offset for Fan1 RPM status for non-standard EC */
7974 fan2_rpm_status_ns = 0x98, /* Special offset for Fan2 RPM status for non-standard EC */
7983 TPACPI_FAN_NONE = 0, /* No fan status or control */
8048 pr_notice("fan_init: initial fan status is unknown, assuming it is in auto mode\n");
8062 /* Return most likely status. In fact, it
8063 * might be the only possible status */
8101 static void fan_update_desired_level(u8 status)
8105 if ((status &
8107 if (status > 7)
8110 fan_control_desired_level = status;
8114 static int fan_get_status(u8 *status)
8129 if (likely(status))
8130 *status = res & 0x07;
8139 if (likely(status)) {
8140 *status = s;
8141 fan_quirk1_handle(status);
8150 if (status)
8151 *status = s;
8162 static int fan_get_status_safe(u8 *status)
8177 if (status)
8178 *status = s;
8216 u8 hi, lo, status;
8235 rc = !acpi_ec_read(fan2_status_offset_ns, &status);
8238 if (!(status & FAN_NS_CTRL_STATUS)) {
8525 u8 status;
8527 res = fan_get_status_safe(&status);
8531 if (status & TP_EC_FAN_FULLSPEED) {
8533 } else if (status & TP_EC_FAN_AUTO) {
8591 u8 status;
8593 res = fan_get_status_safe(&status);
8597 if ((status &
8599 status = fan_control_desired_level;
8601 if (status > 7)
8602 status = 7;
8604 return sysfs_emit(buf, "%u\n", (status * 255) / 7);
8613 u8 status, newlevel;
8627 rc = fan_get_status(&status);
8628 if (!rc && (status &
8850 pr_err("ThinkPad ACPI EC access misbehaving, fan status and control unavailable\n");
8923 /* Store fan status in cache */
8942 /* DSDT *always* updates status on resume */
8994 u8 status;
9000 rc = fan_get_status_safe(&status);
9004 seq_printf(m, "status:\t\t%s\n"
9006 str_enabled_disabled(status), status);
9012 rc = fan_get_status_safe(&status);
9016 seq_printf(m, "status:\t\t%s\n", str_enabled_disabled(status));
9030 seq_printf(m, "level:\t\t%s\n", status & FAN_NS_CTRL ? "unknown" : "auto");
9032 if (status & TP_EC_FAN_FULLSPEED)
9035 else if (status & TP_EC_FAN_AUTO)
9038 seq_printf(m, "level:\t\t%d\n", status);
9044 seq_printf(m, "status:\t\tnot supported\n");
9427 /* The force discharge status is in bit 0 */
9433 /* The inhibit charge status is in bit 0 */
9535 * 5) Get the current force discharge status
9537 * 7) Get the current inhibit charge status
10002 seq_puts(m, "status:\t\tnot supported\n");
10004 seq_printf(m, "status:\t\t%d\n", lcdshadow_dev->hw_state);
10049 #define DYTC_CMD_QUERY 0 /* To get DYTC status - enable/revision */
10058 #define PALMSENSOR_ON_BIT 1 /* psensor status */