Lines Matching refs:core
1746 .core = &tvp5150_core_ops,
1836 static int tvp5150_detect_version(struct tvp5150 *core)
1838 struct v4l2_subdev *sd = &core->sd;
1847 res = regmap_bulk_read(core->regmap, TVP5150_MSB_DEV_ID, regs, 4);
1853 core->dev_id = (regs[0] << 8) | regs[1];
1854 core->rom_ver = (regs[2] << 8) | regs[3];
1857 core->dev_id, regs[2], regs[3], c->addr << 1,
1860 if (core->dev_id == 0x5150 && core->rom_ver == 0x0321) {
1862 } else if (core->dev_id == 0x5150 && core->rom_ver == 0x0400) {
1866 regmap_write(core->regmap, TVP5150_REV_SELECT, 0);
1867 } else if (core->dev_id == 0x5151 && core->rom_ver == 0x0100) {
1871 core->dev_id);
2127 struct tvp5150 *core;
2143 core = devm_kzalloc(&c->dev, sizeof(*core), GFP_KERNEL);
2144 if (!core)
2151 core->regmap = map;
2152 sd = &core->sd;
2158 res = tvp5150_parse_dt(core, np);
2165 core->mbus_type = V4L2_MBUS_BT656;
2168 res = tvp5150_mc_init(core);
2172 res = tvp5150_detect_version(core);
2181 for (i = 0; i < core->connectors_num; i++) {
2184 v4l2c = &core->connectors[i].base;
2185 core->norm |= v4l2c->connector.analog.sdtv_stds;
2188 if (!core->connectors_num)
2189 core->norm = V4L2_STD_ALL;
2191 core->detected_norm = V4L2_STD_UNKNOWN;
2192 core->input = TVP5150_COMPOSITE1;
2193 core->enable = true;
2195 v4l2_ctrl_handler_init(&core->hdl, 5);
2196 v4l2_ctrl_new_std(&core->hdl, &tvp5150_ctrl_ops,
2198 v4l2_ctrl_new_std(&core->hdl, &tvp5150_ctrl_ops,
2200 v4l2_ctrl_new_std(&core->hdl, &tvp5150_ctrl_ops,
2202 v4l2_ctrl_new_std(&core->hdl, &tvp5150_ctrl_ops,
2204 v4l2_ctrl_new_std(&core->hdl, &tvp5150_ctrl_ops,
2207 v4l2_ctrl_new_std_menu_items(&core->hdl, &tvp5150_ctrl_ops,
2211 sd->ctrl_handler = &core->hdl;
2212 if (core->hdl.error) {
2213 res = core->hdl.error;
2217 tvp5150_set_default(tvp5150_read_std(sd), &core->rect);
2219 core->irq = c->irq;
2224 IRQF_ONESHOT, "tvp5150", core);
2243 v4l2_ctrl_handler_free(&core->hdl);