Lines Matching refs:sensor
67 static int st_syscfg_power_ctrl(struct st_thermal_sensor *sensor, in st_syscfg_power_ctrl() argument
70 return regmap_field_write(sensor->pwr, power_state); in st_syscfg_power_ctrl()
73 static int st_syscfg_alloc_regfields(struct st_thermal_sensor *sensor) in st_syscfg_alloc_regfields() argument
75 struct device *dev = sensor->dev; in st_syscfg_alloc_regfields()
77 sensor->pwr = devm_regmap_field_alloc(dev, sensor->regmap, in st_syscfg_alloc_regfields()
78 sensor->cdata->reg_fields[TEMP_PWR]); in st_syscfg_alloc_regfields()
80 if (IS_ERR(sensor->pwr)) { in st_syscfg_alloc_regfields()
82 return PTR_ERR(sensor->pwr); in st_syscfg_alloc_regfields()
88 static int st_syscfg_regmap_init(struct st_thermal_sensor *sensor) in st_syscfg_regmap_init() argument
90 sensor->regmap = in st_syscfg_regmap_init()
91 syscon_regmap_lookup_by_compatible(sensor->cdata->sys_compat); in st_syscfg_regmap_init()
92 if (IS_ERR(sensor->regmap)) { in st_syscfg_regmap_init()
93 dev_err(sensor->dev, "failed to find syscfg regmap\n"); in st_syscfg_regmap_init()
94 return PTR_ERR(sensor->regmap); in st_syscfg_regmap_init()