tvp514x.c (0337966d121ebebf73a1c346123e8112796e684e) tvp514x.c (859969b38e2e9352f0227e1ef0be1dff4a3b7299)
1/*
2 * drivers/media/i2c/tvp514x.c
3 *
4 * TI TVP5146/47 decoder driver
5 *
6 * Copyright (C) 2008 Texas Instruments Inc
7 * Author: Vaibhav Hiremath <hvaibhav@ti.com>
8 *

--- 24 unchanged lines hidden (view full) ---

33#include <linux/v4l2-mediabus.h>
34#include <linux/of.h>
35#include <linux/of_graph.h>
36
37#include <media/v4l2-async.h>
38#include <media/v4l2-device.h>
39#include <media/v4l2-common.h>
40#include <media/v4l2-mediabus.h>
1/*
2 * drivers/media/i2c/tvp514x.c
3 *
4 * TI TVP5146/47 decoder driver
5 *
6 * Copyright (C) 2008 Texas Instruments Inc
7 * Author: Vaibhav Hiremath <hvaibhav@ti.com>
8 *

--- 24 unchanged lines hidden (view full) ---

33#include <linux/v4l2-mediabus.h>
34#include <linux/of.h>
35#include <linux/of_graph.h>
36
37#include <media/v4l2-async.h>
38#include <media/v4l2-device.h>
39#include <media/v4l2-common.h>
40#include <media/v4l2-mediabus.h>
41#include <media/v4l2-of.h>
41#include <media/v4l2-fwnode.h>
42#include <media/v4l2-ctrls.h>
43#include <media/i2c/tvp514x.h>
44#include <media/media-entity.h>
45
46#include "tvp514x_regs.h"
47
48/* Private macros for TVP */
49#define I2C_RETRY_COUNT (5)

--- 943 unchanged lines hidden (view full) ---

993 .num_stds = ARRAY_SIZE(tvp514x_std_list),
994
995};
996
997static struct tvp514x_platform_data *
998tvp514x_get_pdata(struct i2c_client *client)
999{
1000 struct tvp514x_platform_data *pdata = NULL;
42#include <media/v4l2-ctrls.h>
43#include <media/i2c/tvp514x.h>
44#include <media/media-entity.h>
45
46#include "tvp514x_regs.h"
47
48/* Private macros for TVP */
49#define I2C_RETRY_COUNT (5)

--- 943 unchanged lines hidden (view full) ---

993 .num_stds = ARRAY_SIZE(tvp514x_std_list),
994
995};
996
997static struct tvp514x_platform_data *
998tvp514x_get_pdata(struct i2c_client *client)
999{
1000 struct tvp514x_platform_data *pdata = NULL;
1001 struct v4l2_of_endpoint bus_cfg;
1001 struct v4l2_fwnode_endpoint bus_cfg;
1002 struct device_node *endpoint;
1003 unsigned int flags;
1004
1005 if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node)
1006 return client->dev.platform_data;
1007
1008 endpoint = of_graph_get_next_endpoint(client->dev.of_node, NULL);
1009 if (!endpoint)
1010 return NULL;
1011
1002 struct device_node *endpoint;
1003 unsigned int flags;
1004
1005 if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node)
1006 return client->dev.platform_data;
1007
1008 endpoint = of_graph_get_next_endpoint(client->dev.of_node, NULL);
1009 if (!endpoint)
1010 return NULL;
1011
1012 if (v4l2_of_parse_endpoint(endpoint, &bus_cfg))
1012 if (v4l2_fwnode_endpoint_parse(of_fwnode_handle(endpoint), &bus_cfg))
1013 goto done;
1014
1015 pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL);
1016 if (!pdata)
1017 goto done;
1018
1019 flags = bus_cfg.bus.parallel.flags;
1020

--- 219 unchanged lines hidden ---
1013 goto done;
1014
1015 pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL);
1016 if (!pdata)
1017 goto done;
1018
1019 flags = bus_cfg.bus.parallel.flags;
1020

--- 219 unchanged lines hidden ---