aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/siano/smscoreapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/siano/smscoreapi.h')
-rw-r--r--drivers/media/dvb/siano/smscoreapi.h55
1 files changed, 53 insertions, 2 deletions
diff --git a/drivers/media/dvb/siano/smscoreapi.h b/drivers/media/dvb/siano/smscoreapi.h
index 6e23c5f6808..03bdc94950f 100644
--- a/drivers/media/dvb/siano/smscoreapi.h
+++ b/drivers/media/dvb/siano/smscoreapi.h
@@ -549,7 +549,7 @@ struct SMSHOSTLIB_I2C_RES_ST {
549}; 549};
550 550
551 551
552struct smscore_gpio_config { 552struct smscore_config_gpio {
553#define SMS_GPIO_DIRECTION_INPUT 0 553#define SMS_GPIO_DIRECTION_INPUT 0
554#define SMS_GPIO_DIRECTION_OUTPUT 1 554#define SMS_GPIO_DIRECTION_OUTPUT 1
555 u8 direction; 555 u8 direction;
@@ -575,6 +575,48 @@ struct smscore_gpio_config {
575 u8 outputdriving; 575 u8 outputdriving;
576}; 576};
577 577
578struct smscore_gpio_config {
579#define SMS_GPIO_DIRECTION_INPUT 0
580#define SMS_GPIO_DIRECTION_OUTPUT 1
581 u8 Direction;
582
583#define SMS_GPIO_PULLUPDOWN_NONE 0
584#define SMS_GPIO_PULLUPDOWN_PULLDOWN 1
585#define SMS_GPIO_PULLUPDOWN_PULLUP 2
586#define SMS_GPIO_PULLUPDOWN_KEEPER 3
587 u8 PullUpDown;
588
589#define SMS_GPIO_INPUT_CHARACTERISTICS_NORMAL 0
590#define SMS_GPIO_INPUT_CHARACTERISTICS_SCHMITT 1
591 u8 InputCharacteristics;
592
593#define SMS_GPIO_OUTPUT_SLEW_RATE_SLOW 1 /* 10xx */
594#define SMS_GPIO_OUTPUT_SLEW_RATE_FAST 0 /* 10xx */
595
596
597#define SMS_GPIO_OUTPUT_SLEW_RATE_0_45_V_NS 0 /* 11xx */
598#define SMS_GPIO_OUTPUT_SLEW_RATE_0_9_V_NS 1 /* 11xx */
599#define SMS_GPIO_OUTPUT_SLEW_RATE_1_7_V_NS 2 /* 11xx */
600#define SMS_GPIO_OUTPUT_SLEW_RATE_3_3_V_NS 3 /* 11xx */
601 u8 OutputSlewRate;
602
603#define SMS_GPIO_OUTPUT_DRIVING_S_4mA 0 /* 10xx */
604#define SMS_GPIO_OUTPUT_DRIVING_S_8mA 1 /* 10xx */
605#define SMS_GPIO_OUTPUT_DRIVING_S_12mA 2 /* 10xx */
606#define SMS_GPIO_OUTPUT_DRIVING_S_16mA 3 /* 10xx */
607
608#define SMS_GPIO_OUTPUT_DRIVING_1_5mA 0 /* 11xx */
609#define SMS_GPIO_OUTPUT_DRIVING_2_8mA 1 /* 11xx */
610#define SMS_GPIO_OUTPUT_DRIVING_4mA 2 /* 11xx */
611#define SMS_GPIO_OUTPUT_DRIVING_7mA 3 /* 11xx */
612#define SMS_GPIO_OUTPUT_DRIVING_10mA 4 /* 11xx */
613#define SMS_GPIO_OUTPUT_DRIVING_11mA 5 /* 11xx */
614#define SMS_GPIO_OUTPUT_DRIVING_14mA 6 /* 11xx */
615#undef SMS_GPIO_OUTPUT_DRIVING_16mA
616#define SMS_GPIO_OUTPUT_DRIVING_16mA 7 /* 11xx */
617 u8 OutputDriving;
618};
619
578extern void smscore_registry_setmode(char *devpath, int mode); 620extern void smscore_registry_setmode(char *devpath, int mode);
579extern int smscore_registry_getmode(char *devpath); 621extern int smscore_registry_getmode(char *devpath);
580 622
@@ -616,10 +658,19 @@ struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev);
616extern void smscore_putbuffer(struct smscore_device_t *coredev, 658extern void smscore_putbuffer(struct smscore_device_t *coredev,
617 struct smscore_buffer_t *cb); 659 struct smscore_buffer_t *cb);
618 660
661/* old GPIO managment */
619int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin, 662int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin,
620 struct smscore_gpio_config *pinconfig); 663 struct smscore_config_gpio *pinconfig);
621int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level); 664int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level);
622 665
666/* new GPIO managment */
667extern int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum,
668 struct smscore_gpio_config *pGpioConfig);
669extern int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 PinNum,
670 u8 NewLevel);
671extern int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 PinNum,
672 u8 *level);
673
623void smscore_set_board_id(struct smscore_device_t *core, int id); 674void smscore_set_board_id(struct smscore_device_t *core, int id);
624int smscore_get_board_id(struct smscore_device_t *core); 675int smscore_get_board_id(struct smscore_device_t *core);
625 676