In the meantime I figured out that it does work with my 4.14 (and saw you are using the same kernel), so here is what needs to be done:
You initialize your subdevice with your subdev_ops pointer:
v4l2_i2c_subdev_init(&sensor->subdev, client, &ar0330_subdev_ops);
Then you can fill up the _HAS_DEVNODE flag, which tells V4L2 that your device wishes to expose the /dev/v4l-subdevX:
sensor->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sensor->subdev.grp_id = 678;
And only then, you actually register your subdevice (so the _HAS_DEVNODE can take effect):
ret = v4l2_async_register_subdev(&sensor->subdev);
After this, if you are using the driver from NXP for MIPI (mxc-mipi-csi2_yav.c), then only after the first streaming command your device will register in the /dev/ folder, because in that driver, they don't have a callback to when the subdevice actually registers, so they have just put it in the s_stream callback (see v4l2_device_register_subdev_nodes()):
static int mipi_csi2_s_stream(struct v4l2_subdev *sd, int enable)
{
struct mxc_mipi_csi2_dev *csi2dev = sd_to_mxc_mipi_csi2_dev(sd);
struct device *dev = &csi2dev->pdev->dev;
struct v4l2_subdev *sensor_sd = csi2dev->sensor_sd;
int ret = 0;
dev_dbg(&csi2dev->pdev->dev, "%s: %d, csi2dev: 0x%x\n",
__func__, enable, csi2dev->flags);
if(csi2dev->registered == false)
{
csi2dev->registered = true;
v4l2_info(&csi2dev->v4l2_dev, "Registering subdevice nodes");
ret = v4l2_device_register_subdev_nodes(&csi2dev->v4l2_dev);
if(ret < 0 ){
v4l2_info(&csi2dev->v4l2_dev, "Error registering subdevice nodes");
return -EINVAL;
}
}
Hope that helps.