Lines Matching refs:bgp
185 struct k3_j72xx_bandgap *bgp; member
219 struct k3_j72xx_bandgap *bgp; in k3_bgp_read_temp() local
222 bgp = devdata->bgp; in k3_bgp_read_temp()
232 s0 = readl(bgp->base + devdata->stat_offset) & in k3_bgp_read_temp()
234 s1 = readl(bgp->base + devdata->stat_offset) & in k3_bgp_read_temp()
236 s2 = readl(bgp->base + devdata->stat_offset) & in k3_bgp_read_temp()
351 struct k3_j72xx_bandgap *bgp; in k3_j72xx_bandgap_probe() local
374 bgp = devm_kzalloc(&pdev->dev, sizeof(*bgp), GFP_KERNEL); in k3_j72xx_bandgap_probe()
375 if (!bgp) in k3_j72xx_bandgap_probe()
378 bgp->dev = dev; in k3_j72xx_bandgap_probe()
380 bgp->base = devm_ioremap_resource(dev, res); in k3_j72xx_bandgap_probe()
381 if (IS_ERR(bgp->base)) in k3_j72xx_bandgap_probe()
382 return PTR_ERR(bgp->base); in k3_j72xx_bandgap_probe()
385 bgp->cfg2_base = devm_ioremap_resource(dev, res); in k3_j72xx_bandgap_probe()
386 if (IS_ERR(bgp->cfg2_base)) in k3_j72xx_bandgap_probe()
387 return PTR_ERR(bgp->cfg2_base); in k3_j72xx_bandgap_probe()
412 dev_dbg(bgp->dev, "Work around %sneeded\n", in k3_j72xx_bandgap_probe()
424 val = readl(bgp->base + K3_VTM_DEVINFO_PWR0_OFFSET); in k3_j72xx_bandgap_probe()
428 data = devm_kcalloc(bgp->dev, cnt, sizeof(*data), GFP_KERNEL); in k3_j72xx_bandgap_probe()
440 derived_table = devm_kzalloc(bgp->dev, sizeof(*derived_table) * TABLE_SIZE, in k3_j72xx_bandgap_probe()
454 data[id].bgp = bgp; in k3_j72xx_bandgap_probe()
473 val = readl(data[id].bgp->cfg2_base + data[id].ctrl_offset); in k3_j72xx_bandgap_probe()
477 writel(val, data[id].bgp->cfg2_base + data[id].ctrl_offset); in k3_j72xx_bandgap_probe()
479 bgp->ts_data[id] = &data[id]; in k3_j72xx_bandgap_probe()
480 ti_thermal = devm_thermal_of_zone_register(bgp->dev, id, &data[id], in k3_j72xx_bandgap_probe()
483 dev_err(bgp->dev, "thermal zone device is NULL\n"); in k3_j72xx_bandgap_probe()
499 writel((low_temp << 16) | high_max, data[0].bgp->cfg2_base + in k3_j72xx_bandgap_probe()
502 writel(K3_VTM_ANYMAXT_OUTRG_ALERT_EN, data[0].bgp->cfg2_base + in k3_j72xx_bandgap_probe()