Lines Matching refs:core
1736 .core = &tvp5150_core_ops,
1826 static int tvp5150_detect_version(struct tvp5150 *core)
1828 struct v4l2_subdev *sd = &core->sd;
1837 res = regmap_bulk_read(core->regmap, TVP5150_MSB_DEV_ID, regs, 4);
1843 core->dev_id = (regs[0] << 8) | regs[1];
1844 core->rom_ver = (regs[2] << 8) | regs[3];
1847 core->dev_id, regs[2], regs[3], c->addr << 1,
1850 if (core->dev_id == 0x5150 && core->rom_ver == 0x0321) {
1852 } else if (core->dev_id == 0x5150 && core->rom_ver == 0x0400) {
1856 regmap_write(core->regmap, TVP5150_REV_SELECT, 0);
1857 } else if (core->dev_id == 0x5151 && core->rom_ver == 0x0100) {
1861 core->dev_id);
2117 struct tvp5150 *core;
2133 core = devm_kzalloc(&c->dev, sizeof(*core), GFP_KERNEL);
2134 if (!core)
2141 core->regmap = map;
2142 sd = &core->sd;
2148 res = tvp5150_parse_dt(core, np);
2155 core->mbus_type = V4L2_MBUS_BT656;
2158 res = tvp5150_mc_init(core);
2162 res = tvp5150_detect_version(core);
2171 for (i = 0; i < core->connectors_num; i++) {
2174 v4l2c = &core->connectors[i].base;
2175 core->norm |= v4l2c->connector.analog.sdtv_stds;
2178 if (!core->connectors_num)
2179 core->norm = V4L2_STD_ALL;
2181 core->detected_norm = V4L2_STD_UNKNOWN;
2182 core->input = TVP5150_COMPOSITE1;
2183 core->enable = true;
2185 v4l2_ctrl_handler_init(&core->hdl, 5);
2186 v4l2_ctrl_new_std(&core->hdl, &tvp5150_ctrl_ops,
2188 v4l2_ctrl_new_std(&core->hdl, &tvp5150_ctrl_ops,
2190 v4l2_ctrl_new_std(&core->hdl, &tvp5150_ctrl_ops,
2192 v4l2_ctrl_new_std(&core->hdl, &tvp5150_ctrl_ops,
2194 v4l2_ctrl_new_std(&core->hdl, &tvp5150_ctrl_ops,
2197 v4l2_ctrl_new_std_menu_items(&core->hdl, &tvp5150_ctrl_ops,
2201 sd->ctrl_handler = &core->hdl;
2202 if (core->hdl.error) {
2203 res = core->hdl.error;
2207 tvp5150_set_default(tvp5150_read_std(sd), &core->rect);
2209 core->irq = c->irq;
2214 IRQF_ONESHOT, "tvp5150", core);
2233 v4l2_ctrl_handler_free(&core->hdl);