Merge tag 'br-v6.2i' of git://linuxtv.org/hverkuil/media_tree into media_stage
Tag branch Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> * tag 'br-v6.2i' of git://linuxtv.org/hverkuil/media_tree: (31 commits) media: s5c73m3: Switch to GPIO descriptors media: i2c: s5k5baf: switch to using gpiod API media: i2c: s5k6a3: switch to using gpiod API media: imx: remove code for non-existing config IMX_GPT_ICAP media: si470x: Fix use-after-free in si470x_int_in_callback() media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies media: coda: Add check for kmalloc media: coda: Add check for dcoda_iram_alloc dt-bindings: media: s5c73m3: Fix reset-gpio descriptor media: dt-bindings: allwinner: h6-vpu-g2: Add IOMMU reference property media: s5k4ecgx: Delete driver media: s5k4ecgx: Switch to GPIO descriptors media: Switch to use dev_err_probe() helper headers: Remove some left-over license text in include/uapi/linux/v4l2-* headers: Remove some left-over license text in include/uapi/linux/dvb/ media: usb: pwc-uncompress: Use flex array destination for memcpy() media: s5p-mfc: Fix to handle reference queue during finishing media: s5p-mfc: Clear workbit to handle error condition media: s5p-mfc: Fix in register read and write for H264 media: imx: Use get_mbus_config instead of parsing upstream DT endpoints ...
This commit is contained in:
Коммит
3178804c64
|
@ -36,6 +36,9 @@ properties:
|
|||
resets:
|
||||
maxItems: 1
|
||||
|
||||
iommus:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
@ -43,6 +46,7 @@ required:
|
|||
- clocks
|
||||
- clock-names
|
||||
- resets
|
||||
- iommus
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
|
@ -59,6 +63,7 @@ examples:
|
|||
clocks = <&ccu CLK_BUS_VP9>, <&ccu CLK_VP9>;
|
||||
clock-names = "bus", "mod";
|
||||
resets = <&ccu RST_BUS_VP9>;
|
||||
iommus = <&iommu 5>;
|
||||
};
|
||||
|
||||
...
|
||||
|
|
|
@ -76,7 +76,7 @@ i2c@138a000000 {
|
|||
clock-frequency = <24000000>;
|
||||
clocks = <&clk 0>;
|
||||
clock-names = "cis_extclk";
|
||||
reset-gpios = <&gpf1 3 1>;
|
||||
xshutdown-gpios = <&gpf1 3 1>;
|
||||
standby-gpios = <&gpm0 1 1>;
|
||||
port {
|
||||
s5c73m3_ep: endpoint {
|
||||
|
|
|
@ -145,9 +145,10 @@ properties:
|
|||
|
||||
pclk-sample:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [ 0, 1 ]
|
||||
enum: [ 0, 1, 2 ]
|
||||
description:
|
||||
Sample data on rising (1) or falling (0) edge of the pixel clock signal.
|
||||
Sample data on falling (0), rising (1) or both (2) edges of the pixel
|
||||
clock signal.
|
||||
|
||||
sync-on-green-active:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
|
|
@ -182,7 +182,7 @@ config MEDIA_CONTROLLER
|
|||
#
|
||||
|
||||
config DVB_CORE
|
||||
tristate
|
||||
tristate "DVB Core"
|
||||
depends on MEDIA_DIGITAL_TV_SUPPORT
|
||||
depends on (I2C || I2C=n)
|
||||
default MEDIA_DIGITAL_TV_SUPPORT
|
||||
|
|
|
@ -288,12 +288,9 @@ static int stm32_cec_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
|
||||
cec->clk_cec = devm_clk_get(&pdev->dev, "cec");
|
||||
if (IS_ERR(cec->clk_cec)) {
|
||||
if (PTR_ERR(cec->clk_cec) != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "Cannot get cec clock\n");
|
||||
|
||||
return PTR_ERR(cec->clk_cec);
|
||||
}
|
||||
if (IS_ERR(cec->clk_cec))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(cec->clk_cec),
|
||||
"Cannot get cec clock\n");
|
||||
|
||||
ret = clk_prepare(cec->clk_cec);
|
||||
if (ret) {
|
||||
|
|
|
@ -751,16 +751,6 @@ config VIDEO_S5C73M3
|
|||
This is a V4L2 sensor driver for Samsung S5C73M3
|
||||
8 Mpixel camera.
|
||||
|
||||
config VIDEO_S5K4ECGX
|
||||
tristate "Samsung S5K4ECGX sensor support"
|
||||
depends on I2C && VIDEO_DEV
|
||||
select MEDIA_CONTROLLER
|
||||
select VIDEO_V4L2_SUBDEV_API
|
||||
select CRC32
|
||||
help
|
||||
This is a V4L2 sensor driver for Samsung S5K4ECGX 5M
|
||||
camera sensor with an embedded SoC image signal processor.
|
||||
|
||||
config VIDEO_S5K5BAF
|
||||
tristate "Samsung S5K5BAF sensor support"
|
||||
depends on I2C && VIDEO_DEV
|
||||
|
|
|
@ -105,7 +105,6 @@ obj-$(CONFIG_VIDEO_RDACM20) += rdacm20.o
|
|||
obj-$(CONFIG_VIDEO_RDACM21) += rdacm21.o
|
||||
obj-$(CONFIG_VIDEO_RJ54N1) += rj54n1cb0c.o
|
||||
obj-$(CONFIG_VIDEO_S5C73M3) += s5c73m3/
|
||||
obj-$(CONFIG_VIDEO_S5K4ECGX) += s5k4ecgx.o
|
||||
obj-$(CONFIG_VIDEO_S5K5BAF) += s5k5baf.o
|
||||
obj-$(CONFIG_VIDEO_S5K6A3) += s5k6a3.o
|
||||
obj-$(CONFIG_VIDEO_S5K6AA) += s5k6aa.o
|
||||
|
|
|
@ -300,21 +300,15 @@ static int ad5820_probe(struct i2c_client *client)
|
|||
return -ENOMEM;
|
||||
|
||||
coil->vana = devm_regulator_get(&client->dev, "VANA");
|
||||
if (IS_ERR(coil->vana)) {
|
||||
ret = PTR_ERR(coil->vana);
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(&client->dev, "could not get regulator for vana\n");
|
||||
return ret;
|
||||
}
|
||||
if (IS_ERR(coil->vana))
|
||||
return dev_err_probe(&client->dev, PTR_ERR(coil->vana),
|
||||
"could not get regulator for vana\n");
|
||||
|
||||
coil->enable_gpio = devm_gpiod_get_optional(&client->dev, "enable",
|
||||
GPIOD_OUT_LOW);
|
||||
if (IS_ERR(coil->enable_gpio)) {
|
||||
ret = PTR_ERR(coil->enable_gpio);
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(&client->dev, "could not get enable gpio\n");
|
||||
return ret;
|
||||
}
|
||||
if (IS_ERR(coil->enable_gpio))
|
||||
return dev_err_probe(&client->dev, PTR_ERR(coil->enable_gpio),
|
||||
"could not get enable gpio\n");
|
||||
|
||||
mutex_init(&coil->power_lock);
|
||||
|
||||
|
|
|
@ -2060,9 +2060,8 @@ static int imx274_probe(struct i2c_client *client)
|
|||
imx274->reset_gpio = devm_gpiod_get_optional(dev, "reset",
|
||||
GPIOD_OUT_HIGH);
|
||||
if (IS_ERR(imx274->reset_gpio)) {
|
||||
if (PTR_ERR(imx274->reset_gpio) != -EPROBE_DEFER)
|
||||
dev_err(dev, "Reset GPIO not setup in DT");
|
||||
ret = PTR_ERR(imx274->reset_gpio);
|
||||
ret = dev_err_probe(dev, PTR_ERR(imx274->reset_gpio),
|
||||
"Reset GPIO not setup in DT\n");
|
||||
goto err_me;
|
||||
}
|
||||
|
||||
|
|
|
@ -665,7 +665,7 @@ static int isl7998x_set_standard(struct isl7998x *isl7998x, v4l2_std_id norm)
|
|||
static int isl7998x_init(struct isl7998x *isl7998x)
|
||||
{
|
||||
const unsigned int lanes = isl7998x->nr_mipi_lanes;
|
||||
const u32 isl7998x_video_in_chan_map[] = { 0x00, 0x11, 0x02, 0x02 };
|
||||
static const u32 isl7998x_video_in_chan_map[] = { 0x00, 0x11, 0x02, 0x02 };
|
||||
const struct reg_sequence isl7998x_init_seq_custom[] = {
|
||||
{ ISL7998X_REG_P0_VIDEO_IN_CHAN_CTL,
|
||||
isl7998x_video_in_chan_map[isl7998x->nr_inputs - 1] },
|
||||
|
|
|
@ -10,12 +10,11 @@
|
|||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/media.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/of_graph.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/sizes.h>
|
||||
|
@ -1347,24 +1346,6 @@ static int s5c73m3_oif_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int s5c73m3_gpio_set_value(struct s5c73m3 *priv, int id, u32 val)
|
||||
{
|
||||
if (!gpio_is_valid(priv->gpio[id].gpio))
|
||||
return 0;
|
||||
gpio_set_value(priv->gpio[id].gpio, !!val);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int s5c73m3_gpio_assert(struct s5c73m3 *priv, int id)
|
||||
{
|
||||
return s5c73m3_gpio_set_value(priv, id, priv->gpio[id].level);
|
||||
}
|
||||
|
||||
static int s5c73m3_gpio_deassert(struct s5c73m3 *priv, int id)
|
||||
{
|
||||
return s5c73m3_gpio_set_value(priv, id, !priv->gpio[id].level);
|
||||
}
|
||||
|
||||
static int __s5c73m3_power_on(struct s5c73m3 *state)
|
||||
{
|
||||
int i, ret;
|
||||
|
@ -1386,10 +1367,9 @@ static int __s5c73m3_power_on(struct s5c73m3 *state)
|
|||
v4l2_dbg(1, s5c73m3_dbg, &state->oif_sd, "clock frequency: %ld\n",
|
||||
clk_get_rate(state->clock));
|
||||
|
||||
s5c73m3_gpio_deassert(state, STBY);
|
||||
gpiod_set_value(state->stby, 0);
|
||||
usleep_range(100, 200);
|
||||
|
||||
s5c73m3_gpio_deassert(state, RSET);
|
||||
gpiod_set_value(state->reset, 0);
|
||||
usleep_range(50, 100);
|
||||
|
||||
return 0;
|
||||
|
@ -1404,11 +1384,10 @@ static int __s5c73m3_power_off(struct s5c73m3 *state)
|
|||
{
|
||||
int i, ret;
|
||||
|
||||
if (s5c73m3_gpio_assert(state, RSET))
|
||||
usleep_range(10, 50);
|
||||
|
||||
if (s5c73m3_gpio_assert(state, STBY))
|
||||
usleep_range(100, 200);
|
||||
gpiod_set_value(state->reset, 1);
|
||||
usleep_range(10, 50);
|
||||
gpiod_set_value(state->stby, 1);
|
||||
usleep_range(100, 200);
|
||||
|
||||
clk_disable_unprepare(state->clock);
|
||||
|
||||
|
@ -1543,58 +1522,10 @@ static const struct v4l2_subdev_ops oif_subdev_ops = {
|
|||
.video = &s5c73m3_oif_video_ops,
|
||||
};
|
||||
|
||||
static int s5c73m3_configure_gpios(struct s5c73m3 *state)
|
||||
{
|
||||
static const char * const gpio_names[] = {
|
||||
"S5C73M3_STBY", "S5C73M3_RST"
|
||||
};
|
||||
struct i2c_client *c = state->i2c_client;
|
||||
struct s5c73m3_gpio *g = state->gpio;
|
||||
int ret, i;
|
||||
|
||||
for (i = 0; i < GPIO_NUM; ++i) {
|
||||
unsigned int flags = GPIOF_DIR_OUT;
|
||||
if (g[i].level)
|
||||
flags |= GPIOF_INIT_HIGH;
|
||||
ret = devm_gpio_request_one(&c->dev, g[i].gpio, flags,
|
||||
gpio_names[i]);
|
||||
if (ret) {
|
||||
v4l2_err(c, "failed to request gpio %s\n",
|
||||
gpio_names[i]);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int s5c73m3_parse_gpios(struct s5c73m3 *state)
|
||||
{
|
||||
static const char * const prop_names[] = {
|
||||
"standby-gpios", "xshutdown-gpios",
|
||||
};
|
||||
struct device *dev = &state->i2c_client->dev;
|
||||
struct device_node *node = dev->of_node;
|
||||
int ret, i;
|
||||
|
||||
for (i = 0; i < GPIO_NUM; ++i) {
|
||||
enum of_gpio_flags of_flags;
|
||||
|
||||
ret = of_get_named_gpio_flags(node, prop_names[i],
|
||||
0, &of_flags);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to parse %s DT property\n",
|
||||
prop_names[i]);
|
||||
return -EINVAL;
|
||||
}
|
||||
state->gpio[i].gpio = ret;
|
||||
state->gpio[i].level = !(of_flags & OF_GPIO_ACTIVE_LOW);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int s5c73m3_get_platform_data(struct s5c73m3 *state)
|
||||
{
|
||||
struct device *dev = &state->i2c_client->dev;
|
||||
struct i2c_client *c = state->i2c_client;
|
||||
struct device *dev = &c->dev;
|
||||
const struct s5c73m3_platform_data *pdata = dev->platform_data;
|
||||
struct device_node *node = dev->of_node;
|
||||
struct device_node *node_ep;
|
||||
|
@ -1608,8 +1539,6 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
|
|||
}
|
||||
|
||||
state->mclk_frequency = pdata->mclk_frequency;
|
||||
state->gpio[STBY] = pdata->gpio_stby;
|
||||
state->gpio[RSET] = pdata->gpio_reset;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1624,9 +1553,17 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
|
|||
state->mclk_frequency);
|
||||
}
|
||||
|
||||
ret = s5c73m3_parse_gpios(state);
|
||||
if (ret < 0)
|
||||
return -EINVAL;
|
||||
/* Request GPIO lines asserted */
|
||||
state->stby = devm_gpiod_get(dev, "standby", GPIOD_OUT_HIGH);
|
||||
if (IS_ERR(state->stby))
|
||||
return dev_err_probe(dev, PTR_ERR(state->stby),
|
||||
"failed to request gpio S5C73M3_STBY\n");
|
||||
gpiod_set_consumer_name(state->stby, "S5C73M3_STBY");
|
||||
state->reset = devm_gpiod_get(dev, "xshutdown", GPIOD_OUT_HIGH);
|
||||
if (IS_ERR(state->reset))
|
||||
return dev_err_probe(dev, PTR_ERR(state->reset),
|
||||
"failed to request gpio S5C73M3_RST\n");
|
||||
gpiod_set_consumer_name(state->reset, "S5C73M3_RST");
|
||||
|
||||
node_ep = of_graph_get_next_endpoint(node, NULL);
|
||||
if (!node_ep) {
|
||||
|
@ -1708,10 +1645,6 @@ static int s5c73m3_probe(struct i2c_client *client)
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = s5c73m3_configure_gpios(state);
|
||||
if (ret)
|
||||
goto out_err;
|
||||
|
||||
for (i = 0; i < S5C73M3_MAX_SUPPLIES; i++)
|
||||
state->supplies[i].supply = s5c73m3_supply_names[i];
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <linux/sizes.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/media.h>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <linux/clk.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ctrls.h>
|
||||
#include <media/v4l2-subdev.h>
|
||||
|
@ -351,12 +352,6 @@ struct s5c73m3_ctrls {
|
|||
struct v4l2_ctrl *scene_mode;
|
||||
};
|
||||
|
||||
enum s5c73m3_gpio_id {
|
||||
STBY,
|
||||
RSET,
|
||||
GPIO_NUM,
|
||||
};
|
||||
|
||||
enum s5c73m3_resolution_types {
|
||||
RES_ISP,
|
||||
RES_JPEG,
|
||||
|
@ -383,7 +378,8 @@ struct s5c73m3 {
|
|||
u32 i2c_read_address;
|
||||
|
||||
struct regulator_bulk_data supplies[S5C73M3_MAX_SUPPLIES];
|
||||
struct s5c73m3_gpio gpio[GPIO_NUM];
|
||||
struct gpio_desc *stby;
|
||||
struct gpio_desc *reset;
|
||||
|
||||
struct clk *clock;
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -13,11 +13,10 @@
|
|||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/media.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/of_graph.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/slab.h>
|
||||
|
@ -228,11 +227,6 @@ static const char * const s5k5baf_supply_names[] = {
|
|||
};
|
||||
#define S5K5BAF_NUM_SUPPLIES ARRAY_SIZE(s5k5baf_supply_names)
|
||||
|
||||
struct s5k5baf_gpio {
|
||||
int gpio;
|
||||
int level;
|
||||
};
|
||||
|
||||
enum s5k5baf_gpio_id {
|
||||
STBY,
|
||||
RSET,
|
||||
|
@ -284,7 +278,7 @@ struct s5k5baf_fw {
|
|||
};
|
||||
|
||||
struct s5k5baf {
|
||||
struct s5k5baf_gpio gpios[NUM_GPIOS];
|
||||
struct gpio_desc *gpios[NUM_GPIOS];
|
||||
enum v4l2_mbus_type bus_type;
|
||||
u8 nlanes;
|
||||
struct regulator_bulk_data supplies[S5K5BAF_NUM_SUPPLIES];
|
||||
|
@ -936,16 +930,12 @@ static void s5k5baf_hw_set_test_pattern(struct s5k5baf *state, int id)
|
|||
|
||||
static void s5k5baf_gpio_assert(struct s5k5baf *state, int id)
|
||||
{
|
||||
struct s5k5baf_gpio *gpio = &state->gpios[id];
|
||||
|
||||
gpio_set_value(gpio->gpio, gpio->level);
|
||||
gpiod_set_value_cansleep(state->gpios[id], 1);
|
||||
}
|
||||
|
||||
static void s5k5baf_gpio_deassert(struct s5k5baf *state, int id)
|
||||
{
|
||||
struct s5k5baf_gpio *gpio = &state->gpios[id];
|
||||
|
||||
gpio_set_value(gpio->gpio, !gpio->level);
|
||||
gpiod_set_value_cansleep(state->gpios[id], 0);
|
||||
}
|
||||
|
||||
static int s5k5baf_power_on(struct s5k5baf *state)
|
||||
|
@ -1799,44 +1789,30 @@ static const struct v4l2_subdev_ops s5k5baf_subdev_ops = {
|
|||
|
||||
static int s5k5baf_configure_gpios(struct s5k5baf *state)
|
||||
{
|
||||
static const char * const name[] = { "S5K5BAF_STBY", "S5K5BAF_RST" };
|
||||
static const char * const name[] = { "stbyn", "rstn" };
|
||||
static const char * const label[] = { "S5K5BAF_STBY", "S5K5BAF_RST" };
|
||||
struct i2c_client *c = v4l2_get_subdevdata(&state->sd);
|
||||
struct s5k5baf_gpio *g = state->gpios;
|
||||
struct gpio_desc *gpio;
|
||||
int ret, i;
|
||||
|
||||
for (i = 0; i < NUM_GPIOS; ++i) {
|
||||
int flags = GPIOF_DIR_OUT;
|
||||
if (g[i].level)
|
||||
flags |= GPIOF_INIT_HIGH;
|
||||
ret = devm_gpio_request_one(&c->dev, g[i].gpio, flags, name[i]);
|
||||
if (ret < 0) {
|
||||
v4l2_err(c, "failed to request gpio %s\n", name[i]);
|
||||
gpio = devm_gpiod_get(&c->dev, name[i], GPIOD_OUT_HIGH);
|
||||
ret = PTR_ERR_OR_ZERO(gpio);
|
||||
if (ret) {
|
||||
v4l2_err(c, "failed to request gpio %s: %d\n",
|
||||
name[i], ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int s5k5baf_parse_gpios(struct s5k5baf_gpio *gpios, struct device *dev)
|
||||
{
|
||||
static const char * const names[] = {
|
||||
"stbyn-gpios",
|
||||
"rstn-gpios",
|
||||
};
|
||||
struct device_node *node = dev->of_node;
|
||||
enum of_gpio_flags flags;
|
||||
int ret, i;
|
||||
|
||||
for (i = 0; i < NUM_GPIOS; ++i) {
|
||||
ret = of_get_named_gpio_flags(node, names[i], 0, &flags);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "no %s GPIO pin provided\n", names[i]);
|
||||
ret = gpiod_set_consumer_name(gpio, label[i]);
|
||||
if (ret) {
|
||||
v4l2_err(c, "failed to set up name for gpio %s: %d\n",
|
||||
name[i], ret);
|
||||
return ret;
|
||||
}
|
||||
gpios[i].gpio = ret;
|
||||
gpios[i].level = !(flags & OF_GPIO_ACTIVE_LOW);
|
||||
}
|
||||
|
||||
state->gpios[i] = gpio;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1860,10 +1836,6 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
|
|||
state->mclk_frequency);
|
||||
}
|
||||
|
||||
ret = s5k5baf_parse_gpios(state->gpios, dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
node_ep = of_graph_get_next_endpoint(node, NULL);
|
||||
if (!node_ep) {
|
||||
dev_err(dev, "no endpoint defined at node %pOF\n", node);
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/slab.h>
|
||||
|
@ -59,7 +59,7 @@ struct s5k6a3 {
|
|||
struct v4l2_subdev subdev;
|
||||
struct media_pad pad;
|
||||
struct regulator_bulk_data supplies[S5K6A3_NUM_SUPPLIES];
|
||||
int gpio_reset;
|
||||
struct gpio_desc *gpio_reset;
|
||||
struct mutex lock;
|
||||
struct v4l2_mbus_framefmt format;
|
||||
struct clk *clock;
|
||||
|
@ -216,11 +216,11 @@ static int __s5k6a3_power_on(struct s5k6a3 *sensor)
|
|||
goto error_clk;
|
||||
}
|
||||
|
||||
gpio_set_value(sensor->gpio_reset, 1);
|
||||
gpiod_set_value_cansleep(sensor->gpio_reset, 0);
|
||||
usleep_range(600, 800);
|
||||
gpio_set_value(sensor->gpio_reset, 0);
|
||||
gpiod_set_value_cansleep(sensor->gpio_reset, 1);
|
||||
usleep_range(600, 800);
|
||||
gpio_set_value(sensor->gpio_reset, 1);
|
||||
gpiod_set_value_cansleep(sensor->gpio_reset, 0);
|
||||
|
||||
/* Delay needed for the sensor initialization */
|
||||
msleep(20);
|
||||
|
@ -240,7 +240,7 @@ static int __s5k6a3_power_off(struct s5k6a3 *sensor)
|
|||
{
|
||||
int i;
|
||||
|
||||
gpio_set_value(sensor->gpio_reset, 0);
|
||||
gpiod_set_value_cansleep(sensor->gpio_reset, 1);
|
||||
|
||||
for (i = S5K6A3_NUM_SUPPLIES - 1; i >= 0; i--)
|
||||
regulator_disable(sensor->supplies[i].consumer);
|
||||
|
@ -285,32 +285,24 @@ static int s5k6a3_probe(struct i2c_client *client)
|
|||
struct device *dev = &client->dev;
|
||||
struct s5k6a3 *sensor;
|
||||
struct v4l2_subdev *sd;
|
||||
int gpio, i, ret;
|
||||
int i, ret;
|
||||
|
||||
sensor = devm_kzalloc(dev, sizeof(*sensor), GFP_KERNEL);
|
||||
if (!sensor)
|
||||
return -ENOMEM;
|
||||
|
||||
mutex_init(&sensor->lock);
|
||||
sensor->gpio_reset = -EINVAL;
|
||||
sensor->clock = ERR_PTR(-EINVAL);
|
||||
sensor->dev = dev;
|
||||
|
||||
sensor->clock = devm_clk_get(sensor->dev, S5K6A3_CLK_NAME);
|
||||
if (IS_ERR(sensor->clock))
|
||||
return PTR_ERR(sensor->clock);
|
||||
|
||||
gpio = of_get_gpio_flags(dev->of_node, 0, NULL);
|
||||
if (!gpio_is_valid(gpio))
|
||||
return gpio;
|
||||
|
||||
ret = devm_gpio_request_one(dev, gpio, GPIOF_OUT_INIT_LOW,
|
||||
S5K6A3_DRV_NAME);
|
||||
if (ret < 0)
|
||||
sensor->gpio_reset = devm_gpiod_get(dev, NULL, GPIOD_OUT_HIGH);
|
||||
ret = PTR_ERR_OR_ZERO(sensor->gpio_reset);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
sensor->gpio_reset = gpio;
|
||||
|
||||
if (of_property_read_u32(dev->of_node, "clock-frequency",
|
||||
&sensor->clock_frequency)) {
|
||||
sensor->clock_frequency = S5K6A3_DEFAULT_CLK_FREQ;
|
||||
|
|
|
@ -1891,12 +1891,9 @@ static int tc358743_probe_of(struct tc358743_state *state)
|
|||
int ret;
|
||||
|
||||
refclk = devm_clk_get(dev, "refclk");
|
||||
if (IS_ERR(refclk)) {
|
||||
if (PTR_ERR(refclk) != -EPROBE_DEFER)
|
||||
dev_err(dev, "failed to get refclk: %ld\n",
|
||||
PTR_ERR(refclk));
|
||||
return PTR_ERR(refclk);
|
||||
}
|
||||
if (IS_ERR(refclk))
|
||||
return dev_err_probe(dev, PTR_ERR(refclk),
|
||||
"failed to get refclk\n");
|
||||
|
||||
ep = of_graph_get_next_endpoint(dev->of_node, NULL);
|
||||
if (!ep) {
|
||||
|
|
|
@ -707,18 +707,10 @@ static int pt3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
|
||||
if (ret == 0)
|
||||
dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
|
||||
else {
|
||||
ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
|
||||
if (ret == 0)
|
||||
dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
|
||||
else {
|
||||
dev_err(&pdev->dev, "Failed to set DMA mask\n");
|
||||
return ret;
|
||||
}
|
||||
dev_info(&pdev->dev, "Use 32bit DMA\n");
|
||||
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to set DMA mask\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
pt3 = devm_kzalloc(&pdev->dev, sizeof(*pt3), GFP_KERNEL);
|
||||
|
|
|
@ -854,7 +854,7 @@ static void coda_setup_iram(struct coda_ctx *ctx)
|
|||
/* Only H.264BP and H.263P3 are considered */
|
||||
iram_info->buf_dbk_y_use = coda_iram_alloc(iram_info, w64);
|
||||
iram_info->buf_dbk_c_use = coda_iram_alloc(iram_info, w64);
|
||||
if (!iram_info->buf_dbk_c_use)
|
||||
if (!iram_info->buf_dbk_y_use || !iram_info->buf_dbk_c_use)
|
||||
goto out;
|
||||
iram_info->axi_sram_use |= dbk_bits;
|
||||
|
||||
|
@ -878,7 +878,7 @@ static void coda_setup_iram(struct coda_ctx *ctx)
|
|||
|
||||
iram_info->buf_dbk_y_use = coda_iram_alloc(iram_info, w128);
|
||||
iram_info->buf_dbk_c_use = coda_iram_alloc(iram_info, w128);
|
||||
if (!iram_info->buf_dbk_c_use)
|
||||
if (!iram_info->buf_dbk_y_use || !iram_info->buf_dbk_c_use)
|
||||
goto out;
|
||||
iram_info->axi_sram_use |= dbk_bits;
|
||||
|
||||
|
@ -1084,10 +1084,16 @@ static int coda_start_encoding(struct coda_ctx *ctx)
|
|||
}
|
||||
|
||||
if (dst_fourcc == V4L2_PIX_FMT_JPEG) {
|
||||
if (!ctx->params.jpeg_qmat_tab[0])
|
||||
if (!ctx->params.jpeg_qmat_tab[0]) {
|
||||
ctx->params.jpeg_qmat_tab[0] = kmalloc(64, GFP_KERNEL);
|
||||
if (!ctx->params.jpeg_qmat_tab[1])
|
||||
if (!ctx->params.jpeg_qmat_tab[0])
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (!ctx->params.jpeg_qmat_tab[1]) {
|
||||
ctx->params.jpeg_qmat_tab[1] = kmalloc(64, GFP_KERNEL);
|
||||
if (!ctx->params.jpeg_qmat_tab[1])
|
||||
return -ENOMEM;
|
||||
}
|
||||
coda_set_jpeg_compression_quality(ctx, ctx->params.jpeg_quality);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,9 +52,8 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
|
|||
for (i = 0; i < ARRAY_SIZE(comp->clk); i++) {
|
||||
comp->clk[i] = of_clk_get(node, i);
|
||||
if (IS_ERR(comp->clk[i])) {
|
||||
if (PTR_ERR(comp->clk[i]) != -EPROBE_DEFER)
|
||||
dev_err(dev, "Failed to get clock\n");
|
||||
ret = PTR_ERR(comp->clk[i]);
|
||||
ret = dev_err_probe(dev, PTR_ERR(comp->clk[i]),
|
||||
"Failed to get clock\n");
|
||||
goto put_dev;
|
||||
}
|
||||
|
||||
|
|
|
@ -1471,9 +1471,7 @@ static int fimc_md_probe(struct platform_device *pdev)
|
|||
|
||||
pinctrl = devm_pinctrl_get(dev);
|
||||
if (IS_ERR(pinctrl)) {
|
||||
ret = PTR_ERR(pinctrl);
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(dev, "Failed to get pinctrl: %d\n", ret);
|
||||
ret = dev_err_probe(dev, PTR_ERR(pinctrl), "Failed to get pinctrl\n");
|
||||
goto err_clk;
|
||||
}
|
||||
|
||||
|
|
|
@ -468,8 +468,10 @@ void s5p_mfc_close_mfc_inst(struct s5p_mfc_dev *dev, struct s5p_mfc_ctx *ctx)
|
|||
s5p_mfc_hw_call(dev->mfc_ops, try_run, dev);
|
||||
/* Wait until instance is returned or timeout occurred */
|
||||
if (s5p_mfc_wait_for_done_ctx(ctx,
|
||||
S5P_MFC_R2H_CMD_CLOSE_INSTANCE_RET, 0))
|
||||
S5P_MFC_R2H_CMD_CLOSE_INSTANCE_RET, 0)){
|
||||
clear_work_bit_irqsave(ctx);
|
||||
mfc_err("Err returning instance\n");
|
||||
}
|
||||
|
||||
/* Free resources */
|
||||
s5p_mfc_hw_call(dev->mfc_ops, release_codec_buffers, ctx);
|
||||
|
|
|
@ -1218,6 +1218,7 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)
|
|||
unsigned long mb_y_addr, mb_c_addr;
|
||||
int slice_type;
|
||||
unsigned int strm_size;
|
||||
bool src_ready;
|
||||
|
||||
slice_type = s5p_mfc_hw_call(dev->mfc_ops, get_enc_slice_type, dev);
|
||||
strm_size = s5p_mfc_hw_call(dev->mfc_ops, get_enc_strm_size, dev);
|
||||
|
@ -1257,7 +1258,8 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)
|
|||
}
|
||||
}
|
||||
}
|
||||
if ((ctx->src_queue_cnt > 0) && (ctx->state == MFCINST_RUNNING)) {
|
||||
if (ctx->src_queue_cnt > 0 && (ctx->state == MFCINST_RUNNING ||
|
||||
ctx->state == MFCINST_FINISHING)) {
|
||||
mb_entry = list_entry(ctx->src_queue.next, struct s5p_mfc_buf,
|
||||
list);
|
||||
if (mb_entry->flags & MFC_BUF_FLAG_USED) {
|
||||
|
@ -1288,7 +1290,13 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)
|
|||
vb2_set_plane_payload(&mb_entry->b->vb2_buf, 0, strm_size);
|
||||
vb2_buffer_done(&mb_entry->b->vb2_buf, VB2_BUF_STATE_DONE);
|
||||
}
|
||||
if ((ctx->src_queue_cnt == 0) || (ctx->dst_queue_cnt == 0))
|
||||
|
||||
src_ready = true;
|
||||
if (ctx->state == MFCINST_RUNNING && ctx->src_queue_cnt == 0)
|
||||
src_ready = false;
|
||||
if (ctx->state == MFCINST_FINISHING && ctx->ref_queue_cnt == 0)
|
||||
src_ready = false;
|
||||
if (!src_ready || ctx->dst_queue_cnt == 0)
|
||||
clear_work_bit(ctx);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1060,7 +1060,7 @@ static int s5p_mfc_set_enc_params_h264(struct s5p_mfc_ctx *ctx)
|
|||
}
|
||||
|
||||
/* aspect ratio VUI */
|
||||
readl(mfc_regs->e_h264_options);
|
||||
reg = readl(mfc_regs->e_h264_options);
|
||||
reg &= ~(0x1 << 5);
|
||||
reg |= ((p_h264->vui_sar & 0x1) << 5);
|
||||
writel(reg, mfc_regs->e_h264_options);
|
||||
|
@ -1083,7 +1083,7 @@ static int s5p_mfc_set_enc_params_h264(struct s5p_mfc_ctx *ctx)
|
|||
|
||||
/* intra picture period for H.264 open GOP */
|
||||
/* control */
|
||||
readl(mfc_regs->e_h264_options);
|
||||
reg = readl(mfc_regs->e_h264_options);
|
||||
reg &= ~(0x1 << 4);
|
||||
reg |= ((p_h264->open_gop & 0x1) << 4);
|
||||
writel(reg, mfc_regs->e_h264_options);
|
||||
|
@ -1097,23 +1097,23 @@ static int s5p_mfc_set_enc_params_h264(struct s5p_mfc_ctx *ctx)
|
|||
}
|
||||
|
||||
/* 'WEIGHTED_BI_PREDICTION' for B is disable */
|
||||
readl(mfc_regs->e_h264_options);
|
||||
reg = readl(mfc_regs->e_h264_options);
|
||||
reg &= ~(0x3 << 9);
|
||||
writel(reg, mfc_regs->e_h264_options);
|
||||
|
||||
/* 'CONSTRAINED_INTRA_PRED_ENABLE' is disable */
|
||||
readl(mfc_regs->e_h264_options);
|
||||
reg = readl(mfc_regs->e_h264_options);
|
||||
reg &= ~(0x1 << 14);
|
||||
writel(reg, mfc_regs->e_h264_options);
|
||||
|
||||
/* ASO */
|
||||
readl(mfc_regs->e_h264_options);
|
||||
reg = readl(mfc_regs->e_h264_options);
|
||||
reg &= ~(0x1 << 6);
|
||||
reg |= ((p_h264->aso & 0x1) << 6);
|
||||
writel(reg, mfc_regs->e_h264_options);
|
||||
|
||||
/* hier qp enable */
|
||||
readl(mfc_regs->e_h264_options);
|
||||
reg = readl(mfc_regs->e_h264_options);
|
||||
reg &= ~(0x1 << 8);
|
||||
reg |= ((p_h264->open_gop & 0x1) << 8);
|
||||
writel(reg, mfc_regs->e_h264_options);
|
||||
|
@ -1134,7 +1134,7 @@ static int s5p_mfc_set_enc_params_h264(struct s5p_mfc_ctx *ctx)
|
|||
writel(reg, mfc_regs->e_h264_num_t_layer);
|
||||
|
||||
/* frame packing SEI generation */
|
||||
readl(mfc_regs->e_h264_options);
|
||||
reg = readl(mfc_regs->e_h264_options);
|
||||
reg &= ~(0x1 << 25);
|
||||
reg |= ((p_h264->sei_frame_packing & 0x1) << 25);
|
||||
writel(reg, mfc_regs->e_h264_options);
|
||||
|
|
|
@ -927,6 +927,7 @@ static int configure_channels(struct c8sectpfei *fei)
|
|||
if (ret) {
|
||||
dev_err(fei->dev,
|
||||
"configure_memdma_and_inputblock failed\n");
|
||||
of_node_put(child);
|
||||
goto err_unmap;
|
||||
}
|
||||
index++;
|
||||
|
|
|
@ -1946,12 +1946,9 @@ static int dcmi_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
|
||||
dcmi->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
|
||||
if (IS_ERR(dcmi->rstc)) {
|
||||
if (PTR_ERR(dcmi->rstc) != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "Could not get reset control\n");
|
||||
|
||||
return PTR_ERR(dcmi->rstc);
|
||||
}
|
||||
if (IS_ERR(dcmi->rstc))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(dcmi->rstc),
|
||||
"Could not get reset control\n");
|
||||
|
||||
/* Get bus characteristics from devicetree */
|
||||
np = of_graph_get_next_endpoint(np, NULL);
|
||||
|
@ -2001,20 +1998,14 @@ static int dcmi_probe(struct platform_device *pdev)
|
|||
return PTR_ERR(dcmi->regs);
|
||||
|
||||
mclk = devm_clk_get(&pdev->dev, "mclk");
|
||||
if (IS_ERR(mclk)) {
|
||||
if (PTR_ERR(mclk) != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "Unable to get mclk\n");
|
||||
return PTR_ERR(mclk);
|
||||
}
|
||||
if (IS_ERR(mclk))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(mclk),
|
||||
"Unable to get mclk\n");
|
||||
|
||||
chan = dma_request_chan(&pdev->dev, "tx");
|
||||
if (IS_ERR(chan)) {
|
||||
ret = PTR_ERR(chan);
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to request DMA channel: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
if (IS_ERR(chan))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(chan),
|
||||
"Failed to request DMA channel\n");
|
||||
|
||||
dcmi->dma_max_burst = UINT_MAX;
|
||||
ret = dma_get_slave_caps(chan, &caps);
|
||||
|
|
|
@ -1884,8 +1884,7 @@ static int isp_initialize_modules(struct isp_device *isp)
|
|||
|
||||
ret = omap3isp_ccp2_init(isp);
|
||||
if (ret < 0) {
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(isp->dev, "CCP2 initialization failed\n");
|
||||
dev_err_probe(isp->dev, ret, "CCP2 initialization failed\n");
|
||||
goto error_ccp2;
|
||||
}
|
||||
|
||||
|
|
|
@ -976,11 +976,9 @@ static int xcsi2rxss_probe(struct platform_device *pdev)
|
|||
/* Reset GPIO */
|
||||
xcsi2rxss->rst_gpio = devm_gpiod_get_optional(dev, "video-reset",
|
||||
GPIOD_OUT_HIGH);
|
||||
if (IS_ERR(xcsi2rxss->rst_gpio)) {
|
||||
if (PTR_ERR(xcsi2rxss->rst_gpio) != -EPROBE_DEFER)
|
||||
dev_err(dev, "Video Reset GPIO not setup in DT");
|
||||
return PTR_ERR(xcsi2rxss->rst_gpio);
|
||||
}
|
||||
if (IS_ERR(xcsi2rxss->rst_gpio))
|
||||
return dev_err_probe(dev, PTR_ERR(xcsi2rxss->rst_gpio),
|
||||
"Video Reset GPIO not setup in DT\n");
|
||||
|
||||
ret = xcsi2rxss_parse_of(xcsi2rxss);
|
||||
if (ret < 0)
|
||||
|
|
|
@ -727,8 +727,10 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,
|
|||
|
||||
/* start radio */
|
||||
retval = si470x_start_usb(radio);
|
||||
if (retval < 0)
|
||||
if (retval < 0 && !radio->int_in_running)
|
||||
goto err_buf;
|
||||
else if (retval < 0) /* in case of radio->int_in_running == 1 */
|
||||
goto err_all;
|
||||
|
||||
/* set initial frequency */
|
||||
si470x_set_freq(radio, 87.5 * FREQ_MUL); /* available in all regions */
|
||||
|
|
|
@ -74,13 +74,9 @@ static int gpio_ir_recv_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
|
||||
gpio_dev->gpiod = devm_gpiod_get(dev, NULL, GPIOD_IN);
|
||||
if (IS_ERR(gpio_dev->gpiod)) {
|
||||
rc = PTR_ERR(gpio_dev->gpiod);
|
||||
/* Just try again if this happens */
|
||||
if (rc != -EPROBE_DEFER)
|
||||
dev_err(dev, "error getting gpio (%d)\n", rc);
|
||||
return rc;
|
||||
}
|
||||
if (IS_ERR(gpio_dev->gpiod))
|
||||
return dev_err_probe(dev, PTR_ERR(gpio_dev->gpiod),
|
||||
"error getting gpio\n");
|
||||
gpio_dev->irq = gpiod_to_irq(gpio_dev->gpiod);
|
||||
if (gpio_dev->irq < 0)
|
||||
return gpio_dev->irq;
|
||||
|
|
|
@ -174,12 +174,9 @@ static int gpio_ir_tx_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
|
||||
gpio_ir->gpio = devm_gpiod_get(&pdev->dev, NULL, GPIOD_OUT_LOW);
|
||||
if (IS_ERR(gpio_ir->gpio)) {
|
||||
if (PTR_ERR(gpio_ir->gpio) != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "Failed to get gpio (%ld)\n",
|
||||
PTR_ERR(gpio_ir->gpio));
|
||||
return PTR_ERR(gpio_ir->gpio);
|
||||
}
|
||||
if (IS_ERR(gpio_ir->gpio))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(gpio_ir->gpio),
|
||||
"Failed to get gpio\n");
|
||||
|
||||
rcdev->priv = gpio_ir;
|
||||
rcdev->driver_name = DRIVER_NAME;
|
||||
|
|
|
@ -231,13 +231,8 @@ static int ir_rx51_probe(struct platform_device *dev)
|
|||
struct rc_dev *rcdev;
|
||||
|
||||
pwm = pwm_get(&dev->dev, NULL);
|
||||
if (IS_ERR(pwm)) {
|
||||
int err = PTR_ERR(pwm);
|
||||
|
||||
if (err != -EPROBE_DEFER)
|
||||
dev_err(&dev->dev, "pwm_get failed: %d\n", err);
|
||||
return err;
|
||||
}
|
||||
if (IS_ERR(pwm))
|
||||
return dev_err_probe(&dev->dev, PTR_ERR(pwm), "pwm_get failed\n");
|
||||
|
||||
/* Use default, in case userspace does not set the carrier */
|
||||
ir_rx51.freq = DIV_ROUND_CLOSEST_ULL(pwm_get_period(pwm), NSEC_PER_SEC);
|
||||
|
|
|
@ -39,7 +39,7 @@ int pwc_decompress(struct pwc_device *pdev, struct pwc_frame_buf *fbuf)
|
|||
* first 3 bytes is filled (Nala case). We can
|
||||
* determine this using the type of the webcam */
|
||||
memcpy(raw_frame->cmd, pdev->cmd_buf, 4);
|
||||
memcpy(raw_frame+1, yuv, pdev->frame_size);
|
||||
memcpy(raw_frame->rawframe, yuv, pdev->frame_size);
|
||||
vb2_set_plane_payload(&fbuf->vb.vb2_buf, 0,
|
||||
struct_size(raw_frame, rawframe, pdev->frame_size));
|
||||
return 0;
|
||||
|
|
|
@ -1266,12 +1266,9 @@ static int uvc_gpio_parse(struct uvc_device *dev)
|
|||
return PTR_ERR_OR_ZERO(gpio_privacy);
|
||||
|
||||
irq = gpiod_to_irq(gpio_privacy);
|
||||
if (irq < 0) {
|
||||
if (irq != EPROBE_DEFER)
|
||||
dev_err(&dev->udev->dev,
|
||||
"No IRQ for privacy GPIO (%d)\n", irq);
|
||||
return irq;
|
||||
}
|
||||
if (irq < 0)
|
||||
return dev_err_probe(&dev->udev->dev, irq,
|
||||
"No IRQ for privacy GPIO\n");
|
||||
|
||||
unit = uvc_alloc_entity(UVC_EXT_GPIO_UNIT, UVC_EXT_GPIO_UNIT_ID, 0, 1);
|
||||
if (!unit)
|
||||
|
|
|
@ -298,10 +298,25 @@ v4l2_fwnode_endpoint_parse_parallel_bus(struct fwnode_handle *fwnode,
|
|||
|
||||
if (!fwnode_property_read_u32(fwnode, "pclk-sample", &v)) {
|
||||
flags &= ~(V4L2_MBUS_PCLK_SAMPLE_RISING |
|
||||
V4L2_MBUS_PCLK_SAMPLE_FALLING);
|
||||
flags |= v ? V4L2_MBUS_PCLK_SAMPLE_RISING :
|
||||
V4L2_MBUS_PCLK_SAMPLE_FALLING;
|
||||
pr_debug("pclk-sample %s\n", v ? "high" : "low");
|
||||
V4L2_MBUS_PCLK_SAMPLE_FALLING |
|
||||
V4L2_MBUS_PCLK_SAMPLE_DUALEDGE);
|
||||
switch (v) {
|
||||
case 0:
|
||||
flags |= V4L2_MBUS_PCLK_SAMPLE_FALLING;
|
||||
pr_debug("pclk-sample low\n");
|
||||
break;
|
||||
case 1:
|
||||
flags |= V4L2_MBUS_PCLK_SAMPLE_RISING;
|
||||
pr_debug("pclk-sample high\n");
|
||||
break;
|
||||
case 2:
|
||||
flags |= V4L2_MBUS_PCLK_SAMPLE_DUALEDGE;
|
||||
pr_debug("pclk-sample dual edge\n");
|
||||
break;
|
||||
default:
|
||||
pr_warn("invalid argument for pclk-sample");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!fwnode_property_read_u32(fwnode, "data-active", &v)) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
config VIDEO_STKWEBCAM
|
||||
tristate "USB Syntek DC1125 Camera support (DEPRECATED)"
|
||||
depends on VIDEO_DEV
|
||||
depends on USB
|
||||
depends on MEDIA_USB_SUPPORT && MEDIA_CAMERA_SUPPORT
|
||||
help
|
||||
Say Y here if you want to use this type of camera.
|
||||
Supported devices are typically found in some Asus laptops,
|
||||
|
|
|
@ -2,18 +2,6 @@
|
|||
- The Frame Interval Monitor could be exported to v4l2-core for
|
||||
general use.
|
||||
|
||||
- The CSI subdevice parses its nearest upstream neighbor's device-tree
|
||||
bus config in order to setup the CSI. Laurent Pinchart argues that
|
||||
instead the CSI subdev should call its neighbor's g_mbus_config op
|
||||
(which should be propagated if necessary) to get this info. However
|
||||
Hans Verkuil is planning to remove the g_mbus_config op. For now this
|
||||
driver uses the parsed DT bus config method until this issue is
|
||||
resolved.
|
||||
|
||||
2020-06: g_mbus has been removed in favour of the get_mbus_config pad
|
||||
operation which should be used to avoid parsing the remote endpoint
|
||||
configuration.
|
||||
|
||||
- This media driver supports inheriting V4L2 controls to the
|
||||
video capture devices, from the subdevices in the capture device's
|
||||
pipeline. The controls for each capture device are updated in the
|
||||
|
|
|
@ -97,8 +97,8 @@ struct csi_priv {
|
|||
/* the mipi virtual channel number at link validate */
|
||||
int vc_num;
|
||||
|
||||
/* the upstream endpoint CSI is receiving from */
|
||||
struct v4l2_fwnode_endpoint upstream_ep;
|
||||
/* media bus config of the upstream subdevice CSI is receiving from */
|
||||
struct v4l2_mbus_config mbus_cfg;
|
||||
|
||||
spinlock_t irqlock; /* protect eof_irq handler */
|
||||
struct timer_list eof_timeout_timer;
|
||||
|
@ -125,14 +125,14 @@ static inline struct csi_priv *notifier_to_dev(struct v4l2_async_notifier *n)
|
|||
return container_of(n, struct csi_priv, notifier);
|
||||
}
|
||||
|
||||
static inline bool is_parallel_bus(struct v4l2_fwnode_endpoint *ep)
|
||||
static inline bool is_parallel_bus(struct v4l2_mbus_config *mbus_cfg)
|
||||
{
|
||||
return ep->bus_type != V4L2_MBUS_CSI2_DPHY;
|
||||
return mbus_cfg->type != V4L2_MBUS_CSI2_DPHY;
|
||||
}
|
||||
|
||||
static inline bool is_parallel_16bit_bus(struct v4l2_fwnode_endpoint *ep)
|
||||
static inline bool is_parallel_16bit_bus(struct v4l2_mbus_config *mbus_cfg)
|
||||
{
|
||||
return is_parallel_bus(ep) && ep->bus.parallel.bus_width >= 16;
|
||||
return is_parallel_bus(mbus_cfg) && mbus_cfg->bus.parallel.bus_width >= 16;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -145,36 +145,31 @@ static inline bool is_parallel_16bit_bus(struct v4l2_fwnode_endpoint *ep)
|
|||
* - the CSI is receiving from an 8-bit parallel bus and the incoming
|
||||
* media bus format is other than UYVY8_2X8/YUYV8_2X8.
|
||||
*/
|
||||
static inline bool requires_passthrough(struct v4l2_fwnode_endpoint *ep,
|
||||
static inline bool requires_passthrough(struct v4l2_mbus_config *mbus_cfg,
|
||||
struct v4l2_mbus_framefmt *infmt,
|
||||
const struct imx_media_pixfmt *incc)
|
||||
{
|
||||
if (ep->bus_type == V4L2_MBUS_BT656) // including BT.1120
|
||||
if (mbus_cfg->type == V4L2_MBUS_BT656) // including BT.1120
|
||||
return false;
|
||||
|
||||
return incc->bayer || is_parallel_16bit_bus(ep) ||
|
||||
(is_parallel_bus(ep) &&
|
||||
return incc->bayer || is_parallel_16bit_bus(mbus_cfg) ||
|
||||
(is_parallel_bus(mbus_cfg) &&
|
||||
infmt->code != MEDIA_BUS_FMT_UYVY8_2X8 &&
|
||||
infmt->code != MEDIA_BUS_FMT_YUYV8_2X8);
|
||||
}
|
||||
|
||||
/*
|
||||
* Parses the fwnode endpoint from the source pad of the entity
|
||||
* connected to this CSI. This will either be the entity directly
|
||||
* upstream from the CSI-2 receiver, directly upstream from the
|
||||
* video mux, or directly upstream from the CSI itself. The endpoint
|
||||
* is needed to determine the bus type and bus config coming into
|
||||
* the CSI.
|
||||
* Queries the media bus config of the upstream entity that provides data to
|
||||
* the CSI. This will either be the entity directly upstream from the CSI-2
|
||||
* receiver, directly upstream from a video mux, or directly upstream from
|
||||
* the CSI itself.
|
||||
*/
|
||||
static int csi_get_upstream_endpoint(struct csi_priv *priv,
|
||||
struct v4l2_fwnode_endpoint *ep)
|
||||
static int csi_get_upstream_mbus_config(struct csi_priv *priv,
|
||||
struct v4l2_mbus_config *mbus_cfg)
|
||||
{
|
||||
struct fwnode_handle *endpoint;
|
||||
struct v4l2_subdev *sd;
|
||||
struct media_pad *pad;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_OF))
|
||||
return -ENXIO;
|
||||
struct v4l2_subdev *sd, *remote_sd;
|
||||
struct media_pad *remote_pad;
|
||||
int ret;
|
||||
|
||||
if (!priv->src_sd)
|
||||
return -EPIPE;
|
||||
|
@ -206,19 +201,21 @@ static int csi_get_upstream_endpoint(struct csi_priv *priv,
|
|||
}
|
||||
|
||||
/* get source pad of entity directly upstream from sd */
|
||||
pad = imx_media_pipeline_pad(&sd->entity, 0, 0, true);
|
||||
if (!pad)
|
||||
return -ENODEV;
|
||||
remote_pad = media_entity_remote_pad_unique(&sd->entity,
|
||||
MEDIA_PAD_FL_SOURCE);
|
||||
if (IS_ERR(remote_pad))
|
||||
return PTR_ERR(remote_pad);
|
||||
|
||||
endpoint = imx_media_get_pad_fwnode(pad);
|
||||
if (IS_ERR(endpoint))
|
||||
return PTR_ERR(endpoint);
|
||||
remote_sd = media_entity_to_v4l2_subdev(remote_pad->entity);
|
||||
|
||||
v4l2_fwnode_endpoint_parse(endpoint, ep);
|
||||
ret = v4l2_subdev_call(remote_sd, pad, get_mbus_config,
|
||||
remote_pad->index, mbus_cfg);
|
||||
if (ret == -ENOIOCTLCMD)
|
||||
v4l2_err(&priv->sd,
|
||||
"entity %s does not implement get_mbus_config()\n",
|
||||
remote_pad->entity->name);
|
||||
|
||||
fwnode_handle_put(endpoint);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void csi_idmac_put_ipu_resources(struct csi_priv *priv)
|
||||
|
@ -435,7 +432,7 @@ static int csi_idmac_setup_channel(struct csi_priv *priv)
|
|||
image.phys0 = phys[0];
|
||||
image.phys1 = phys[1];
|
||||
|
||||
passthrough = requires_passthrough(&priv->upstream_ep, infmt, incc);
|
||||
passthrough = requires_passthrough(&priv->mbus_cfg, infmt, incc);
|
||||
passthrough_cycles = 1;
|
||||
|
||||
/*
|
||||
|
@ -708,7 +705,6 @@ static int csi_setup(struct csi_priv *priv)
|
|||
{
|
||||
struct v4l2_mbus_framefmt *infmt, *outfmt;
|
||||
const struct imx_media_pixfmt *incc;
|
||||
struct v4l2_mbus_config mbus_cfg;
|
||||
struct v4l2_mbus_framefmt if_fmt;
|
||||
struct v4l2_rect crop;
|
||||
|
||||
|
@ -716,13 +712,6 @@ static int csi_setup(struct csi_priv *priv)
|
|||
incc = priv->cc[CSI_SINK_PAD];
|
||||
outfmt = &priv->format_mbus[priv->active_output_pad];
|
||||
|
||||
/* compose mbus_config from the upstream endpoint */
|
||||
mbus_cfg.type = priv->upstream_ep.bus_type;
|
||||
if (is_parallel_bus(&priv->upstream_ep))
|
||||
mbus_cfg.bus.parallel = priv->upstream_ep.bus.parallel;
|
||||
else
|
||||
mbus_cfg.bus.mipi_csi2 = priv->upstream_ep.bus.mipi_csi2;
|
||||
|
||||
if_fmt = *infmt;
|
||||
crop = priv->crop;
|
||||
|
||||
|
@ -730,7 +719,7 @@ static int csi_setup(struct csi_priv *priv)
|
|||
* if cycles is set, we need to handle this over multiple cycles as
|
||||
* generic/bayer data
|
||||
*/
|
||||
if (is_parallel_bus(&priv->upstream_ep) && incc->cycles) {
|
||||
if (is_parallel_bus(&priv->mbus_cfg) && incc->cycles) {
|
||||
if_fmt.width *= incc->cycles;
|
||||
crop.width *= incc->cycles;
|
||||
}
|
||||
|
@ -741,7 +730,7 @@ static int csi_setup(struct csi_priv *priv)
|
|||
priv->crop.width == 2 * priv->compose.width,
|
||||
priv->crop.height == 2 * priv->compose.height);
|
||||
|
||||
ipu_csi_init_interface(priv->csi, &mbus_cfg, &if_fmt, outfmt);
|
||||
ipu_csi_init_interface(priv->csi, &priv->mbus_cfg, &if_fmt, outfmt);
|
||||
|
||||
ipu_csi_set_dest(priv->csi, priv->dest);
|
||||
|
||||
|
@ -769,7 +758,7 @@ static int csi_start(struct csi_priv *priv)
|
|||
return ret;
|
||||
|
||||
/* Skip first few frames from a BT.656 source */
|
||||
if (priv->upstream_ep.bus_type == V4L2_MBUS_BT656) {
|
||||
if (priv->mbus_cfg.type == V4L2_MBUS_BT656) {
|
||||
u32 delay_usec, bad_frames = 20;
|
||||
|
||||
delay_usec = DIV_ROUND_UP_ULL((u64)USEC_PER_SEC *
|
||||
|
@ -1118,7 +1107,7 @@ static int csi_link_validate(struct v4l2_subdev *sd,
|
|||
struct v4l2_subdev_format *sink_fmt)
|
||||
{
|
||||
struct csi_priv *priv = v4l2_get_subdevdata(sd);
|
||||
struct v4l2_fwnode_endpoint upstream_ep = { .bus_type = 0 };
|
||||
struct v4l2_mbus_config mbus_cfg = { .type = 0 };
|
||||
bool is_csi2;
|
||||
int ret;
|
||||
|
||||
|
@ -1127,16 +1116,17 @@ static int csi_link_validate(struct v4l2_subdev *sd,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = csi_get_upstream_endpoint(priv, &upstream_ep);
|
||||
ret = csi_get_upstream_mbus_config(priv, &mbus_cfg);
|
||||
if (ret) {
|
||||
v4l2_err(&priv->sd, "failed to find upstream endpoint\n");
|
||||
v4l2_err(&priv->sd,
|
||||
"failed to get upstream media bus configuration\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
mutex_lock(&priv->lock);
|
||||
|
||||
priv->upstream_ep = upstream_ep;
|
||||
is_csi2 = !is_parallel_bus(&upstream_ep);
|
||||
priv->mbus_cfg = mbus_cfg;
|
||||
is_csi2 = !is_parallel_bus(&mbus_cfg);
|
||||
if (is_csi2) {
|
||||
/*
|
||||
* NOTE! It seems the virtual channels from the mipi csi-2
|
||||
|
@ -1192,7 +1182,7 @@ static void csi_try_crop(struct csi_priv *priv,
|
|||
struct v4l2_rect *crop,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_mbus_framefmt *infmt,
|
||||
struct v4l2_fwnode_endpoint *upstream_ep)
|
||||
struct v4l2_mbus_config *mbus_cfg)
|
||||
{
|
||||
u32 in_height;
|
||||
|
||||
|
@ -1216,7 +1206,7 @@ static void csi_try_crop(struct csi_priv *priv,
|
|||
* sync, so fix it to NTSC/PAL active lines. NTSC contains
|
||||
* 2 extra lines of active video that need to be cropped.
|
||||
*/
|
||||
if (upstream_ep->bus_type == V4L2_MBUS_BT656 &&
|
||||
if (mbus_cfg->type == V4L2_MBUS_BT656 &&
|
||||
(V4L2_FIELD_HAS_BOTH(infmt->field) ||
|
||||
infmt->field == V4L2_FIELD_ALTERNATE)) {
|
||||
crop->height = in_height;
|
||||
|
@ -1233,7 +1223,7 @@ static int csi_enum_mbus_code(struct v4l2_subdev *sd,
|
|||
struct v4l2_subdev_mbus_code_enum *code)
|
||||
{
|
||||
struct csi_priv *priv = v4l2_get_subdevdata(sd);
|
||||
struct v4l2_fwnode_endpoint upstream_ep = { .bus_type = 0 };
|
||||
struct v4l2_mbus_config mbus_cfg = { .type = 0 };
|
||||
const struct imx_media_pixfmt *incc;
|
||||
struct v4l2_mbus_framefmt *infmt;
|
||||
int ret = 0;
|
||||
|
@ -1250,13 +1240,14 @@ static int csi_enum_mbus_code(struct v4l2_subdev *sd,
|
|||
break;
|
||||
case CSI_SRC_PAD_DIRECT:
|
||||
case CSI_SRC_PAD_IDMAC:
|
||||
ret = csi_get_upstream_endpoint(priv, &upstream_ep);
|
||||
ret = csi_get_upstream_mbus_config(priv, &mbus_cfg);
|
||||
if (ret) {
|
||||
v4l2_err(&priv->sd, "failed to find upstream endpoint\n");
|
||||
v4l2_err(&priv->sd,
|
||||
"failed to get upstream media bus configuration\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (requires_passthrough(&upstream_ep, infmt, incc)) {
|
||||
if (requires_passthrough(&mbus_cfg, infmt, incc)) {
|
||||
if (code->index != 0) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
|
@ -1426,7 +1417,7 @@ static void csi_try_field(struct csi_priv *priv,
|
|||
}
|
||||
|
||||
static void csi_try_fmt(struct csi_priv *priv,
|
||||
struct v4l2_fwnode_endpoint *upstream_ep,
|
||||
struct v4l2_mbus_config *mbus_cfg,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_format *sdformat,
|
||||
struct v4l2_rect *crop,
|
||||
|
@ -1447,7 +1438,7 @@ static void csi_try_fmt(struct csi_priv *priv,
|
|||
sdformat->format.width = compose->width;
|
||||
sdformat->format.height = compose->height;
|
||||
|
||||
if (requires_passthrough(upstream_ep, infmt, incc)) {
|
||||
if (requires_passthrough(mbus_cfg, infmt, incc)) {
|
||||
sdformat->format.code = infmt->code;
|
||||
*cc = incc;
|
||||
} else {
|
||||
|
@ -1497,8 +1488,7 @@ static void csi_try_fmt(struct csi_priv *priv,
|
|||
crop->height = sdformat->format.height;
|
||||
if (sdformat->format.field == V4L2_FIELD_ALTERNATE)
|
||||
crop->height *= 2;
|
||||
csi_try_crop(priv, crop, sd_state, &sdformat->format,
|
||||
upstream_ep);
|
||||
csi_try_crop(priv, crop, sd_state, &sdformat->format, mbus_cfg);
|
||||
compose->left = 0;
|
||||
compose->top = 0;
|
||||
compose->width = crop->width;
|
||||
|
@ -1516,7 +1506,7 @@ static int csi_set_fmt(struct v4l2_subdev *sd,
|
|||
struct v4l2_subdev_format *sdformat)
|
||||
{
|
||||
struct csi_priv *priv = v4l2_get_subdevdata(sd);
|
||||
struct v4l2_fwnode_endpoint upstream_ep = { .bus_type = 0 };
|
||||
struct v4l2_mbus_config mbus_cfg = { .type = 0 };
|
||||
const struct imx_media_pixfmt *cc;
|
||||
struct v4l2_mbus_framefmt *fmt;
|
||||
struct v4l2_rect *crop, *compose;
|
||||
|
@ -1525,9 +1515,10 @@ static int csi_set_fmt(struct v4l2_subdev *sd,
|
|||
if (sdformat->pad >= CSI_NUM_PADS)
|
||||
return -EINVAL;
|
||||
|
||||
ret = csi_get_upstream_endpoint(priv, &upstream_ep);
|
||||
ret = csi_get_upstream_mbus_config(priv, &mbus_cfg);
|
||||
if (ret) {
|
||||
v4l2_err(&priv->sd, "failed to find upstream endpoint\n");
|
||||
v4l2_err(&priv->sd,
|
||||
"failed to get upstream media bus configuration\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1541,8 +1532,7 @@ static int csi_set_fmt(struct v4l2_subdev *sd,
|
|||
crop = __csi_get_crop(priv, sd_state, sdformat->which);
|
||||
compose = __csi_get_compose(priv, sd_state, sdformat->which);
|
||||
|
||||
csi_try_fmt(priv, &upstream_ep, sd_state, sdformat, crop, compose,
|
||||
&cc);
|
||||
csi_try_fmt(priv, &mbus_cfg, sd_state, sdformat, crop, compose, &cc);
|
||||
|
||||
fmt = __csi_get_fmt(priv, sd_state, sdformat->pad, sdformat->which);
|
||||
*fmt = sdformat->format;
|
||||
|
@ -1559,8 +1549,8 @@ static int csi_set_fmt(struct v4l2_subdev *sd,
|
|||
format.pad = pad;
|
||||
format.which = sdformat->which;
|
||||
format.format = sdformat->format;
|
||||
csi_try_fmt(priv, &upstream_ep, sd_state, &format,
|
||||
NULL, compose, &outcc);
|
||||
csi_try_fmt(priv, &mbus_cfg, sd_state, &format, NULL,
|
||||
compose, &outcc);
|
||||
|
||||
outfmt = __csi_get_fmt(priv, sd_state, pad,
|
||||
sdformat->which);
|
||||
|
@ -1648,7 +1638,7 @@ static int csi_set_selection(struct v4l2_subdev *sd,
|
|||
struct v4l2_subdev_selection *sel)
|
||||
{
|
||||
struct csi_priv *priv = v4l2_get_subdevdata(sd);
|
||||
struct v4l2_fwnode_endpoint upstream_ep = { .bus_type = 0 };
|
||||
struct v4l2_mbus_config mbus_cfg = { .type = 0 };
|
||||
struct v4l2_mbus_framefmt *infmt;
|
||||
struct v4l2_rect *crop, *compose;
|
||||
int pad, ret;
|
||||
|
@ -1656,9 +1646,10 @@ static int csi_set_selection(struct v4l2_subdev *sd,
|
|||
if (sel->pad != CSI_SINK_PAD)
|
||||
return -EINVAL;
|
||||
|
||||
ret = csi_get_upstream_endpoint(priv, &upstream_ep);
|
||||
ret = csi_get_upstream_mbus_config(priv, &mbus_cfg);
|
||||
if (ret) {
|
||||
v4l2_err(&priv->sd, "failed to find upstream endpoint\n");
|
||||
v4l2_err(&priv->sd,
|
||||
"failed to get upstream media bus configuration\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1687,7 +1678,7 @@ static int csi_set_selection(struct v4l2_subdev *sd,
|
|||
goto out;
|
||||
}
|
||||
|
||||
csi_try_crop(priv, &sel->r, sd_state, infmt, &upstream_ep);
|
||||
csi_try_crop(priv, &sel->r, sd_state, infmt, &mbus_cfg);
|
||||
|
||||
*crop = sel->r;
|
||||
|
||||
|
|
|
@ -187,54 +187,6 @@ out_update_ts:
|
|||
send_fim_event(fim, error_avg);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IMX_GPT_ICAP
|
||||
/*
|
||||
* Input Capture method of measuring frame intervals. Not subject
|
||||
* to interrupt latency.
|
||||
*/
|
||||
static void fim_input_capture_handler(int channel, void *dev_id,
|
||||
ktime_t timestamp)
|
||||
{
|
||||
struct imx_media_fim *fim = dev_id;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&fim->lock, flags);
|
||||
|
||||
frame_interval_monitor(fim, timestamp);
|
||||
|
||||
if (!completion_done(&fim->icap_first_event))
|
||||
complete(&fim->icap_first_event);
|
||||
|
||||
spin_unlock_irqrestore(&fim->lock, flags);
|
||||
}
|
||||
|
||||
static int fim_request_input_capture(struct imx_media_fim *fim)
|
||||
{
|
||||
init_completion(&fim->icap_first_event);
|
||||
|
||||
return mxc_request_input_capture(fim->icap_channel,
|
||||
fim_input_capture_handler,
|
||||
fim->icap_flags, fim);
|
||||
}
|
||||
|
||||
static void fim_free_input_capture(struct imx_media_fim *fim)
|
||||
{
|
||||
mxc_free_input_capture(fim->icap_channel, fim);
|
||||
}
|
||||
|
||||
#else /* CONFIG_IMX_GPT_ICAP */
|
||||
|
||||
static int fim_request_input_capture(struct imx_media_fim *fim)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void fim_free_input_capture(struct imx_media_fim *fim)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_IMX_GPT_ICAP */
|
||||
|
||||
/*
|
||||
* In case we are monitoring the first frame interval after streamon
|
||||
* (when fim->num_skip = 0), we need a valid fim->last_ts before we
|
||||
|
@ -434,15 +386,8 @@ int imx_media_fim_set_stream(struct imx_media_fim *fim,
|
|||
update_fim_nominal(fim, fi);
|
||||
spin_unlock_irqrestore(&fim->lock, flags);
|
||||
|
||||
if (icap_enabled(fim)) {
|
||||
ret = fim_request_input_capture(fim);
|
||||
if (ret)
|
||||
goto out;
|
||||
fim_acquire_first_ts(fim);
|
||||
}
|
||||
} else {
|
||||
if (icap_enabled(fim))
|
||||
fim_free_input_capture(fim);
|
||||
fim_acquire_first_ts(fim);
|
||||
}
|
||||
|
||||
fim->stream_on = on;
|
||||
|
|
|
@ -813,39 +813,6 @@ imx_media_pipeline_video_device(struct media_entity *start_entity,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(imx_media_pipeline_video_device);
|
||||
|
||||
/*
|
||||
* Find a fwnode endpoint that maps to the given subdevice's pad.
|
||||
* If there are multiple endpoints that map to the pad, only the
|
||||
* first endpoint encountered is returned.
|
||||
*
|
||||
* On success the refcount of the returned fwnode endpoint is
|
||||
* incremented.
|
||||
*/
|
||||
struct fwnode_handle *imx_media_get_pad_fwnode(struct media_pad *pad)
|
||||
{
|
||||
struct fwnode_handle *endpoint;
|
||||
struct v4l2_subdev *sd;
|
||||
|
||||
if (!is_media_entity_v4l2_subdev(pad->entity))
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
sd = media_entity_to_v4l2_subdev(pad->entity);
|
||||
|
||||
fwnode_graph_for_each_endpoint(dev_fwnode(sd->dev), endpoint) {
|
||||
int pad_idx = media_entity_get_fwnode_pad(&sd->entity,
|
||||
endpoint,
|
||||
pad->flags);
|
||||
if (pad_idx < 0)
|
||||
continue;
|
||||
|
||||
if (pad_idx == pad->index)
|
||||
return endpoint;
|
||||
}
|
||||
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(imx_media_get_pad_fwnode);
|
||||
|
||||
/*
|
||||
* Turn current pipeline streaming on/off starting from entity.
|
||||
*/
|
||||
|
|
|
@ -219,7 +219,6 @@ imx_media_pipeline_subdev(struct media_entity *start_entity, u32 grp_id,
|
|||
struct video_device *
|
||||
imx_media_pipeline_video_device(struct media_entity *start_entity,
|
||||
enum v4l2_buf_type buftype, bool upstream);
|
||||
struct fwnode_handle *imx_media_get_pad_fwnode(struct media_pad *pad);
|
||||
|
||||
struct imx_media_dma_buf {
|
||||
void *virt;
|
||||
|
|
|
@ -53,19 +53,19 @@ enum iss_pipeline_stream_state {
|
|||
|
||||
enum iss_pipeline_state {
|
||||
/* The stream has been started on the input video node. */
|
||||
ISS_PIPELINE_STREAM_INPUT = 1,
|
||||
ISS_PIPELINE_STREAM_INPUT = BIT(0),
|
||||
/* The stream has been started on the output video node. */
|
||||
ISS_PIPELINE_STREAM_OUTPUT = (1 << 1),
|
||||
ISS_PIPELINE_STREAM_OUTPUT = BIT(1),
|
||||
/* At least one buffer is queued on the input video node. */
|
||||
ISS_PIPELINE_QUEUE_INPUT = (1 << 2),
|
||||
ISS_PIPELINE_QUEUE_INPUT = BIT(2),
|
||||
/* At least one buffer is queued on the output video node. */
|
||||
ISS_PIPELINE_QUEUE_OUTPUT = (1 << 3),
|
||||
ISS_PIPELINE_QUEUE_OUTPUT = BIT(3),
|
||||
/* The input entity is idle, ready to be started. */
|
||||
ISS_PIPELINE_IDLE_INPUT = (1 << 4),
|
||||
ISS_PIPELINE_IDLE_INPUT = BIT(4),
|
||||
/* The output entity is idle, ready to be started. */
|
||||
ISS_PIPELINE_IDLE_OUTPUT = (1 << 5),
|
||||
ISS_PIPELINE_IDLE_OUTPUT = BIT(5),
|
||||
/* The pipeline is currently streaming. */
|
||||
ISS_PIPELINE_STREAM = (1 << 6),
|
||||
ISS_PIPELINE_STREAM = BIT(6),
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -126,9 +126,9 @@ struct iss_buffer {
|
|||
|
||||
enum iss_video_dmaqueue_flags {
|
||||
/* Set if DMA queue becomes empty when ISS_PIPELINE_STREAM_CONTINUOUS */
|
||||
ISS_VIDEO_DMAQUEUE_UNDERRUN = (1 << 0),
|
||||
ISS_VIDEO_DMAQUEUE_UNDERRUN = BIT(0),
|
||||
/* Set when queuing buffer to an empty DMA queue */
|
||||
ISS_VIDEO_DMAQUEUE_QUEUED = (1 << 1),
|
||||
ISS_VIDEO_DMAQUEUE_QUEUED = BIT(1),
|
||||
};
|
||||
|
||||
#define iss_video_dmaqueue_flags_clr(video) \
|
||||
|
|
|
@ -20,21 +20,9 @@
|
|||
#include <linux/videodev2.h>
|
||||
#include <media/v4l2-mediabus.h>
|
||||
|
||||
/**
|
||||
* struct s5c73m3_gpio - data structure describing a GPIO
|
||||
* @gpio: GPIO number
|
||||
* @level: indicates active state of the @gpio
|
||||
*/
|
||||
struct s5c73m3_gpio {
|
||||
int gpio;
|
||||
int level;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct s5c73m3_platform_data - s5c73m3 driver platform data
|
||||
* @mclk_frequency: sensor's master clock frequency in Hz
|
||||
* @gpio_reset: GPIO driving RESET pin
|
||||
* @gpio_stby: GPIO driving STBY pin
|
||||
* @bus_type: bus type
|
||||
* @nlanes: maximum number of MIPI-CSI lanes used
|
||||
* @horiz_flip: default horizontal image flip value, non zero to enable
|
||||
|
@ -44,9 +32,6 @@ struct s5c73m3_gpio {
|
|||
struct s5c73m3_platform_data {
|
||||
unsigned long mclk_frequency;
|
||||
|
||||
struct s5c73m3_gpio gpio_reset;
|
||||
struct s5c73m3_gpio gpio_stby;
|
||||
|
||||
enum v4l2_mbus_type bus_type;
|
||||
u8 nlanes;
|
||||
u8 horiz_flip;
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* S5K4ECGX image sensor header file
|
||||
*
|
||||
* Copyright (C) 2012, Linaro
|
||||
* Copyright (C) 2012, Samsung Electronics Co., Ltd.
|
||||
*/
|
||||
|
||||
#ifndef S5K4ECGX_H
|
||||
#define S5K4ECGX_H
|
||||
|
||||
/**
|
||||
* struct s5k4ecgx_gpio - data structure describing a GPIO
|
||||
* @gpio: GPIO number
|
||||
* @level: indicates active state of the @gpio
|
||||
*/
|
||||
struct s5k4ecgx_gpio {
|
||||
int gpio;
|
||||
int level;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct s5k4ecgx_platform_data - s5k4ecgx driver platform data
|
||||
* @gpio_reset: GPIO driving RESET pin
|
||||
* @gpio_stby: GPIO driving STBY pin
|
||||
*/
|
||||
|
||||
struct s5k4ecgx_platform_data {
|
||||
struct s5k4ecgx_gpio gpio_reset;
|
||||
struct s5k4ecgx_gpio gpio_stby;
|
||||
};
|
||||
|
||||
#endif /* S5K4ECGX_H */
|
|
@ -10,8 +10,8 @@
|
|||
* Martin Bugge <marbugge@cisco.com>
|
||||
*/
|
||||
|
||||
#ifndef THS7353_H
|
||||
#define THS7353_H
|
||||
#ifndef THS7303_H
|
||||
#define THS7303_H
|
||||
|
||||
/**
|
||||
* struct ths7303_platform_data - Platform dependent data
|
||||
|
|
|
@ -54,17 +54,18 @@
|
|||
#define V4L2_MBUS_VSYNC_ACTIVE_LOW BIT(5)
|
||||
#define V4L2_MBUS_PCLK_SAMPLE_RISING BIT(6)
|
||||
#define V4L2_MBUS_PCLK_SAMPLE_FALLING BIT(7)
|
||||
#define V4L2_MBUS_DATA_ACTIVE_HIGH BIT(8)
|
||||
#define V4L2_MBUS_DATA_ACTIVE_LOW BIT(9)
|
||||
#define V4L2_MBUS_PCLK_SAMPLE_DUALEDGE BIT(8)
|
||||
#define V4L2_MBUS_DATA_ACTIVE_HIGH BIT(9)
|
||||
#define V4L2_MBUS_DATA_ACTIVE_LOW BIT(10)
|
||||
/* FIELD = 0/1 - Field1 (odd)/Field2 (even) */
|
||||
#define V4L2_MBUS_FIELD_EVEN_HIGH BIT(10)
|
||||
#define V4L2_MBUS_FIELD_EVEN_HIGH BIT(11)
|
||||
/* FIELD = 1/0 - Field1 (odd)/Field2 (even) */
|
||||
#define V4L2_MBUS_FIELD_EVEN_LOW BIT(11)
|
||||
#define V4L2_MBUS_FIELD_EVEN_LOW BIT(12)
|
||||
/* Active state of Sync-on-green (SoG) signal, 0/1 for LOW/HIGH respectively. */
|
||||
#define V4L2_MBUS_VIDEO_SOG_ACTIVE_HIGH BIT(12)
|
||||
#define V4L2_MBUS_VIDEO_SOG_ACTIVE_LOW BIT(13)
|
||||
#define V4L2_MBUS_DATA_ENABLE_HIGH BIT(14)
|
||||
#define V4L2_MBUS_DATA_ENABLE_LOW BIT(15)
|
||||
#define V4L2_MBUS_VIDEO_SOG_ACTIVE_HIGH BIT(13)
|
||||
#define V4L2_MBUS_VIDEO_SOG_ACTIVE_LOW BIT(14)
|
||||
#define V4L2_MBUS_DATA_ENABLE_HIGH BIT(15)
|
||||
#define V4L2_MBUS_DATA_ENABLE_LOW BIT(16)
|
||||
|
||||
/* Serial flags */
|
||||
/* Clock non-continuous mode support. */
|
||||
|
|
|
@ -7,21 +7,6 @@
|
|||
* Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
|
||||
* & Marcus Metzler <marcus@convergence.de>
|
||||
* for convergence integrated media GmbH
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Lesser Public License
|
||||
* as published by the Free Software Foundation; either version 2.1
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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 Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _DVBAUDIO_H_
|
||||
|
|
|
@ -5,21 +5,6 @@
|
|||
* Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
|
||||
* & Marcus Metzler <marcus@convergence.de>
|
||||
* for convergence integrated media GmbH
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Lesser Public License
|
||||
* as published by the Free Software Foundation; either version 2.1
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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 Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _DVBCA_H_
|
||||
|
|
|
@ -5,21 +5,6 @@
|
|||
* Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
|
||||
* & Ralph Metzler <ralph@convergence.de>
|
||||
* for convergence integrated media GmbH
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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 Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _UAPI_DVBDMX_H_
|
||||
|
|
|
@ -7,21 +7,6 @@
|
|||
* Holger Waechtler <holger@convergence.de>
|
||||
* Andre Draszik <ad@convergence.de>
|
||||
* for convergence integrated media GmbH
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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 Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _DVBFRONTEND_H_
|
||||
|
|
|
@ -5,21 +5,6 @@
|
|||
* Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
|
||||
* & Ralph Metzler <ralph@convergence.de>
|
||||
* for convergence integrated media GmbH
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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 Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _DVBNET_H_
|
||||
|
|
|
@ -7,21 +7,6 @@
|
|||
* Copyright (C) 2001 Ralph Metzler <ralph@convergence.de>
|
||||
* & Marcus Metzler <marcus@convergence.de>
|
||||
* for convergence integrated media GmbH
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Lesser Public License
|
||||
* as published by the Free Software Foundation; either version 2.1
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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 Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _DVBOSD_H_
|
||||
|
|
|
@ -4,21 +4,6 @@
|
|||
*
|
||||
* Copyright (C) 2000 Holger Waechtler <holger@convergence.de>
|
||||
* for convergence integrated media GmbH
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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 Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _DVBVERSION_H_
|
||||
|
|
|
@ -7,21 +7,6 @@
|
|||
* Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
|
||||
* & Ralph Metzler <ralph@convergence.de>
|
||||
* for convergence integrated media GmbH
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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 Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _UAPI_DVBVIDEO_H_
|
||||
|
|
|
@ -10,45 +10,6 @@
|
|||
*
|
||||
* Copyright (C) 2012 Nokia Corporation
|
||||
* Contact: Sakari Ailus <sakari.ailus@iki.fi>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Alternatively you can redistribute this file under the terms of the
|
||||
* BSD license as stated below:
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. The names of its contributors may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __V4L2_COMMON__
|
||||
|
|
|
@ -4,44 +4,6 @@
|
|||
*
|
||||
* Copyright (C) 1999-2012 the contributors
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Alternatively you can redistribute this file under the terms of the
|
||||
* BSD license as stated below:
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. The names of its contributors may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The contents of this header was split off from videodev2.h. All control
|
||||
* definitions should be added to this header, which is included by
|
||||
* videodev2.h.
|
||||
|
|
|
@ -3,15 +3,6 @@
|
|||
* V4L2 DV timings header.
|
||||
*
|
||||
* Copyright (C) 2012-2016 Hans Verkuil <hans.verkuil@cisco.com>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _V4L2_DV_TIMINGS_H
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
* Media Bus API header
|
||||
*
|
||||
* Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
|
||||
*
|
||||
* 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 __LINUX_V4L2_MEDIABUS_H
|
||||
|
|
|
@ -6,19 +6,6 @@
|
|||
*
|
||||
* Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
* Sakari Ailus <sakari.ailus@iki.fi>
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_V4L2_SUBDEV_H
|
||||
|
|
Загрузка…
Ссылка в новой задаче