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()
274 struct lochnagar *lochnagar; in lochnagar_i2c_probe() local
281 lochnagar = devm_kzalloc(dev, sizeof(*lochnagar), GFP_KERNEL); in lochnagar_i2c_probe()
282 if (!lochnagar) in lochnagar_i2c_probe()
291 lochnagar->dev = dev; in lochnagar_i2c_probe()
292 mutex_init(&lochnagar->analogue_config_lock); in lochnagar_i2c_probe()
294 dev_set_drvdata(dev, lochnagar); in lochnagar_i2c_probe()
317 lochnagar->type = config->type; in lochnagar_i2c_probe()
319 lochnagar->regmap = devm_regmap_init_i2c(i2c, config->regmap); in lochnagar_i2c_probe()
320 if (IS_ERR(lochnagar->regmap)) { in lochnagar_i2c_probe()
321 ret = PTR_ERR(lochnagar->regmap); in lochnagar_i2c_probe()
327 ret = lochnagar_wait_for_boot(lochnagar->regmap, &val); in lochnagar_i2c_probe()
344 ret = regmap_read(lochnagar->regmap, LOCHNAGAR_FIRMWARE_ID1, &val); in lochnagar_i2c_probe()
352 ret = regmap_read(lochnagar->regmap, LOCHNAGAR_FIRMWARE_ID2, &val); in lochnagar_i2c_probe()
363 ret = regmap_register_patch(lochnagar->regmap, config->patch, in lochnagar_i2c_probe()