diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-11-16 05:35:53 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-11-17 03:58:42 -0500 |
commit | eb4b0ec75ec34e90bd1594c665f16de0cb4e3bf9 (patch) | |
tree | 4c7d9d003333da480d6c9810ee5881438280778f /include/media | |
parent | d647f0b70ce2b4aeb443639dc92b2d859da697a7 (diff) |
[media] include/media: move platform_data to linux/platform_data/media
Let's not mix platform_data headers with the core headers. Instead, let's
create a subdir at linux/platform_data and move the headers to that
common place, adding it to MAINTAINERS.
The headers were moved with:
mkdir include/linux/platform_data/media/; git mv include/media/gpio-ir-recv.h include/media/ir-rx51.h include/media/mmp-camera.h include/media/omap1_camera.h include/media/omap4iss.h include/media/s5p_hdmi.h include/media/si4713.h include/media/sii9234.h include/media/smiapp.h include/media/soc_camera.h include/media/soc_camera_platform.h include/media/timb_radio.h include/media/timb_video.h include/linux/platform_data/media/
And the references fixed with this script:
MAIN_DIR="linux/platform_data/"
PREV_DIR="media/"
DIRS="media/"
echo "Checking affected files" >&2
for i in $DIRS; do
for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
n=`basename $j`
git grep -l $n
done
done|sort|uniq >files && (
echo "Handling files..." >&2;
echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
(
cd include/$MAIN_DIR;
for j in $DIRS; do
for i in $(ls $j); do
echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\";
done;
done;
echo "cat > a && mv a \$i; done";
);
echo "Handling documentation..." >&2;
echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
(
cd include/$MAIN_DIR;
for j in $DIRS; do
for i in $(ls $j); do
echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
done;
done;
echo "cat > a && mv a \$i; done"
);
) >script && . ./script
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/gpio-ir-recv.h | 24 | ||||
-rw-r--r-- | include/media/ir-rx51.h | 10 | ||||
-rw-r--r-- | include/media/mmp-camera.h | 9 | ||||
-rw-r--r-- | include/media/omap1_camera.h | 35 | ||||
-rw-r--r-- | include/media/omap4iss.h | 65 | ||||
-rw-r--r-- | include/media/s5p_hdmi.h | 37 | ||||
-rw-r--r-- | include/media/si4713.h | 48 | ||||
-rw-r--r-- | include/media/sii9234.h | 24 | ||||
-rw-r--r-- | include/media/soc_camera_platform.h | 83 | ||||
-rw-r--r-- | include/media/timb_radio.h | 30 | ||||
-rw-r--r-- | include/media/timb_video.h | 33 |
11 files changed, 0 insertions, 398 deletions
diff --git a/include/media/gpio-ir-recv.h b/include/media/gpio-ir-recv.h deleted file mode 100644 index 0142736a59db..000000000000 --- a/include/media/gpio-ir-recv.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* Copyright (c) 2012, Code Aurora Forum. All rights reserved. | ||
2 | * | ||
3 | * This program is free software; you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License version 2 and | ||
5 | * only version 2 as published by the Free Software Foundation. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | */ | ||
12 | |||
13 | #ifndef __GPIO_IR_RECV_H__ | ||
14 | #define __GPIO_IR_RECV_H__ | ||
15 | |||
16 | struct gpio_ir_recv_platform_data { | ||
17 | int gpio_nr; | ||
18 | bool active_low; | ||
19 | u64 allowed_protos; | ||
20 | const char *map_name; | ||
21 | }; | ||
22 | |||
23 | #endif /* __GPIO_IR_RECV_H__ */ | ||
24 | |||
diff --git a/include/media/ir-rx51.h b/include/media/ir-rx51.h deleted file mode 100644 index 104aa892f31b..000000000000 --- a/include/media/ir-rx51.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #ifndef _LIRC_RX51_H | ||
2 | #define _LIRC_RX51_H | ||
3 | |||
4 | struct lirc_rx51_platform_data { | ||
5 | int pwm_timer; | ||
6 | |||
7 | int(*set_max_mpu_wakeup_lat)(struct device *dev, long t); | ||
8 | }; | ||
9 | |||
10 | #endif | ||
diff --git a/include/media/mmp-camera.h b/include/media/mmp-camera.h deleted file mode 100644 index 7611963a257f..000000000000 --- a/include/media/mmp-camera.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | /* | ||
2 | * Information for the Marvell Armada MMP camera | ||
3 | */ | ||
4 | |||
5 | struct mmp_camera_platform_data { | ||
6 | struct platform_device *i2c_device; | ||
7 | int sensor_power_gpio; | ||
8 | int sensor_reset_gpio; | ||
9 | }; | ||
diff --git a/include/media/omap1_camera.h b/include/media/omap1_camera.h deleted file mode 100644 index 819767cf04d4..000000000000 --- a/include/media/omap1_camera.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * Header for V4L2 SoC Camera driver for OMAP1 Camera Interface | ||
3 | * | ||
4 | * Copyright (C) 2010, Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __MEDIA_OMAP1_CAMERA_H_ | ||
12 | #define __MEDIA_OMAP1_CAMERA_H_ | ||
13 | |||
14 | #include <linux/bitops.h> | ||
15 | |||
16 | #define OMAP1_CAMERA_IOSIZE 0x1c | ||
17 | |||
18 | enum omap1_cam_vb_mode { | ||
19 | OMAP1_CAM_DMA_CONTIG = 0, | ||
20 | OMAP1_CAM_DMA_SG, | ||
21 | }; | ||
22 | |||
23 | #define OMAP1_CAMERA_MIN_BUF_COUNT(x) ((x) == OMAP1_CAM_DMA_CONTIG ? 3 : 2) | ||
24 | |||
25 | struct omap1_cam_platform_data { | ||
26 | unsigned long camexclk_khz; | ||
27 | unsigned long lclk_khz_max; | ||
28 | unsigned long flags; | ||
29 | }; | ||
30 | |||
31 | #define OMAP1_CAMERA_LCLK_RISING BIT(0) | ||
32 | #define OMAP1_CAMERA_RST_LOW BIT(1) | ||
33 | #define OMAP1_CAMERA_RST_HIGH BIT(2) | ||
34 | |||
35 | #endif /* __MEDIA_OMAP1_CAMERA_H_ */ | ||
diff --git a/include/media/omap4iss.h b/include/media/omap4iss.h deleted file mode 100644 index 0d7620db5e32..000000000000 --- a/include/media/omap4iss.h +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | #ifndef ARCH_ARM_PLAT_OMAP4_ISS_H | ||
2 | #define ARCH_ARM_PLAT_OMAP4_ISS_H | ||
3 | |||
4 | #include <linux/i2c.h> | ||
5 | |||
6 | struct iss_device; | ||
7 | |||
8 | enum iss_interface_type { | ||
9 | ISS_INTERFACE_CSI2A_PHY1, | ||
10 | ISS_INTERFACE_CSI2B_PHY2, | ||
11 | }; | ||
12 | |||
13 | /** | ||
14 | * struct iss_csiphy_lane: CSI2 lane position and polarity | ||
15 | * @pos: position of the lane | ||
16 | * @pol: polarity of the lane | ||
17 | */ | ||
18 | struct iss_csiphy_lane { | ||
19 | u8 pos; | ||
20 | u8 pol; | ||
21 | }; | ||
22 | |||
23 | #define ISS_CSIPHY1_NUM_DATA_LANES 4 | ||
24 | #define ISS_CSIPHY2_NUM_DATA_LANES 1 | ||
25 | |||
26 | /** | ||
27 | * struct iss_csiphy_lanes_cfg - CSI2 lane configuration | ||
28 | * @data: Configuration of one or two data lanes | ||
29 | * @clk: Clock lane configuration | ||
30 | */ | ||
31 | struct iss_csiphy_lanes_cfg { | ||
32 | struct iss_csiphy_lane data[ISS_CSIPHY1_NUM_DATA_LANES]; | ||
33 | struct iss_csiphy_lane clk; | ||
34 | }; | ||
35 | |||
36 | /** | ||
37 | * struct iss_csi2_platform_data - CSI2 interface platform data | ||
38 | * @crc: Enable the cyclic redundancy check | ||
39 | * @vpclk_div: Video port output clock control | ||
40 | */ | ||
41 | struct iss_csi2_platform_data { | ||
42 | unsigned crc:1; | ||
43 | unsigned vpclk_div:2; | ||
44 | struct iss_csiphy_lanes_cfg lanecfg; | ||
45 | }; | ||
46 | |||
47 | struct iss_subdev_i2c_board_info { | ||
48 | struct i2c_board_info *board_info; | ||
49 | int i2c_adapter_id; | ||
50 | }; | ||
51 | |||
52 | struct iss_v4l2_subdevs_group { | ||
53 | struct iss_subdev_i2c_board_info *subdevs; | ||
54 | enum iss_interface_type interface; | ||
55 | union { | ||
56 | struct iss_csi2_platform_data csi2; | ||
57 | } bus; /* gcc < 4.6.0 chokes on anonymous union initializers */ | ||
58 | }; | ||
59 | |||
60 | struct iss_platform_data { | ||
61 | struct iss_v4l2_subdevs_group *subdevs; | ||
62 | void (*set_constraints)(struct iss_device *iss, bool enable); | ||
63 | }; | ||
64 | |||
65 | #endif | ||
diff --git a/include/media/s5p_hdmi.h b/include/media/s5p_hdmi.h deleted file mode 100644 index 181642b8d0a5..000000000000 --- a/include/media/s5p_hdmi.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * Driver header for S5P HDMI chip. | ||
3 | * | ||
4 | * Copyright (c) 2011 Samsung Electronics, Co. Ltd | ||
5 | * Contact: Tomasz Stanislawski <t.stanislaws@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef S5P_HDMI_H | ||
14 | #define S5P_HDMI_H | ||
15 | |||
16 | struct i2c_board_info; | ||
17 | |||
18 | /** | ||
19 | * @hdmiphy_bus: controller id for HDMIPHY bus | ||
20 | * @hdmiphy_info: template for HDMIPHY I2C device | ||
21 | * @mhl_bus: controller id for MHL control bus | ||
22 | * @mhl_info: template for MHL I2C device | ||
23 | * @hpd_gpio: GPIO for Hot-Plug-Detect pin | ||
24 | * | ||
25 | * NULL pointer for *_info fields indicates that | ||
26 | * the corresponding chip is not present | ||
27 | */ | ||
28 | struct s5p_hdmi_platform_data { | ||
29 | int hdmiphy_bus; | ||
30 | struct i2c_board_info *hdmiphy_info; | ||
31 | int mhl_bus; | ||
32 | struct i2c_board_info *mhl_info; | ||
33 | int hpd_gpio; | ||
34 | }; | ||
35 | |||
36 | #endif /* S5P_HDMI_H */ | ||
37 | |||
diff --git a/include/media/si4713.h b/include/media/si4713.h deleted file mode 100644 index be4f58e2440b..000000000000 --- a/include/media/si4713.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * include/media/si4713.h | ||
3 | * | ||
4 | * Board related data definitions for Si4713 i2c device driver. | ||
5 | * | ||
6 | * Copyright (c) 2009 Nokia Corporation | ||
7 | * Contact: Eduardo Valentin <eduardo.valentin@nokia.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #ifndef SI4713_H | ||
16 | #define SI4713_H | ||
17 | |||
18 | /* The SI4713 I2C sensor chip has a fixed slave address of 0xc6 or 0x22. */ | ||
19 | #define SI4713_I2C_ADDR_BUSEN_HIGH 0x63 | ||
20 | #define SI4713_I2C_ADDR_BUSEN_LOW 0x11 | ||
21 | |||
22 | /* | ||
23 | * Platform dependent definition | ||
24 | */ | ||
25 | struct si4713_platform_data { | ||
26 | bool is_platform_device; | ||
27 | }; | ||
28 | |||
29 | /* | ||
30 | * Structure to query for Received Noise Level (RNL). | ||
31 | */ | ||
32 | struct si4713_rnl { | ||
33 | __u32 index; /* modulator index */ | ||
34 | __u32 frequency; /* frequency to peform rnl measurement */ | ||
35 | __s32 rnl; /* result of measurement in dBuV */ | ||
36 | __u32 reserved[4]; /* drivers and apps must init this to 0 */ | ||
37 | }; | ||
38 | |||
39 | /* | ||
40 | * This is the ioctl number to query for rnl. Users must pass a | ||
41 | * struct si4713_rnl pointer specifying desired frequency in 'frequency' field | ||
42 | * following driver capabilities (i.e V4L2_TUNER_CAP_LOW). | ||
43 | * Driver must return measured value in the same struture, filling 'rnl' field. | ||
44 | */ | ||
45 | #define SI4713_IOC_MEASURE_RNL _IOWR('V', BASE_VIDIOC_PRIVATE + 0, \ | ||
46 | struct si4713_rnl) | ||
47 | |||
48 | #endif /* ifndef SI4713_H*/ | ||
diff --git a/include/media/sii9234.h b/include/media/sii9234.h deleted file mode 100644 index 6a4a809fe9a3..000000000000 --- a/include/media/sii9234.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * Driver header for SII9234 MHL converter chip. | ||
3 | * | ||
4 | * Copyright (c) 2011 Samsung Electronics, Co. Ltd | ||
5 | * Contact: Tomasz Stanislawski <t.stanislaws@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef SII9234_H | ||
14 | #define SII9234_H | ||
15 | |||
16 | /** | ||
17 | * @gpio_n_reset: GPIO driving nRESET pin | ||
18 | */ | ||
19 | |||
20 | struct sii9234_platform_data { | ||
21 | int gpio_n_reset; | ||
22 | }; | ||
23 | |||
24 | #endif /* SII9234_H */ | ||
diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h deleted file mode 100644 index 1e5065dab430..000000000000 --- a/include/media/soc_camera_platform.h +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | /* | ||
2 | * Generic Platform Camera Driver Header | ||
3 | * | ||
4 | * Copyright (C) 2008 Magnus Damm | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __SOC_CAMERA_H__ | ||
12 | #define __SOC_CAMERA_H__ | ||
13 | |||
14 | #include <linux/videodev2.h> | ||
15 | #include <media/soc_camera.h> | ||
16 | #include <media/v4l2-mediabus.h> | ||
17 | |||
18 | struct device; | ||
19 | |||
20 | struct soc_camera_platform_info { | ||
21 | const char *format_name; | ||
22 | unsigned long format_depth; | ||
23 | struct v4l2_mbus_framefmt format; | ||
24 | unsigned long mbus_param; | ||
25 | enum v4l2_mbus_type mbus_type; | ||
26 | struct soc_camera_device *icd; | ||
27 | int (*set_capture)(struct soc_camera_platform_info *info, int enable); | ||
28 | }; | ||
29 | |||
30 | static inline void soc_camera_platform_release(struct platform_device **pdev) | ||
31 | { | ||
32 | *pdev = NULL; | ||
33 | } | ||
34 | |||
35 | static inline int soc_camera_platform_add(struct soc_camera_device *icd, | ||
36 | struct platform_device **pdev, | ||
37 | struct soc_camera_link *plink, | ||
38 | void (*release)(struct device *dev), | ||
39 | int id) | ||
40 | { | ||
41 | struct soc_camera_subdev_desc *ssdd = | ||
42 | (struct soc_camera_subdev_desc *)plink; | ||
43 | struct soc_camera_platform_info *info = ssdd->drv_priv; | ||
44 | int ret; | ||
45 | |||
46 | if (&icd->sdesc->subdev_desc != ssdd) | ||
47 | return -ENODEV; | ||
48 | |||
49 | if (*pdev) | ||
50 | return -EBUSY; | ||
51 | |||
52 | *pdev = platform_device_alloc("soc_camera_platform", id); | ||
53 | if (!*pdev) | ||
54 | return -ENOMEM; | ||
55 | |||
56 | info->icd = icd; | ||
57 | |||
58 | (*pdev)->dev.platform_data = info; | ||
59 | (*pdev)->dev.release = release; | ||
60 | |||
61 | ret = platform_device_add(*pdev); | ||
62 | if (ret < 0) { | ||
63 | platform_device_put(*pdev); | ||
64 | *pdev = NULL; | ||
65 | info->icd = NULL; | ||
66 | } | ||
67 | |||
68 | return ret; | ||
69 | } | ||
70 | |||
71 | static inline void soc_camera_platform_del(const struct soc_camera_device *icd, | ||
72 | struct platform_device *pdev, | ||
73 | const struct soc_camera_link *plink) | ||
74 | { | ||
75 | const struct soc_camera_subdev_desc *ssdd = | ||
76 | (const struct soc_camera_subdev_desc *)plink; | ||
77 | if (&icd->sdesc->subdev_desc != ssdd || !pdev) | ||
78 | return; | ||
79 | |||
80 | platform_device_unregister(pdev); | ||
81 | } | ||
82 | |||
83 | #endif /* __SOC_CAMERA_H__ */ | ||
diff --git a/include/media/timb_radio.h b/include/media/timb_radio.h deleted file mode 100644 index a40a6a348d21..000000000000 --- a/include/media/timb_radio.h +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | /* | ||
2 | * timb_radio.h Platform struct for the Timberdale radio driver | ||
3 | * Copyright (c) 2009 Intel Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef _TIMB_RADIO_ | ||
20 | #define _TIMB_RADIO_ 1 | ||
21 | |||
22 | #include <linux/i2c.h> | ||
23 | |||
24 | struct timb_radio_platform_data { | ||
25 | int i2c_adapter; /* I2C adapter where the tuner and dsp are attached */ | ||
26 | struct i2c_board_info *tuner; | ||
27 | struct i2c_board_info *dsp; | ||
28 | }; | ||
29 | |||
30 | #endif | ||
diff --git a/include/media/timb_video.h b/include/media/timb_video.h deleted file mode 100644 index 70ae43970a49..000000000000 --- a/include/media/timb_video.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * timb_video.h Platform struct for the Timberdale video driver | ||
3 | * Copyright (c) 2009-2010 Intel Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef _TIMB_VIDEO_ | ||
20 | #define _TIMB_VIDEO_ 1 | ||
21 | |||
22 | #include <linux/i2c.h> | ||
23 | |||
24 | struct timb_video_platform_data { | ||
25 | int dma_channel; | ||
26 | int i2c_adapter; /* The I2C adapter where the encoder is attached */ | ||
27 | struct { | ||
28 | const char *module_name; | ||
29 | struct i2c_board_info *info; | ||
30 | } encoder; | ||
31 | }; | ||
32 | |||
33 | #endif | ||