Go to the documentation of this file.
23 #ifndef __STV6110x_PRIV_H
24 #define __STV6110x_PRIV_H
32 #define dprintk(__y, __z, format, arg...) do { \
34 if ((verbose > FE_ERROR) && (verbose > __y)) \
35 printk(KERN_ERR "%s: " format "\n", __func__ , ##arg); \
36 else if ((verbose > FE_NOTICE) && (verbose > __y)) \
37 printk(KERN_NOTICE "%s: " format "\n", __func__ , ##arg); \
38 else if ((verbose > FE_INFO) && (verbose > __y)) \
39 printk(KERN_INFO "%s: " format "\n", __func__ , ##arg); \
40 else if ((verbose > FE_DEBUG) && (verbose > __y)) \
41 printk(KERN_DEBUG "%s: " format "\n", __func__ , ##arg); \
44 printk(format, ##arg); \
49 #define STV6110x_SETFIELD(mask, bitf, val) \
50 (mask = (mask & (~(((1 << STV6110x_WIDTH_##bitf) - 1) << \
51 STV6110x_OFFST_##bitf))) | \
52 (val << STV6110x_OFFST_##bitf))
54 #define STV6110x_GETFIELD(bitf, val) \
55 ((val >> STV6110x_OFFST_##bitf) & \
56 ((1 << STV6110x_WIDTH_##bitf) - 1))
58 #define MAKEWORD16(a, b) (((a) << 8) | (b))
60 #define LSB(x) ((x & 0xff))
61 #define MSB(y) ((y >> 8) & 0xff)
64 #define R_DIV(__div) (1 << (__div + 1))
65 #define REFCLOCK_kHz (stv6110x->config->refclk / 1000)
66 #define REFCLOCK_MHz (stv6110x->config->refclk / 1000000)