Lines Matching refs:dev
152 static bool cap11xx_volatile_reg(struct device *dev, unsigned int reg) in cap11xx_volatile_reg() argument
257 static int cap11xx_init_leds(struct device *dev, in cap11xx_init_leds() argument
260 struct device_node *node = dev->of_node, *child; in cap11xx_init_leds()
271 led = devm_kcalloc(dev, cnt, sizeof(struct cap11xx_led), GFP_KERNEL); in cap11xx_init_leds()
310 error = devm_led_classdev_register(dev, &led->cdev); in cap11xx_init_leds()
323 static int cap11xx_init_leds(struct device *dev, in cap11xx_init_leds() argument
333 struct device *dev = &i2c_client->dev; in cap11xx_i2c_probe() local
342 dev_err(dev, "Invalid device ID %lu\n", id->driver_data); in cap11xx_i2c_probe()
348 dev_err(dev, "Invalid device configuration\n"); in cap11xx_i2c_probe()
352 priv = devm_kzalloc(dev, in cap11xx_i2c_probe()
367 dev_err(dev, "Product ID: Got 0x%02x, expected 0x%02x\n", in cap11xx_i2c_probe()
377 dev_err(dev, "Manufacturer ID: Got 0x%02x, expected 0x%02x\n", in cap11xx_i2c_probe()
386 dev_info(dev, "CAP11XX detected, model %s, revision 0x%02x\n", in cap11xx_i2c_probe()
388 node = dev->of_node; in cap11xx_i2c_probe()
392 dev_warn(dev, in cap11xx_i2c_probe()
397 dev_err(dev, "Invalid sensor-gain value %d\n", gain32); in cap11xx_i2c_probe()
434 priv->idev = devm_input_allocate_device(dev); in cap11xx_i2c_probe()
461 error = cap11xx_init_leds(dev, priv, cap->num_leds); in cap11xx_i2c_probe()
479 dev_err(dev, "Unable to parse or map IRQ\n"); in cap11xx_i2c_probe()
483 error = devm_request_threaded_irq(dev, irq, NULL, cap11xx_thread_func, in cap11xx_i2c_probe()
484 IRQF_ONESHOT, dev_name(dev), priv); in cap11xx_i2c_probe()