Lines Matching refs:lochnagar
231 int lochnagar_update_config(struct lochnagar *lochnagar) in lochnagar_update_config() argument
233 struct regmap *regmap = lochnagar->regmap; in lochnagar_update_config()
239 lockdep_assert_held(&lochnagar->analogue_config_lock); in lochnagar_update_config()
241 if (lochnagar->type != LOCHNAGAR2) in lochnagar_update_config()
273 struct lochnagar *lochnagar; in lochnagar_i2c_probe() local
280 lochnagar = devm_kzalloc(dev, sizeof(*lochnagar), GFP_KERNEL); in lochnagar_i2c_probe()
281 if (!lochnagar) in lochnagar_i2c_probe()
286 lochnagar->dev = dev; in lochnagar_i2c_probe()
287 mutex_init(&lochnagar->analogue_config_lock); in lochnagar_i2c_probe()
289 dev_set_drvdata(dev, lochnagar); in lochnagar_i2c_probe()
312 lochnagar->type = config->type; in lochnagar_i2c_probe()
314 lochnagar->regmap = devm_regmap_init_i2c(i2c, config->regmap); in lochnagar_i2c_probe()
315 if (IS_ERR(lochnagar->regmap)) { in lochnagar_i2c_probe()
316 ret = PTR_ERR(lochnagar->regmap); in lochnagar_i2c_probe()
322 ret = lochnagar_wait_for_boot(lochnagar->regmap, &val); in lochnagar_i2c_probe()
339 ret = regmap_read(lochnagar->regmap, LOCHNAGAR_FIRMWARE_ID1, &val); in lochnagar_i2c_probe()
347 ret = regmap_read(lochnagar->regmap, LOCHNAGAR_FIRMWARE_ID2, &val); in lochnagar_i2c_probe()
358 ret = regmap_register_patch(lochnagar->regmap, config->patch, in lochnagar_i2c_probe()