Lines Matching refs:dev

341 static ssize_t idle_state_show(struct device *dev,  in idle_state_show()  argument
345 struct i2c_client *client = to_i2c_client(dev); in idle_state_show()
352 static ssize_t idle_state_store(struct device *dev, in idle_state_store() argument
356 struct i2c_client *client = to_i2c_client(dev); in idle_state_store()
427 data->irq = irq_domain_add_linear(client->dev.of_node, in pca954x_irq_setup()
436 dev_err(&client->dev, "failed irq create map\n"); in pca954x_irq_setup()
487 struct device *dev = &client->dev; in pca954x_probe() local
497 muxc = i2c_mux_alloc(adap, dev, PCA954X_MAX_NCHANS, sizeof(*data), 0, in pca954x_probe()
506 data->supply = devm_regulator_get(dev, "vdd"); in pca954x_probe()
508 return dev_err_probe(dev, PTR_ERR(data->supply), in pca954x_probe()
513 return dev_err_probe(dev, ret, in pca954x_probe()
517 gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); in pca954x_probe()
529 data->chip = device_get_match_data(dev); in pca954x_probe()
543 dev_warn(dev, "unexpected device id %03x-%03x-%x\n", in pca954x_probe()
552 if (device_property_read_u32(dev, "idle-state", &data->idle_state)) { in pca954x_probe()
553 if (device_property_read_bool(dev, "i2c-mux-idle-disconnect")) in pca954x_probe()
565 dev_warn(dev, "probe failed\n"); in pca954x_probe()
582 ret = devm_request_threaded_irq(dev, data->client->irq, in pca954x_probe()
594 device_create_file(dev, &dev_attr_idle_state); in pca954x_probe()
596 dev_info(dev, "registered %d multiplexed busses for I2C %s %s\n", in pca954x_probe()
611 device_remove_file(&client->dev, &dev_attr_idle_state); in pca954x_remove()
616 static int pca954x_resume(struct device *dev) in pca954x_resume() argument
618 struct i2c_client *client = to_i2c_client(dev); in pca954x_resume()
625 dev_err(&client->dev, "failed to verify mux presence\n"); in pca954x_resume()