[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>
This commit is contained in:
23
include/linux/platform_data/media/gpio-ir-recv.h
Normal file
23
include/linux/platform_data/media/gpio-ir-recv.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __GPIO_IR_RECV_H__
|
||||
#define __GPIO_IR_RECV_H__
|
||||
|
||||
struct gpio_ir_recv_platform_data {
|
||||
int gpio_nr;
|
||||
bool active_low;
|
||||
u64 allowed_protos;
|
||||
const char *map_name;
|
||||
};
|
||||
|
||||
#endif /* __GPIO_IR_RECV_H__ */
|
10
include/linux/platform_data/media/ir-rx51.h
Normal file
10
include/linux/platform_data/media/ir-rx51.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef _LIRC_RX51_H
|
||||
#define _LIRC_RX51_H
|
||||
|
||||
struct lirc_rx51_platform_data {
|
||||
int pwm_timer;
|
||||
|
||||
int(*set_max_mpu_wakeup_lat)(struct device *dev, long t);
|
||||
};
|
||||
|
||||
#endif
|
9
include/linux/platform_data/media/mmp-camera.h
Normal file
9
include/linux/platform_data/media/mmp-camera.h
Normal file
@@ -0,0 +1,9 @@
|
||||
/*
|
||||
* Information for the Marvell Armada MMP camera
|
||||
*/
|
||||
|
||||
struct mmp_camera_platform_data {
|
||||
struct platform_device *i2c_device;
|
||||
int sensor_power_gpio;
|
||||
int sensor_reset_gpio;
|
||||
};
|
35
include/linux/platform_data/media/omap1_camera.h
Normal file
35
include/linux/platform_data/media/omap1_camera.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Header for V4L2 SoC Camera driver for OMAP1 Camera Interface
|
||||
*
|
||||
* Copyright (C) 2010, Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __MEDIA_OMAP1_CAMERA_H_
|
||||
#define __MEDIA_OMAP1_CAMERA_H_
|
||||
|
||||
#include <linux/bitops.h>
|
||||
|
||||
#define OMAP1_CAMERA_IOSIZE 0x1c
|
||||
|
||||
enum omap1_cam_vb_mode {
|
||||
OMAP1_CAM_DMA_CONTIG = 0,
|
||||
OMAP1_CAM_DMA_SG,
|
||||
};
|
||||
|
||||
#define OMAP1_CAMERA_MIN_BUF_COUNT(x) ((x) == OMAP1_CAM_DMA_CONTIG ? 3 : 2)
|
||||
|
||||
struct omap1_cam_platform_data {
|
||||
unsigned long camexclk_khz;
|
||||
unsigned long lclk_khz_max;
|
||||
unsigned long flags;
|
||||
};
|
||||
|
||||
#define OMAP1_CAMERA_LCLK_RISING BIT(0)
|
||||
#define OMAP1_CAMERA_RST_LOW BIT(1)
|
||||
#define OMAP1_CAMERA_RST_HIGH BIT(2)
|
||||
|
||||
#endif /* __MEDIA_OMAP1_CAMERA_H_ */
|
65
include/linux/platform_data/media/omap4iss.h
Normal file
65
include/linux/platform_data/media/omap4iss.h
Normal file
@@ -0,0 +1,65 @@
|
||||
#ifndef ARCH_ARM_PLAT_OMAP4_ISS_H
|
||||
#define ARCH_ARM_PLAT_OMAP4_ISS_H
|
||||
|
||||
#include <linux/i2c.h>
|
||||
|
||||
struct iss_device;
|
||||
|
||||
enum iss_interface_type {
|
||||
ISS_INTERFACE_CSI2A_PHY1,
|
||||
ISS_INTERFACE_CSI2B_PHY2,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iss_csiphy_lane: CSI2 lane position and polarity
|
||||
* @pos: position of the lane
|
||||
* @pol: polarity of the lane
|
||||
*/
|
||||
struct iss_csiphy_lane {
|
||||
u8 pos;
|
||||
u8 pol;
|
||||
};
|
||||
|
||||
#define ISS_CSIPHY1_NUM_DATA_LANES 4
|
||||
#define ISS_CSIPHY2_NUM_DATA_LANES 1
|
||||
|
||||
/**
|
||||
* struct iss_csiphy_lanes_cfg - CSI2 lane configuration
|
||||
* @data: Configuration of one or two data lanes
|
||||
* @clk: Clock lane configuration
|
||||
*/
|
||||
struct iss_csiphy_lanes_cfg {
|
||||
struct iss_csiphy_lane data[ISS_CSIPHY1_NUM_DATA_LANES];
|
||||
struct iss_csiphy_lane clk;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iss_csi2_platform_data - CSI2 interface platform data
|
||||
* @crc: Enable the cyclic redundancy check
|
||||
* @vpclk_div: Video port output clock control
|
||||
*/
|
||||
struct iss_csi2_platform_data {
|
||||
unsigned crc:1;
|
||||
unsigned vpclk_div:2;
|
||||
struct iss_csiphy_lanes_cfg lanecfg;
|
||||
};
|
||||
|
||||
struct iss_subdev_i2c_board_info {
|
||||
struct i2c_board_info *board_info;
|
||||
int i2c_adapter_id;
|
||||
};
|
||||
|
||||
struct iss_v4l2_subdevs_group {
|
||||
struct iss_subdev_i2c_board_info *subdevs;
|
||||
enum iss_interface_type interface;
|
||||
union {
|
||||
struct iss_csi2_platform_data csi2;
|
||||
} bus; /* gcc < 4.6.0 chokes on anonymous union initializers */
|
||||
};
|
||||
|
||||
struct iss_platform_data {
|
||||
struct iss_v4l2_subdevs_group *subdevs;
|
||||
void (*set_constraints)(struct iss_device *iss, bool enable);
|
||||
};
|
||||
|
||||
#endif
|
36
include/linux/platform_data/media/s5p_hdmi.h
Normal file
36
include/linux/platform_data/media/s5p_hdmi.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Driver header for S5P HDMI chip.
|
||||
*
|
||||
* Copyright (c) 2011 Samsung Electronics, Co. Ltd
|
||||
* Contact: Tomasz Stanislawski <t.stanislaws@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef S5P_HDMI_H
|
||||
#define S5P_HDMI_H
|
||||
|
||||
struct i2c_board_info;
|
||||
|
||||
/**
|
||||
* @hdmiphy_bus: controller id for HDMIPHY bus
|
||||
* @hdmiphy_info: template for HDMIPHY I2C device
|
||||
* @mhl_bus: controller id for MHL control bus
|
||||
* @mhl_info: template for MHL I2C device
|
||||
* @hpd_gpio: GPIO for Hot-Plug-Detect pin
|
||||
*
|
||||
* NULL pointer for *_info fields indicates that
|
||||
* the corresponding chip is not present
|
||||
*/
|
||||
struct s5p_hdmi_platform_data {
|
||||
int hdmiphy_bus;
|
||||
struct i2c_board_info *hdmiphy_info;
|
||||
int mhl_bus;
|
||||
struct i2c_board_info *mhl_info;
|
||||
int hpd_gpio;
|
||||
};
|
||||
|
||||
#endif /* S5P_HDMI_H */
|
48
include/linux/platform_data/media/si4713.h
Normal file
48
include/linux/platform_data/media/si4713.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* include/linux/platform_data/media/si4713.h
|
||||
*
|
||||
* Board related data definitions for Si4713 i2c device driver.
|
||||
*
|
||||
* Copyright (c) 2009 Nokia Corporation
|
||||
* Contact: Eduardo Valentin <eduardo.valentin@nokia.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public License
|
||||
* version 2. This program is licensed "as is" without any warranty of any
|
||||
* kind, whether express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SI4713_H
|
||||
#define SI4713_H
|
||||
|
||||
/* The SI4713 I2C sensor chip has a fixed slave address of 0xc6 or 0x22. */
|
||||
#define SI4713_I2C_ADDR_BUSEN_HIGH 0x63
|
||||
#define SI4713_I2C_ADDR_BUSEN_LOW 0x11
|
||||
|
||||
/*
|
||||
* Platform dependent definition
|
||||
*/
|
||||
struct si4713_platform_data {
|
||||
bool is_platform_device;
|
||||
};
|
||||
|
||||
/*
|
||||
* Structure to query for Received Noise Level (RNL).
|
||||
*/
|
||||
struct si4713_rnl {
|
||||
__u32 index; /* modulator index */
|
||||
__u32 frequency; /* frequency to peform rnl measurement */
|
||||
__s32 rnl; /* result of measurement in dBuV */
|
||||
__u32 reserved[4]; /* drivers and apps must init this to 0 */
|
||||
};
|
||||
|
||||
/*
|
||||
* This is the ioctl number to query for rnl. Users must pass a
|
||||
* struct si4713_rnl pointer specifying desired frequency in 'frequency' field
|
||||
* following driver capabilities (i.e V4L2_TUNER_CAP_LOW).
|
||||
* Driver must return measured value in the same struture, filling 'rnl' field.
|
||||
*/
|
||||
#define SI4713_IOC_MEASURE_RNL _IOWR('V', BASE_VIDIOC_PRIVATE + 0, \
|
||||
struct si4713_rnl)
|
||||
|
||||
#endif /* ifndef SI4713_H*/
|
24
include/linux/platform_data/media/sii9234.h
Normal file
24
include/linux/platform_data/media/sii9234.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Driver header for SII9234 MHL converter chip.
|
||||
*
|
||||
* Copyright (c) 2011 Samsung Electronics, Co. Ltd
|
||||
* Contact: Tomasz Stanislawski <t.stanislaws@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef SII9234_H
|
||||
#define SII9234_H
|
||||
|
||||
/**
|
||||
* @gpio_n_reset: GPIO driving nRESET pin
|
||||
*/
|
||||
|
||||
struct sii9234_platform_data {
|
||||
int gpio_n_reset;
|
||||
};
|
||||
|
||||
#endif /* SII9234_H */
|
83
include/linux/platform_data/media/soc_camera_platform.h
Normal file
83
include/linux/platform_data/media/soc_camera_platform.h
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Generic Platform Camera Driver Header
|
||||
*
|
||||
* Copyright (C) 2008 Magnus Damm
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __SOC_CAMERA_H__
|
||||
#define __SOC_CAMERA_H__
|
||||
|
||||
#include <linux/videodev2.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <media/v4l2-mediabus.h>
|
||||
|
||||
struct device;
|
||||
|
||||
struct soc_camera_platform_info {
|
||||
const char *format_name;
|
||||
unsigned long format_depth;
|
||||
struct v4l2_mbus_framefmt format;
|
||||
unsigned long mbus_param;
|
||||
enum v4l2_mbus_type mbus_type;
|
||||
struct soc_camera_device *icd;
|
||||
int (*set_capture)(struct soc_camera_platform_info *info, int enable);
|
||||
};
|
||||
|
||||
static inline void soc_camera_platform_release(struct platform_device **pdev)
|
||||
{
|
||||
*pdev = NULL;
|
||||
}
|
||||
|
||||
static inline int soc_camera_platform_add(struct soc_camera_device *icd,
|
||||
struct platform_device **pdev,
|
||||
struct soc_camera_link *plink,
|
||||
void (*release)(struct device *dev),
|
||||
int id)
|
||||
{
|
||||
struct soc_camera_subdev_desc *ssdd =
|
||||
(struct soc_camera_subdev_desc *)plink;
|
||||
struct soc_camera_platform_info *info = ssdd->drv_priv;
|
||||
int ret;
|
||||
|
||||
if (&icd->sdesc->subdev_desc != ssdd)
|
||||
return -ENODEV;
|
||||
|
||||
if (*pdev)
|
||||
return -EBUSY;
|
||||
|
||||
*pdev = platform_device_alloc("soc_camera_platform", id);
|
||||
if (!*pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
info->icd = icd;
|
||||
|
||||
(*pdev)->dev.platform_data = info;
|
||||
(*pdev)->dev.release = release;
|
||||
|
||||
ret = platform_device_add(*pdev);
|
||||
if (ret < 0) {
|
||||
platform_device_put(*pdev);
|
||||
*pdev = NULL;
|
||||
info->icd = NULL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void soc_camera_platform_del(const struct soc_camera_device *icd,
|
||||
struct platform_device *pdev,
|
||||
const struct soc_camera_link *plink)
|
||||
{
|
||||
const struct soc_camera_subdev_desc *ssdd =
|
||||
(const struct soc_camera_subdev_desc *)plink;
|
||||
if (&icd->sdesc->subdev_desc != ssdd || !pdev)
|
||||
return;
|
||||
|
||||
platform_device_unregister(pdev);
|
||||
}
|
||||
|
||||
#endif /* __SOC_CAMERA_H__ */
|
30
include/linux/platform_data/media/timb_radio.h
Normal file
30
include/linux/platform_data/media/timb_radio.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* timb_radio.h Platform struct for the Timberdale radio driver
|
||||
* Copyright (c) 2009 Intel Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef _TIMB_RADIO_
|
||||
#define _TIMB_RADIO_ 1
|
||||
|
||||
#include <linux/i2c.h>
|
||||
|
||||
struct timb_radio_platform_data {
|
||||
int i2c_adapter; /* I2C adapter where the tuner and dsp are attached */
|
||||
struct i2c_board_info *tuner;
|
||||
struct i2c_board_info *dsp;
|
||||
};
|
||||
|
||||
#endif
|
33
include/linux/platform_data/media/timb_video.h
Normal file
33
include/linux/platform_data/media/timb_video.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* timb_video.h Platform struct for the Timberdale video driver
|
||||
* Copyright (c) 2009-2010 Intel Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef _TIMB_VIDEO_
|
||||
#define _TIMB_VIDEO_ 1
|
||||
|
||||
#include <linux/i2c.h>
|
||||
|
||||
struct timb_video_platform_data {
|
||||
int dma_channel;
|
||||
int i2c_adapter; /* The I2C adapter where the encoder is attached */
|
||||
struct {
|
||||
const char *module_name;
|
||||
struct i2c_board_info *info;
|
||||
} encoder;
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user