From: H Hartley Sweeten Date: Mon, 17 Aug 2015 23:58:12 +0000 (-0700) Subject: staging: comedi: s526: define the timer control register and bits X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4e04fd32599bb4e0f2574708e5d48f1f78d80761;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: s526: define the timer control register and bits Define this register and it's bits so that we can possibly support it. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/s526.c b/drivers/staging/comedi/drivers/s526.c index c011c7005e38..e329c0470492 100644 --- a/drivers/staging/comedi/drivers/s526.c +++ b/drivers/staging/comedi/drivers/s526.c @@ -46,7 +46,12 @@ #define S526_NUM_PORTS 27 /* registers */ -#define REG_TCR 0x00 +#define S526_TIMER_REG 0x00 +#define S526_TIMER_LOAD(x) (((x) & 0xff) << 8) +#define S526_TIMER_MODE ((x) << 1) +#define S526_TIMER_MANUAL S526_TIMER_MODE(0) +#define S526_TIMER_AUTO S526_TIMER_MODE(1) +#define S526_TIMER_RESTART BIT(0) #define REG_WDC 0x02 #define REG_DAC 0x04 #define REG_ADC 0x06