#include <linux/device.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <media/v4l2-async.h>
#include <media/v4l2-device.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-subdev.h>
static int v4l2_async_notifier_call_bound(struct v4l2_async_notifier *n,
struct v4l2_subdev *subdev,
struct v4l2_async_subdev *asd)
if (!n->ops || !n->ops->bound)
return n->ops->bound(n, subdev, asd);
static void v4l2_async_notifier_call_unbind(struct v4l2_async_notifier *n,
struct v4l2_subdev *subdev,
struct v4l2_async_subdev *asd)
if (!n->ops || !n->ops->unbind)
n->ops->unbind(n, subdev, asd);
static int v4l2_async_notifier_call_complete(struct v4l2_async_notifier *n)
if (!n->ops || !n->ops->complete)
return n->ops->complete(n);
static bool match_i2c(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
#if IS_ENABLED(CONFIG_I2C)
struct i2c_client *client = i2c_verify_client(sd->dev);
asd->match.i2c.adapter_id == client->adapter->nr &&
asd->match.i2c.address == client->addr;