Release 4.7 drivers/media/pci/cx23885/cx23885-ioctl.c
/*
* Driver for the Conexant CX23885/7/8 PCIe bridge
*
* Various common ioctl() support functions
*
* Copyright (c) 2009 Andy Walls <awalls@md.metrocast.net>
*
* 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.
*/
#include "cx23885.h"
#include "cx23885-ioctl.h"
#ifdef CONFIG_VIDEO_ADV_DEBUG
int cx23885_g_chip_info(struct file *file, void *fh,
struct v4l2_dbg_chip_info *chip)
{
struct cx23885_dev *dev = video_drvdata(file);
if (chip->match.addr > 1)
return -EINVAL;
if (chip->match.addr == 1) {
if (dev->v4l_device == NULL)
return -EINVAL;
strlcpy(chip->name, "cx23417", sizeof(chip->name));
} else {
strlcpy(chip->name, dev->v4l2_dev.name, sizeof(chip->name));
}
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
andy walls | andy walls | 66 | 60.55% | 1 | 33.33% |
hans verkuil | hans verkuil | 43 | 39.45% | 2 | 66.67% |
| Total | 109 | 100.00% | 3 | 100.00% |
static int cx23417_g_register(struct cx23885_dev *dev,
struct v4l2_dbg_register *reg)
{
u32 value;
if (dev->v4l_device == NULL)
return -EINVAL;
if ((reg->reg & 0x3) != 0 || reg->reg >= 0x10000)
return -EINVAL;
if (mc417_register_read(dev, (u16) reg->reg, &value))
return -EINVAL; /* V4L2 spec, but -EREMOTEIO really */
reg->size = 4;
reg->val = value;
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
andy walls | andy walls | 90 | 100.00% | 1 | 100.00% |
| Total | 90 | 100.00% | 1 | 100.00% |
int cx23885_g_register(struct file *file, void *fh,
struct v4l2_dbg_register *reg)
{
struct cx23885_dev *dev = video_drvdata(file);
if (reg->match.addr > 1)
return -EINVAL;
if (reg->match.addr)
return cx23417_g_register(dev, reg);
if ((reg->reg & 0x3) != 0 || reg->reg >= pci_resource_len(dev->pci, 0))
return -EINVAL;
reg->size = 4;
reg->val = cx_read(reg->reg);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
andy walls | andy walls | 86 | 79.63% | 1 | 33.33% |
hans verkuil | hans verkuil | 22 | 20.37% | 2 | 66.67% |
| Total | 108 | 100.00% | 3 | 100.00% |
static int cx23417_s_register(struct cx23885_dev *dev,
const struct v4l2_dbg_register *reg)
{
if (dev->v4l_device == NULL)
return -EINVAL;
if ((reg->reg & 0x3) != 0 || reg->reg >= 0x10000)
return -EINVAL;
if (mc417_register_write(dev, (u16) reg->reg, (u32) reg->val))
return -EINVAL; /* V4L2 spec, but -EREMOTEIO really */
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
andy walls | andy walls | 79 | 98.75% | 1 | 50.00% |
hans verkuil | hans verkuil | 1 | 1.25% | 1 | 50.00% |
| Total | 80 | 100.00% | 2 | 100.00% |
int cx23885_s_register(struct file *file, void *fh,
const struct v4l2_dbg_register *reg)
{
struct cx23885_dev *dev = video_drvdata(file);
if (reg->match.addr > 1)
return -EINVAL;
if (reg->match.addr)
return cx23417_s_register(dev, reg);
if ((reg->reg & 0x3) != 0 || reg->reg >= pci_resource_len(dev->pci, 0))
return -EINVAL;
cx_write(reg->reg, reg->val);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
andy walls | andy walls | 59 | 57.28% | 1 | 25.00% |
hans verkuil | hans verkuil | 44 | 42.72% | 3 | 75.00% |
| Total | 103 | 100.00% | 4 | 100.00% |
#endif
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
andy walls | andy walls | 387 | 77.09% | 1 | 16.67% |
hans verkuil | hans verkuil | 114 | 22.71% | 4 | 66.67% |
mauro carvalho chehab | mauro carvalho chehab | 1 | 0.20% | 1 | 16.67% |
| Total | 502 | 100.00% | 6 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.