Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: V4L/DVB (12564a): MAINTAINERS: Update gspca sn9c20x name style V4L/DVB (12502): gspca - sn9c20x: Fix gscpa sn9c20x build errors. V4L/DVB (12495): em28xx: Don't call em28xx_ir_init when disable_ir is true V4L/DVB (12457): zr364: wrong indexes V4L/DVB (12451): Update KConfig File to enable SDIO and USB interfaces V4L/DVB (12450): Siano: Fixed SDIO compilation bugs V4L/DVB (12449): adds webcam for Micron device MT9M111 0x143A to em28xx V4L/DVB (12446): sms1xxx: restore GPIO functionality for all Hauppauge devices
This commit is contained in:
Коммит
af39989097
|
@ -2239,8 +2239,7 @@ S: Maintained
|
|||
F: drivers/media/video/gspca/pac207.c
|
||||
|
||||
GSPCA SN9C20X SUBDRIVER
|
||||
P: Brian Johnson
|
||||
M: brijohn@gmail.com
|
||||
M: Brian Johnson <brijohn@gmail.com>
|
||||
L: linux-media@vger.kernel.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
|
||||
S: Maintained
|
||||
|
|
|
@ -2,25 +2,33 @@
|
|||
# Siano Mobile Silicon Digital TV device configuration
|
||||
#
|
||||
|
||||
config DVB_SIANO_SMS1XXX
|
||||
tristate "Siano SMS1XXX USB dongle support"
|
||||
depends on DVB_CORE && USB && INPUT
|
||||
config SMS_SIANO_MDTV
|
||||
tristate "Siano SMS1xxx based MDTV receiver"
|
||||
depends on DVB_CORE && INPUT
|
||||
---help---
|
||||
Choose Y here if you have a USB dongle with a SMS1XXX chipset.
|
||||
Choose Y or M here if you have MDTV receiver with a Siano chipset.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called sms1xxx.
|
||||
To compile this driver as a module, choose M here
|
||||
(The module will be called smsmdtv).
|
||||
|
||||
config DVB_SIANO_SMS1XXX_SMS_IDS
|
||||
bool "Enable support for Siano Mobile Silicon default USB IDs"
|
||||
depends on DVB_SIANO_SMS1XXX
|
||||
default y
|
||||
Further documentation on this driver can be found on the WWW
|
||||
at http://www.siano-ms.com/
|
||||
|
||||
if SMS_SIANO_MDTV
|
||||
menu "Siano module components"
|
||||
|
||||
# Hardware interfaces support
|
||||
|
||||
config SMS_USB_DRV
|
||||
tristate "USB interface support"
|
||||
depends on DVB_CORE && USB
|
||||
---help---
|
||||
Choose Y here if you have a USB dongle with a SMS1XXX chipset
|
||||
that uses Siano Mobile Silicon's default usb vid:pid.
|
||||
|
||||
Choose N here if you would prefer to use Siano's external driver.
|
||||
|
||||
Further documentation on this driver can be found on the WWW at
|
||||
<http://www.siano-ms.com/>.
|
||||
Choose if you would like to have Siano's support for USB interface
|
||||
|
||||
config SMS_SDIO_DRV
|
||||
tristate "SDIO interface support"
|
||||
depends on DVB_CORE && MMC
|
||||
---help---
|
||||
Choose if you would like to have Siano's support for SDIO interface
|
||||
endmenu
|
||||
endif # SMS_SIANO_MDTV
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
sms1xxx-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o
|
||||
|
||||
obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o
|
||||
obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsusb.o
|
||||
obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsdvb.o
|
||||
smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o
|
||||
|
||||
obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o
|
||||
obj-$(CONFIG_SMS_USB_DRV) += smsusb.o
|
||||
obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o
|
||||
|
||||
EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
|
||||
|
||||
|
|
|
@ -325,6 +325,16 @@ static int smsdvb_sendrequest_and_wait(struct smsdvb_client_t *client,
|
|||
0 : -ETIME;
|
||||
}
|
||||
|
||||
static inline int led_feedback(struct smsdvb_client_t *client)
|
||||
{
|
||||
if (client->fe_status & FE_HAS_LOCK)
|
||||
return sms_board_led_feedback(client->coredev,
|
||||
(client->sms_stat_dvb.ReceptionData.BER
|
||||
== 0) ? SMS_LED_HI : SMS_LED_LO);
|
||||
else
|
||||
return sms_board_led_feedback(client->coredev, SMS_LED_OFF);
|
||||
}
|
||||
|
||||
static int smsdvb_read_status(struct dvb_frontend *fe, fe_status_t *stat)
|
||||
{
|
||||
struct smsdvb_client_t *client;
|
||||
|
@ -332,6 +342,8 @@ static int smsdvb_read_status(struct dvb_frontend *fe, fe_status_t *stat)
|
|||
|
||||
*stat = client->fe_status;
|
||||
|
||||
led_feedback(client);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -342,6 +354,8 @@ static int smsdvb_read_ber(struct dvb_frontend *fe, u32 *ber)
|
|||
|
||||
*ber = client->sms_stat_dvb.ReceptionData.BER;
|
||||
|
||||
led_feedback(client);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -359,6 +373,8 @@ static int smsdvb_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
|
|||
(client->sms_stat_dvb.ReceptionData.InBandPwr
|
||||
+ 95) * 3 / 2;
|
||||
|
||||
led_feedback(client);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -369,6 +385,8 @@ static int smsdvb_read_snr(struct dvb_frontend *fe, u16 *snr)
|
|||
|
||||
*snr = client->sms_stat_dvb.ReceptionData.SNR;
|
||||
|
||||
led_feedback(client);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -379,6 +397,8 @@ static int smsdvb_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
|
|||
|
||||
*ucblocks = client->sms_stat_dvb.ReceptionData.ErrorTSPackets;
|
||||
|
||||
led_feedback(client);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -404,6 +424,8 @@ static int smsdvb_set_frontend(struct dvb_frontend *fe,
|
|||
u32 Data[3];
|
||||
} Msg;
|
||||
|
||||
int ret;
|
||||
|
||||
client->fe_status = FE_HAS_SIGNAL;
|
||||
client->event_fe_state = -1;
|
||||
client->event_unc_state = -1;
|
||||
|
@ -426,6 +448,23 @@ static int smsdvb_set_frontend(struct dvb_frontend *fe,
|
|||
case BANDWIDTH_AUTO: return -EOPNOTSUPP;
|
||||
default: return -EINVAL;
|
||||
}
|
||||
/* Disable LNA, if any. An error is returned if no LNA is present */
|
||||
ret = sms_board_lna_control(client->coredev, 0);
|
||||
if (ret == 0) {
|
||||
fe_status_t status;
|
||||
|
||||
/* tune with LNA off at first */
|
||||
ret = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
|
||||
&client->tune_done);
|
||||
|
||||
smsdvb_read_status(fe, &status);
|
||||
|
||||
if (status & FE_HAS_LOCK)
|
||||
return ret;
|
||||
|
||||
/* previous tune didnt lock - enable LNA and tune again */
|
||||
sms_board_lna_control(client->coredev, 1);
|
||||
}
|
||||
|
||||
return smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
|
||||
&client->tune_done);
|
||||
|
@ -451,6 +490,8 @@ static int smsdvb_init(struct dvb_frontend *fe)
|
|||
struct smsdvb_client_t *client =
|
||||
container_of(fe, struct smsdvb_client_t, frontend);
|
||||
|
||||
sms_board_power(client->coredev, 1);
|
||||
|
||||
sms_board_dvb3_event(client, DVB3_EVENT_INIT);
|
||||
return 0;
|
||||
}
|
||||
|
@ -460,6 +501,9 @@ static int smsdvb_sleep(struct dvb_frontend *fe)
|
|||
struct smsdvb_client_t *client =
|
||||
container_of(fe, struct smsdvb_client_t, frontend);
|
||||
|
||||
sms_board_led_feedback(client->coredev, SMS_LED_OFF);
|
||||
sms_board_power(client->coredev, 0);
|
||||
|
||||
sms_board_dvb3_event(client, DVB3_EVENT_SLEEP);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
|
||||
#define SMSSDIO_DATA 0x00
|
||||
#define SMSSDIO_INT 0x04
|
||||
#define SMSSDIO_BLOCK_SIZE 128
|
||||
|
||||
static const struct sdio_device_id smssdio_ids[] = {
|
||||
{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_STELLAR),
|
||||
|
@ -85,7 +86,8 @@ static int smssdio_sendrequest(void *context, void *buffer, size_t size)
|
|||
sdio_claim_host(smsdev->func);
|
||||
|
||||
while (size >= smsdev->func->cur_blksize) {
|
||||
ret = sdio_write_blocks(smsdev->func, SMSSDIO_DATA, buffer, 1);
|
||||
ret = sdio_memcpy_toio(smsdev->func, SMSSDIO_DATA,
|
||||
buffer, smsdev->func->cur_blksize);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
|
@ -94,8 +96,8 @@ static int smssdio_sendrequest(void *context, void *buffer, size_t size)
|
|||
}
|
||||
|
||||
if (size) {
|
||||
ret = sdio_write_bytes(smsdev->func, SMSSDIO_DATA,
|
||||
buffer, size);
|
||||
ret = sdio_memcpy_toio(smsdev->func, SMSSDIO_DATA,
|
||||
buffer, size);
|
||||
}
|
||||
|
||||
out:
|
||||
|
@ -125,23 +127,23 @@ static void smssdio_interrupt(struct sdio_func *func)
|
|||
*/
|
||||
isr = sdio_readb(func, SMSSDIO_INT, &ret);
|
||||
if (ret) {
|
||||
dev_err(&smsdev->func->dev,
|
||||
"Unable to read interrupt register!\n");
|
||||
sms_err("Unable to read interrupt register!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (smsdev->split_cb == NULL) {
|
||||
cb = smscore_getbuffer(smsdev->coredev);
|
||||
if (!cb) {
|
||||
dev_err(&smsdev->func->dev,
|
||||
"Unable to allocate data buffer!\n");
|
||||
sms_err("Unable to allocate data buffer!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ret = sdio_read_blocks(smsdev->func, cb->p, SMSSDIO_DATA, 1);
|
||||
ret = sdio_memcpy_fromio(smsdev->func,
|
||||
cb->p,
|
||||
SMSSDIO_DATA,
|
||||
SMSSDIO_BLOCK_SIZE);
|
||||
if (ret) {
|
||||
dev_err(&smsdev->func->dev,
|
||||
"Error %d reading initial block!\n", ret);
|
||||
sms_err("Error %d reading initial block!\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -152,7 +154,10 @@ static void smssdio_interrupt(struct sdio_func *func)
|
|||
return;
|
||||
}
|
||||
|
||||
size = hdr->msgLength - smsdev->func->cur_blksize;
|
||||
if (hdr->msgLength > smsdev->func->cur_blksize)
|
||||
size = hdr->msgLength - smsdev->func->cur_blksize;
|
||||
else
|
||||
size = 0;
|
||||
} else {
|
||||
cb = smsdev->split_cb;
|
||||
hdr = cb->p;
|
||||
|
@ -162,23 +167,24 @@ static void smssdio_interrupt(struct sdio_func *func)
|
|||
smsdev->split_cb = NULL;
|
||||
}
|
||||
|
||||
if (hdr->msgLength > smsdev->func->cur_blksize) {
|
||||
if (size) {
|
||||
void *buffer;
|
||||
|
||||
size = ALIGN(size, 128);
|
||||
buffer = cb->p + hdr->msgLength;
|
||||
buffer = cb->p + (hdr->msgLength - size);
|
||||
size = ALIGN(size, SMSSDIO_BLOCK_SIZE);
|
||||
|
||||
BUG_ON(smsdev->func->cur_blksize != 128);
|
||||
BUG_ON(smsdev->func->cur_blksize != SMSSDIO_BLOCK_SIZE);
|
||||
|
||||
/*
|
||||
* First attempt to transfer all of it in one go...
|
||||
*/
|
||||
ret = sdio_read_blocks(smsdev->func, buffer,
|
||||
SMSSDIO_DATA, size / 128);
|
||||
ret = sdio_memcpy_fromio(smsdev->func,
|
||||
buffer,
|
||||
SMSSDIO_DATA,
|
||||
size);
|
||||
if (ret && ret != -EINVAL) {
|
||||
smscore_putbuffer(smsdev->coredev, cb);
|
||||
dev_err(&smsdev->func->dev,
|
||||
"Error %d reading data from card!\n", ret);
|
||||
sms_err("Error %d reading data from card!\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -191,12 +197,12 @@ static void smssdio_interrupt(struct sdio_func *func)
|
|||
*/
|
||||
if (ret == -EINVAL) {
|
||||
while (size) {
|
||||
ret = sdio_read_blocks(smsdev->func,
|
||||
buffer, SMSSDIO_DATA, 1);
|
||||
ret = sdio_memcpy_fromio(smsdev->func,
|
||||
buffer, SMSSDIO_DATA,
|
||||
smsdev->func->cur_blksize);
|
||||
if (ret) {
|
||||
smscore_putbuffer(smsdev->coredev, cb);
|
||||
dev_err(&smsdev->func->dev,
|
||||
"Error %d reading "
|
||||
sms_err("Error %d reading "
|
||||
"data from card!\n", ret);
|
||||
return;
|
||||
}
|
||||
|
@ -269,7 +275,7 @@ static int smssdio_probe(struct sdio_func *func,
|
|||
if (ret)
|
||||
goto release;
|
||||
|
||||
ret = sdio_set_block_size(func, 128);
|
||||
ret = sdio_set_block_size(func, SMSSDIO_BLOCK_SIZE);
|
||||
if (ret)
|
||||
goto disable;
|
||||
|
||||
|
|
|
@ -1730,6 +1730,25 @@ static inline void em28xx_set_model(struct em28xx *dev)
|
|||
EM28XX_I2C_FREQ_100_KHZ;
|
||||
}
|
||||
|
||||
|
||||
/* FIXME: Should be replaced by a proper mt9m111 driver */
|
||||
static int em28xx_initialize_mt9m111(struct em28xx *dev)
|
||||
{
|
||||
int i;
|
||||
unsigned char regs[][3] = {
|
||||
{ 0x0d, 0x00, 0x01, }, /* reset and use defaults */
|
||||
{ 0x0d, 0x00, 0x00, },
|
||||
{ 0x0a, 0x00, 0x21, },
|
||||
{ 0x21, 0x04, 0x00, }, /* full readout speed, no row/col skipping */
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(regs); i++)
|
||||
i2c_master_send(&dev->i2c_client, ®s[i][0], 3);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* FIXME: Should be replaced by a proper mt9m001 driver */
|
||||
static int em28xx_initialize_mt9m001(struct em28xx *dev)
|
||||
{
|
||||
|
@ -1758,7 +1777,7 @@ static int em28xx_initialize_mt9m001(struct em28xx *dev)
|
|||
|
||||
/* HINT method: webcam I2C chips
|
||||
*
|
||||
* This method work for webcams with Micron sensors
|
||||
* This method works for webcams with Micron sensors
|
||||
*/
|
||||
static int em28xx_hint_sensor(struct em28xx *dev)
|
||||
{
|
||||
|
@ -1804,6 +1823,23 @@ static int em28xx_hint_sensor(struct em28xx *dev)
|
|||
dev->vinctl = 0x00;
|
||||
|
||||
break;
|
||||
|
||||
case 0x143a: /* MT9M111 as found in the ECS G200 */
|
||||
dev->model = EM2750_BOARD_UNKNOWN;
|
||||
em28xx_set_model(dev);
|
||||
|
||||
sensor_name = "mt9m111";
|
||||
dev->board.xclk = EM28XX_XCLK_FREQUENCY_48MHZ;
|
||||
dev->em28xx_sensor = EM28XX_MT9M111;
|
||||
em28xx_initialize_mt9m111(dev);
|
||||
dev->sensor_xres = 640;
|
||||
dev->sensor_yres = 512;
|
||||
|
||||
dev->vinmode = 0x0a;
|
||||
dev->vinctl = 0x00;
|
||||
|
||||
break;
|
||||
|
||||
case 0x8431:
|
||||
dev->model = EM2750_BOARD_UNKNOWN;
|
||||
em28xx_set_model(dev);
|
||||
|
@ -1820,7 +1856,7 @@ static int em28xx_hint_sensor(struct em28xx *dev)
|
|||
|
||||
break;
|
||||
default:
|
||||
printk("Unknown Micron Sensor 0x%04x\n", be16_to_cpu(version));
|
||||
printk("Unknown Micron Sensor 0x%04x\n", version);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -2346,7 +2382,9 @@ void em28xx_card_setup(struct em28xx *dev)
|
|||
}
|
||||
|
||||
em28xx_tuner_setup(dev);
|
||||
em28xx_ir_init(dev);
|
||||
|
||||
if(!disable_ir)
|
||||
em28xx_ir_init(dev);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -367,6 +367,7 @@ enum em28xx_sensor {
|
|||
EM28XX_NOSENSOR = 0,
|
||||
EM28XX_MT9V011,
|
||||
EM28XX_MT9M001,
|
||||
EM28XX_MT9M111,
|
||||
};
|
||||
|
||||
enum em28xx_adecoder {
|
||||
|
|
|
@ -114,7 +114,7 @@ config USB_GSPCA_SN9C20X
|
|||
|
||||
config USB_GSPCA_SN9C20X_EVDEV
|
||||
bool "Enable evdev support"
|
||||
depends on USB_GSPCA_SN9C20X
|
||||
depends on USB_GSPCA_SN9C20X && INPUT
|
||||
---help---
|
||||
Say Y here in order to enable evdev support for sn9c20x webcam button.
|
||||
|
||||
|
|
|
@ -695,7 +695,7 @@ static int zr364xx_release(struct file *file)
|
|||
for (i = 0; i < 2; i++) {
|
||||
err =
|
||||
send_control_msg(udev, 1, init[cam->method][i].value,
|
||||
0, init[i][cam->method].bytes,
|
||||
0, init[cam->method][i].bytes,
|
||||
init[cam->method][i].size);
|
||||
if (err < 0) {
|
||||
dev_err(&udev->dev, "error during release sequence\n");
|
||||
|
|
Загрузка…
Ссылка в новой задаче