Lines Matching refs:dev

31 static int em28xx_initialize_mt9m111(struct em28xx *dev)  in em28xx_initialize_mt9m111()  argument
42 i2c_master_send(&dev->i2c_client[dev->def_i2c_bus], in em28xx_initialize_mt9m111()
51 static int em28xx_initialize_mt9m001(struct em28xx *dev) in em28xx_initialize_mt9m001() argument
71 i2c_master_send(&dev->i2c_client[dev->def_i2c_bus], in em28xx_initialize_mt9m001()
82 static int em28xx_probe_sensor_micron(struct em28xx *dev) in em28xx_probe_sensor_micron() argument
88 struct i2c_client *client = &dev->i2c_client[dev->def_i2c_bus]; in em28xx_probe_sensor_micron()
90 dev->em28xx_sensor = EM28XX_NOSENSOR; in em28xx_probe_sensor_micron()
97 dev_err(&dev->intf->dev, in em28xx_probe_sensor_micron()
106 dev_err(&dev->intf->dev, in em28xx_probe_sensor_micron()
127 dev->em28xx_sensor = EM28XX_MT9M111; in em28xx_probe_sensor_micron()
138 dev->em28xx_sensor = EM28XX_MT9V011; in em28xx_probe_sensor_micron()
142 dev->em28xx_sensor = EM28XX_MT9M001; in em28xx_probe_sensor_micron()
145 dev_info(&dev->intf->dev, in em28xx_probe_sensor_micron()
151 if (dev->em28xx_sensor == EM28XX_NOSENSOR) in em28xx_probe_sensor_micron()
152 dev_info(&dev->intf->dev, in em28xx_probe_sensor_micron()
155 dev_info(&dev->intf->dev, in em28xx_probe_sensor_micron()
167 static int em28xx_probe_sensor_omnivision(struct em28xx *dev) in em28xx_probe_sensor_omnivision() argument
173 struct i2c_client *client = &dev->i2c_client[dev->def_i2c_bus]; in em28xx_probe_sensor_omnivision()
175 dev->em28xx_sensor = EM28XX_NOSENSOR; in em28xx_probe_sensor_omnivision()
187 dev_err(&dev->intf->dev, in em28xx_probe_sensor_omnivision()
196 dev_err(&dev->intf->dev, in em28xx_probe_sensor_omnivision()
209 dev_err(&dev->intf->dev, in em28xx_probe_sensor_omnivision()
218 dev_err(&dev->intf->dev, in em28xx_probe_sensor_omnivision()
228 dev->em28xx_sensor = EM28XX_OV2640; in em28xx_probe_sensor_omnivision()
258 dev_info(&dev->intf->dev, in em28xx_probe_sensor_omnivision()
264 if (dev->em28xx_sensor == EM28XX_NOSENSOR) in em28xx_probe_sensor_omnivision()
265 dev_info(&dev->intf->dev, in em28xx_probe_sensor_omnivision()
268 dev_info(&dev->intf->dev, in em28xx_probe_sensor_omnivision()
277 int em28xx_detect_sensor(struct em28xx *dev) in em28xx_detect_sensor() argument
281 ret = em28xx_probe_sensor_micron(dev); in em28xx_detect_sensor()
283 if (dev->em28xx_sensor == EM28XX_NOSENSOR && ret < 0) in em28xx_detect_sensor()
284 ret = em28xx_probe_sensor_omnivision(dev); in em28xx_detect_sensor()
291 if (dev->em28xx_sensor == EM28XX_NOSENSOR && ret < 0) { in em28xx_detect_sensor()
292 dev_info(&dev->intf->dev, in em28xx_detect_sensor()
300 int em28xx_init_camera(struct em28xx *dev) in em28xx_init_camera() argument
302 struct i2c_client *client = &dev->i2c_client[dev->def_i2c_bus]; in em28xx_init_camera()
303 struct i2c_adapter *adap = &dev->i2c_adap[dev->def_i2c_bus]; in em28xx_init_camera()
304 struct em28xx_v4l2 *v4l2 = dev->v4l2; in em28xx_init_camera()
306 switch (dev->em28xx_sensor) { in em28xx_init_camera()
328 dev->board.xclk = EM28XX_XCLK_FREQUENCY_4_3MHZ; in em28xx_init_camera()
329 em28xx_write_reg(dev, EM28XX_R0F_XCLK, dev->board.xclk); in em28xx_init_camera()
345 em28xx_initialize_mt9m001(dev); in em28xx_init_camera()
355 dev->board.xclk = EM28XX_XCLK_FREQUENCY_48MHZ; in em28xx_init_camera()
356 em28xx_write_reg(dev, EM28XX_R0F_XCLK, dev->board.xclk); in em28xx_init_camera()
357 em28xx_initialize_mt9m111(dev); in em28xx_init_camera()
398 dev->board.xclk = EM28XX_XCLK_FREQUENCY_24MHZ; in em28xx_init_camera()
399 em28xx_write_reg(dev, EM28XX_R0F_XCLK, dev->board.xclk); in em28xx_init_camera()