tsensor
u32 tsensor = nvkm_rd32(device, 0x020460);
u32 inttemp = (tsensor & 0x0001fff8);
if (tsensor & 0x40000000)
if (tsensor & 0x20000000)
bfa_trc(diag, diag->tsensor.lock);
if (diag->tsensor.lock) {
diag->tsensor.status = BFA_STATUS_IOC_FAILURE;
diag->tsensor.cbfn(diag->tsensor.cbarg,
diag->tsensor.status);
diag->tsensor.lock = 0;
msg = (struct bfi_diag_ts_req_s *)diag->tsensor.mbcmd.msg;
bfa_ioc_mbox_queue(diag->ioc, &diag->tsensor.mbcmd);
if (!diag->tsensor.lock) {
bfa_trc(diag, diag->tsensor.lock);
diag->tsensor.temp->temp = be16_to_cpu(rsp->temp);
diag->tsensor.temp->ts_junc = rsp->ts_junc;
diag->tsensor.temp->ts_brd = rsp->ts_brd;
diag->tsensor.temp->status = rsp->status;
diag->tsensor.temp->brd_temp =
diag->tsensor.temp->brd_temp = 0;
diag->tsensor.status = BFA_STATUS_OK;
diag->tsensor.cbfn(diag->tsensor.cbarg, diag->tsensor.status);
diag->tsensor.lock = 0;
if (diag->block || diag->tsensor.lock) {
bfa_trc(diag, diag->tsensor.lock);
diag->tsensor.lock = 1;
diag->tsensor.temp = result;
diag->tsensor.cbfn = cbfn;
diag->tsensor.cbarg = cbarg;
diag->tsensor.status = BFA_STATUS_OK;
struct bfa_diag_tsensor_s tsensor;
struct tsensor *s = thermal_zone_device_priv(tz);
struct tsensor sensor[MAX_SENSOR_NUM];