static ssize_t il_dbgfs_power_save_status_read(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) { struct il_priv *il = file->private_data; char buf[60]; int pos = 0; const size_t bufsz = sizeof(buf); u32 pwrsave_status; pwrsave_status = _il_rd(il, CSR_GP_CNTRL) & CSR_GP_REG_POWER_SAVE_STATUS_MSK; pos += scnprintf(buf + pos, bufsz - pos, "Power Save Status: "); pos += scnprintf(buf + pos, bufsz - pos, "%s\n", (pwrsave_status == CSR_GP_REG_NO_POWER_SAVE) ? "none" : (pwrsave_status == CSR_GP_REG_MAC_POWER_SAVE) ? "MAC" : (pwrsave_status == CSR_GP_REG_PHY_POWER_SAVE) ? "PHY" : "error"); return simple_read_from_buffer(user_buf, count, ppos, buf, pos); }
int il3945_hw_get_temperature(struct il_priv *il) { return _il_rd(il, CSR_UCODE_DRV_GP2); }