aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 08:13:27 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 08:13:27 -0500
commitc3152592e70bbf023ec106ee9ea271e9060bc09a (patch)
tree1297d10309d56c67eee12d82f8764c9cf3e8fc22 /include/linux/platform_data
parentafd2ff9b7e1b367172f18ba7f693dfb62bdcb2dc (diff)
parent768acf46e1320d6c41ed1b7c4952bab41c1cde79 (diff)
Merge branch 'patchwork' into v4l_for_linus
* patchwork: (204 commits) [media] rc: sunxi-cir: Initialize the spinlock properly [media] rtl2832: do not filter out slave TS null packets [media] rtl2832: print reg number on error case [media] rtl28xxu: return demod reg page from driver cache [media] coda: enable MPEG-2 ES decoding [media] coda: don't start streaming without queued buffers [media] coda: hook up vidioc_prepare_buf [media] coda: relax coda_jpeg_check_buffer for trailing bytes [media] coda: make to_coda_video_device static [media] s5p-mfc: remove volatile attribute from MFC register addresses [media] s5p-mfc: merge together s5p_mfc_hw_call and s5p_mfc_hw_call_void [media] s5p-mfc: use spinlock to protect MFC context [media] s5p-mfc: remove unnecessary callbacks [media] s5p-mfc: make queue cleanup code common [media] s5p-mfc: use one implementation of s5p_mfc_get_new_ctx [media] s5p-mfc: constify s5p_mfc_codec_ops structures [media] au8522: Avoid memory leak for device config data [media] ir-lirc-codec.c: don't leak lirc->drv-rbuf [media] uvcvideo: small cleanup in uvc_video_clock_update() [media] uvcvideo: Fix reading the current exposure value of UVC ...
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/camera-rcar.h25
-rw-r--r--include/linux/platform_data/media/camera-mx2.h (renamed from include/linux/platform_data/camera-mx2.h)0
-rw-r--r--include/linux/platform_data/media/camera-mx3.h (renamed from include/linux/platform_data/camera-mx3.h)0
-rw-r--r--include/linux/platform_data/media/camera-pxa.h (renamed from include/linux/platform_data/camera-pxa.h)0
-rw-r--r--include/linux/platform_data/media/coda.h (renamed from include/linux/platform_data/coda.h)0
-rw-r--r--include/linux/platform_data/media/gpio-ir-recv.h23
-rw-r--r--include/linux/platform_data/media/ir-rx51.h10
-rw-r--r--include/linux/platform_data/media/mmp-camera.h9
-rw-r--r--include/linux/platform_data/media/omap1_camera.h35
-rw-r--r--include/linux/platform_data/media/omap4iss.h65
-rw-r--r--include/linux/platform_data/media/s5p_hdmi.h36
-rw-r--r--include/linux/platform_data/media/si4713.h48
-rw-r--r--include/linux/platform_data/media/sii9234.h24
-rw-r--r--include/linux/platform_data/media/soc_camera_platform.h83
-rw-r--r--include/linux/platform_data/media/timb_radio.h30
-rw-r--r--include/linux/platform_data/media/timb_video.h33
16 files changed, 396 insertions, 25 deletions
diff --git a/include/linux/platform_data/camera-rcar.h b/include/linux/platform_data/camera-rcar.h
deleted file mode 100644
index dfc83c581593..000000000000
--- a/include/linux/platform_data/camera-rcar.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * Platform data for Renesas R-Car VIN soc-camera driver
3 *
4 * Copyright (C) 2011-2013 Renesas Solutions Corp.
5 * Copyright (C) 2013 Cogent Embedded, Inc., <source@cogentembedded.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#ifndef __CAMERA_RCAR_H_
14#define __CAMERA_RCAR_H_
15
16#define RCAR_VIN_HSYNC_ACTIVE_LOW (1 << 0)
17#define RCAR_VIN_VSYNC_ACTIVE_LOW (1 << 1)
18#define RCAR_VIN_BT601 (1 << 2)
19#define RCAR_VIN_BT656 (1 << 3)
20
21struct rcar_vin_platform_data {
22 unsigned int flags;
23};
24
25#endif /* __CAMERA_RCAR_H_ */
diff --git a/include/linux/platform_data/camera-mx2.h b/include/linux/platform_data/media/camera-mx2.h
index 7ded6f1f74bc..7ded6f1f74bc 100644
--- a/include/linux/platform_data/camera-mx2.h
+++ b/include/linux/platform_data/media/camera-mx2.h
diff --git a/include/linux/platform_data/camera-mx3.h b/include/linux/platform_data/media/camera-mx3.h
index a910dadc8258..a910dadc8258 100644
--- a/include/linux/platform_data/camera-mx3.h
+++ b/include/linux/platform_data/media/camera-mx3.h
diff --git a/include/linux/platform_data/camera-pxa.h b/include/linux/platform_data/media/camera-pxa.h
index 6709b1cd7c77..6709b1cd7c77 100644
--- a/include/linux/platform_data/camera-pxa.h
+++ b/include/linux/platform_data/media/camera-pxa.h
diff --git a/include/linux/platform_data/coda.h b/include/linux/platform_data/media/coda.h
index 6ad4410d9e20..6ad4410d9e20 100644
--- a/include/linux/platform_data/coda.h
+++ b/include/linux/platform_data/media/coda.h
diff --git a/include/linux/platform_data/media/gpio-ir-recv.h b/include/linux/platform_data/media/gpio-ir-recv.h
new file mode 100644
index 000000000000..0c298f569d5a
--- /dev/null
+++ b/include/linux/platform_data/media/gpio-ir-recv.h
@@ -0,0 +1,23 @@
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
16struct 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__ */
diff --git a/include/linux/platform_data/media/ir-rx51.h b/include/linux/platform_data/media/ir-rx51.h
new file mode 100644
index 000000000000..104aa892f31b
--- /dev/null
+++ b/include/linux/platform_data/media/ir-rx51.h
@@ -0,0 +1,10 @@
1#ifndef _LIRC_RX51_H
2#define _LIRC_RX51_H
3
4struct 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/linux/platform_data/media/mmp-camera.h b/include/linux/platform_data/media/mmp-camera.h
new file mode 100644
index 000000000000..7611963a257f
--- /dev/null
+++ b/include/linux/platform_data/media/mmp-camera.h
@@ -0,0 +1,9 @@
1/*
2 * Information for the Marvell Armada MMP camera
3 */
4
5struct 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/linux/platform_data/media/omap1_camera.h b/include/linux/platform_data/media/omap1_camera.h
new file mode 100644
index 000000000000..819767cf04d4
--- /dev/null
+++ b/include/linux/platform_data/media/omap1_camera.h
@@ -0,0 +1,35 @@
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
18enum 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
25struct 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/linux/platform_data/media/omap4iss.h b/include/linux/platform_data/media/omap4iss.h
new file mode 100644
index 000000000000..0d7620db5e32
--- /dev/null
+++ b/include/linux/platform_data/media/omap4iss.h
@@ -0,0 +1,65 @@
1#ifndef ARCH_ARM_PLAT_OMAP4_ISS_H
2#define ARCH_ARM_PLAT_OMAP4_ISS_H
3
4#include <linux/i2c.h>
5
6struct iss_device;
7
8enum 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 */
18struct 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 */
31struct 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 */
41struct iss_csi2_platform_data {
42 unsigned crc:1;
43 unsigned vpclk_div:2;
44 struct iss_csiphy_lanes_cfg lanecfg;
45};
46
47struct iss_subdev_i2c_board_info {
48 struct i2c_board_info *board_info;
49 int i2c_adapter_id;
50};
51
52struct 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
60struct 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/linux/platform_data/media/s5p_hdmi.h b/include/linux/platform_data/media/s5p_hdmi.h
new file mode 100644
index 000000000000..bb9cacb0cbb0
--- /dev/null
+++ b/include/linux/platform_data/media/s5p_hdmi.h
@@ -0,0 +1,36 @@
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
16struct 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 */
28struct 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 */
diff --git a/include/linux/platform_data/media/si4713.h b/include/linux/platform_data/media/si4713.h
new file mode 100644
index 000000000000..932668ad54f7
--- /dev/null
+++ b/include/linux/platform_data/media/si4713.h
@@ -0,0 +1,48 @@
1/*
2 * include/linux/platform_data/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 */
25struct si4713_platform_data {
26 bool is_platform_device;
27};
28
29/*
30 * Structure to query for Received Noise Level (RNL).
31 */
32struct 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/linux/platform_data/media/sii9234.h b/include/linux/platform_data/media/sii9234.h
new file mode 100644
index 000000000000..6a4a809fe9a3
--- /dev/null
+++ b/include/linux/platform_data/media/sii9234.h
@@ -0,0 +1,24 @@
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
20struct sii9234_platform_data {
21 int gpio_n_reset;
22};
23
24#endif /* SII9234_H */
diff --git a/include/linux/platform_data/media/soc_camera_platform.h b/include/linux/platform_data/media/soc_camera_platform.h
new file mode 100644
index 000000000000..1e5065dab430
--- /dev/null
+++ b/include/linux/platform_data/media/soc_camera_platform.h
@@ -0,0 +1,83 @@
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
18struct device;
19
20struct 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
30static inline void soc_camera_platform_release(struct platform_device **pdev)
31{
32 *pdev = NULL;
33}
34
35static 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
71static 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/linux/platform_data/media/timb_radio.h b/include/linux/platform_data/media/timb_radio.h
new file mode 100644
index 000000000000..a40a6a348d21
--- /dev/null
+++ b/include/linux/platform_data/media/timb_radio.h
@@ -0,0 +1,30 @@
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
24struct 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/linux/platform_data/media/timb_video.h b/include/linux/platform_data/media/timb_video.h
new file mode 100644
index 000000000000..70ae43970a49
--- /dev/null
+++ b/include/linux/platform_data/media/timb_video.h
@@ -0,0 +1,33 @@
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
24struct 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