diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx.h')
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 91dce95cd19c..5b21efaf7844 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -365,7 +365,8 @@ struct em28xx { | |||
365 | unsigned int video_bytesread; /* Number of bytes read */ | 365 | unsigned int video_bytesread; /* Number of bytes read */ |
366 | 366 | ||
367 | unsigned long hash; /* eeprom hash - for boards with generic ID */ | 367 | unsigned long hash; /* eeprom hash - for boards with generic ID */ |
368 | unsigned long i2c_hash; /* i2c devicelist hash - for boards with generic ID */ | 368 | unsigned long i2c_hash; /* i2c devicelist hash - |
369 | for boards with generic ID */ | ||
369 | 370 | ||
370 | struct em28xx_audio *adev; | 371 | struct em28xx_audio *adev; |
371 | 372 | ||
@@ -399,14 +400,14 @@ struct em28xx { | |||
399 | struct urb *urb[EM28XX_NUM_BUFS]; /* urb for isoc transfers */ | 400 | struct urb *urb[EM28XX_NUM_BUFS]; /* urb for isoc transfers */ |
400 | char *transfer_buffer[EM28XX_NUM_BUFS]; /* transfer buffers for isoc transfer */ | 401 | char *transfer_buffer[EM28XX_NUM_BUFS]; /* transfer buffers for isoc transfer */ |
401 | /* helper funcs that call usb_control_msg */ | 402 | /* helper funcs that call usb_control_msg */ |
402 | int (*em28xx_write_regs) (struct em28xx * dev, u16 reg, char *buf, | 403 | int (*em28xx_write_regs) (struct em28xx *dev, u16 reg, |
403 | int len); | ||
404 | int (*em28xx_read_reg) (struct em28xx * dev, u16 reg); | ||
405 | int (*em28xx_read_reg_req_len) (struct em28xx * dev, u8 req, u16 reg, | ||
406 | char *buf, int len); | 404 | char *buf, int len); |
407 | int (*em28xx_write_regs_req) (struct em28xx * dev, u8 req, u16 reg, | 405 | int (*em28xx_read_reg) (struct em28xx *dev, u16 reg); |
406 | int (*em28xx_read_reg_req_len) (struct em28xx *dev, u8 req, u16 reg, | ||
407 | char *buf, int len); | ||
408 | int (*em28xx_write_regs_req) (struct em28xx *dev, u8 req, u16 reg, | ||
408 | char *buf, int len); | 409 | char *buf, int len); |
409 | int (*em28xx_read_reg_req) (struct em28xx * dev, u8 req, u16 reg); | 410 | int (*em28xx_read_reg_req) (struct em28xx *dev, u8 req, u16 reg); |
410 | 411 | ||
411 | enum em28xx_mode mode; | 412 | enum em28xx_mode mode; |
412 | 413 | ||
@@ -459,7 +460,7 @@ int em28xx_register_extension(struct em28xx_ops *dev); | |||
459 | void em28xx_unregister_extension(struct em28xx_ops *dev); | 460 | void em28xx_unregister_extension(struct em28xx_ops *dev); |
460 | 461 | ||
461 | /* Provided by em28xx-cards.c */ | 462 | /* Provided by em28xx-cards.c */ |
462 | extern int em2800_variant_detect(struct usb_device* udev,int model); | 463 | extern int em2800_variant_detect(struct usb_device *udev, int model); |
463 | extern void em28xx_pre_card_setup(struct em28xx *dev); | 464 | extern void em28xx_pre_card_setup(struct em28xx *dev); |
464 | extern void em28xx_card_setup(struct em28xx *dev); | 465 | extern void em28xx_card_setup(struct em28xx *dev); |
465 | extern struct em28xx_board em28xx_boards[]; | 466 | extern struct em28xx_board em28xx_boards[]; |
@@ -557,80 +558,80 @@ int em28xx_get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key, | |||
557 | printk(KERN_WARNING "%s: "fmt,\ | 558 | printk(KERN_WARNING "%s: "fmt,\ |
558 | dev->name , ##arg); } while (0) | 559 | dev->name , ##arg); } while (0) |
559 | 560 | ||
560 | inline static int em28xx_compression_disable(struct em28xx *dev) | 561 | static inline int em28xx_compression_disable(struct em28xx *dev) |
561 | { | 562 | { |
562 | /* side effect of disabling scaler and mixer */ | 563 | /* side effect of disabling scaler and mixer */ |
563 | return em28xx_write_regs(dev, COMPR_REG, "\x00", 1); | 564 | return em28xx_write_regs(dev, COMPR_REG, "\x00", 1); |
564 | } | 565 | } |
565 | 566 | ||
566 | inline static int em28xx_contrast_get(struct em28xx *dev) | 567 | static inline int em28xx_contrast_get(struct em28xx *dev) |
567 | { | 568 | { |
568 | return em28xx_read_reg(dev, YGAIN_REG) & 0x1f; | 569 | return em28xx_read_reg(dev, YGAIN_REG) & 0x1f; |
569 | } | 570 | } |
570 | 571 | ||
571 | inline static int em28xx_brightness_get(struct em28xx *dev) | 572 | static inline int em28xx_brightness_get(struct em28xx *dev) |
572 | { | 573 | { |
573 | return em28xx_read_reg(dev, YOFFSET_REG); | 574 | return em28xx_read_reg(dev, YOFFSET_REG); |
574 | } | 575 | } |
575 | 576 | ||
576 | inline static int em28xx_saturation_get(struct em28xx *dev) | 577 | static inline int em28xx_saturation_get(struct em28xx *dev) |
577 | { | 578 | { |
578 | return em28xx_read_reg(dev, UVGAIN_REG) & 0x1f; | 579 | return em28xx_read_reg(dev, UVGAIN_REG) & 0x1f; |
579 | } | 580 | } |
580 | 581 | ||
581 | inline static int em28xx_u_balance_get(struct em28xx *dev) | 582 | static inline int em28xx_u_balance_get(struct em28xx *dev) |
582 | { | 583 | { |
583 | return em28xx_read_reg(dev, UOFFSET_REG); | 584 | return em28xx_read_reg(dev, UOFFSET_REG); |
584 | } | 585 | } |
585 | 586 | ||
586 | inline static int em28xx_v_balance_get(struct em28xx *dev) | 587 | static inline int em28xx_v_balance_get(struct em28xx *dev) |
587 | { | 588 | { |
588 | return em28xx_read_reg(dev, VOFFSET_REG); | 589 | return em28xx_read_reg(dev, VOFFSET_REG); |
589 | } | 590 | } |
590 | 591 | ||
591 | inline static int em28xx_gamma_get(struct em28xx *dev) | 592 | static inline int em28xx_gamma_get(struct em28xx *dev) |
592 | { | 593 | { |
593 | return em28xx_read_reg(dev, GAMMA_REG) & 0x3f; | 594 | return em28xx_read_reg(dev, GAMMA_REG) & 0x3f; |
594 | } | 595 | } |
595 | 596 | ||
596 | inline static int em28xx_contrast_set(struct em28xx *dev, s32 val) | 597 | static inline int em28xx_contrast_set(struct em28xx *dev, s32 val) |
597 | { | 598 | { |
598 | u8 tmp = (u8) val; | 599 | u8 tmp = (u8) val; |
599 | return em28xx_write_regs(dev, YGAIN_REG, &tmp, 1); | 600 | return em28xx_write_regs(dev, YGAIN_REG, &tmp, 1); |
600 | } | 601 | } |
601 | 602 | ||
602 | inline static int em28xx_brightness_set(struct em28xx *dev, s32 val) | 603 | static inline int em28xx_brightness_set(struct em28xx *dev, s32 val) |
603 | { | 604 | { |
604 | u8 tmp = (u8) val; | 605 | u8 tmp = (u8) val; |
605 | return em28xx_write_regs(dev, YOFFSET_REG, &tmp, 1); | 606 | return em28xx_write_regs(dev, YOFFSET_REG, &tmp, 1); |
606 | } | 607 | } |
607 | 608 | ||
608 | inline static int em28xx_saturation_set(struct em28xx *dev, s32 val) | 609 | static inline int em28xx_saturation_set(struct em28xx *dev, s32 val) |
609 | { | 610 | { |
610 | u8 tmp = (u8) val; | 611 | u8 tmp = (u8) val; |
611 | return em28xx_write_regs(dev, UVGAIN_REG, &tmp, 1); | 612 | return em28xx_write_regs(dev, UVGAIN_REG, &tmp, 1); |
612 | } | 613 | } |
613 | 614 | ||
614 | inline static int em28xx_u_balance_set(struct em28xx *dev, s32 val) | 615 | static inline int em28xx_u_balance_set(struct em28xx *dev, s32 val) |
615 | { | 616 | { |
616 | u8 tmp = (u8) val; | 617 | u8 tmp = (u8) val; |
617 | return em28xx_write_regs(dev, UOFFSET_REG, &tmp, 1); | 618 | return em28xx_write_regs(dev, UOFFSET_REG, &tmp, 1); |
618 | } | 619 | } |
619 | 620 | ||
620 | inline static int em28xx_v_balance_set(struct em28xx *dev, s32 val) | 621 | static inline int em28xx_v_balance_set(struct em28xx *dev, s32 val) |
621 | { | 622 | { |
622 | u8 tmp = (u8) val; | 623 | u8 tmp = (u8) val; |
623 | return em28xx_write_regs(dev, VOFFSET_REG, &tmp, 1); | 624 | return em28xx_write_regs(dev, VOFFSET_REG, &tmp, 1); |
624 | } | 625 | } |
625 | 626 | ||
626 | inline static int em28xx_gamma_set(struct em28xx *dev, s32 val) | 627 | static inline int em28xx_gamma_set(struct em28xx *dev, s32 val) |
627 | { | 628 | { |
628 | u8 tmp = (u8) val; | 629 | u8 tmp = (u8) val; |
629 | return em28xx_write_regs(dev, GAMMA_REG, &tmp, 1); | 630 | return em28xx_write_regs(dev, GAMMA_REG, &tmp, 1); |
630 | } | 631 | } |
631 | 632 | ||
632 | /*FIXME: maxw should be dependent of alt mode */ | 633 | /*FIXME: maxw should be dependent of alt mode */ |
633 | inline static unsigned int norm_maxw(struct em28xx *dev) | 634 | static inline unsigned int norm_maxw(struct em28xx *dev) |
634 | { | 635 | { |
635 | if (dev->max_range_640_480) | 636 | if (dev->max_range_640_480) |
636 | return 640; | 637 | return 640; |
@@ -638,7 +639,7 @@ inline static unsigned int norm_maxw(struct em28xx *dev) | |||
638 | return 720; | 639 | return 720; |
639 | } | 640 | } |
640 | 641 | ||
641 | inline static unsigned int norm_maxh(struct em28xx *dev) | 642 | static inline unsigned int norm_maxh(struct em28xx *dev) |
642 | { | 643 | { |
643 | if (dev->max_range_640_480) | 644 | if (dev->max_range_640_480) |
644 | return 480; | 645 | return 480; |