tvp7002.c (0337966d121ebebf73a1c346123e8112796e684e) | tvp7002.c (859969b38e2e9352f0227e1ef0be1dff4a3b7299) |
---|---|
1/* Texas Instruments Triple 8-/10-BIT 165-/110-MSPS Video and Graphics 2 * Digitizer with Horizontal PLL registers 3 * 4 * Copyright (C) 2009 Texas Instruments Inc 5 * Author: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> 6 * 7 * This code is partially based upon the TVP5150 driver 8 * written by Mauro Carvalho Chehab (mchehab@infradead.org), --- 19 unchanged lines hidden (view full) --- 28#include <linux/of.h> 29#include <linux/of_graph.h> 30#include <linux/v4l2-dv-timings.h> 31#include <media/i2c/tvp7002.h> 32#include <media/v4l2-async.h> 33#include <media/v4l2-device.h> 34#include <media/v4l2-common.h> 35#include <media/v4l2-ctrls.h> | 1/* Texas Instruments Triple 8-/10-BIT 165-/110-MSPS Video and Graphics 2 * Digitizer with Horizontal PLL registers 3 * 4 * Copyright (C) 2009 Texas Instruments Inc 5 * Author: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> 6 * 7 * This code is partially based upon the TVP5150 driver 8 * written by Mauro Carvalho Chehab (mchehab@infradead.org), --- 19 unchanged lines hidden (view full) --- 28#include <linux/of.h> 29#include <linux/of_graph.h> 30#include <linux/v4l2-dv-timings.h> 31#include <media/i2c/tvp7002.h> 32#include <media/v4l2-async.h> 33#include <media/v4l2-device.h> 34#include <media/v4l2-common.h> 35#include <media/v4l2-ctrls.h> |
36#include <media/v4l2-of.h> | 36#include <media/v4l2-fwnode.h> |
37 38#include "tvp7002_reg.h" 39 40MODULE_DESCRIPTION("TI TVP7002 Video and Graphics Digitizer driver"); 41MODULE_AUTHOR("Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>"); 42MODULE_LICENSE("GPL"); 43 44/* I2C retry attempts */ --- 839 unchanged lines hidden (view full) --- 884 .core = &tvp7002_core_ops, 885 .video = &tvp7002_video_ops, 886 .pad = &tvp7002_pad_ops, 887}; 888 889static struct tvp7002_config * 890tvp7002_get_pdata(struct i2c_client *client) 891{ | 37 38#include "tvp7002_reg.h" 39 40MODULE_DESCRIPTION("TI TVP7002 Video and Graphics Digitizer driver"); 41MODULE_AUTHOR("Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>"); 42MODULE_LICENSE("GPL"); 43 44/* I2C retry attempts */ --- 839 unchanged lines hidden (view full) --- 884 .core = &tvp7002_core_ops, 885 .video = &tvp7002_video_ops, 886 .pad = &tvp7002_pad_ops, 887}; 888 889static struct tvp7002_config * 890tvp7002_get_pdata(struct i2c_client *client) 891{ |
892 struct v4l2_of_endpoint bus_cfg; | 892 struct v4l2_fwnode_endpoint bus_cfg; |
893 struct tvp7002_config *pdata = NULL; 894 struct device_node *endpoint; 895 unsigned int flags; 896 897 if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) 898 return client->dev.platform_data; 899 900 endpoint = of_graph_get_next_endpoint(client->dev.of_node, NULL); 901 if (!endpoint) 902 return NULL; 903 | 893 struct tvp7002_config *pdata = NULL; 894 struct device_node *endpoint; 895 unsigned int flags; 896 897 if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) 898 return client->dev.platform_data; 899 900 endpoint = of_graph_get_next_endpoint(client->dev.of_node, NULL); 901 if (!endpoint) 902 return NULL; 903 |
904 if (v4l2_of_parse_endpoint(endpoint, &bus_cfg)) | 904 if (v4l2_fwnode_endpoint_parse(of_fwnode_handle(endpoint), &bus_cfg)) |
905 goto done; 906 907 pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL); 908 if (!pdata) 909 goto done; 910 911 flags = bus_cfg.bus.parallel.flags; 912 --- 180 unchanged lines hidden --- | 905 goto done; 906 907 pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL); 908 if (!pdata) 909 goto done; 910 911 flags = bus_cfg.bus.parallel.flags; 912 --- 180 unchanged lines hidden --- |