diff options
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.h')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.h | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h index 783fb4449b0e..93a008409f49 100644 --- a/drivers/media/video/ivtv/ivtv-driver.h +++ b/drivers/media/video/ivtv/ivtv-driver.h | |||
@@ -256,17 +256,18 @@ extern const u32 yuv_offset[4]; | |||
256 | 256 | ||
257 | /* debugging */ | 257 | /* debugging */ |
258 | 258 | ||
259 | #define IVTV_DBGFLG_WARN (1 << 0) | 259 | #define IVTV_DBGFLG_WARN (1 << 0) |
260 | #define IVTV_DBGFLG_INFO (1 << 1) | 260 | #define IVTV_DBGFLG_INFO (1 << 1) |
261 | #define IVTV_DBGFLG_API (1 << 2) | 261 | #define IVTV_DBGFLG_MB (1 << 2) |
262 | #define IVTV_DBGFLG_DMA (1 << 3) | 262 | #define IVTV_DBGFLG_IOCTL (1 << 3) |
263 | #define IVTV_DBGFLG_IOCTL (1 << 4) | 263 | #define IVTV_DBGFLG_FILE (1 << 4) |
264 | #define IVTV_DBGFLG_I2C (1 << 5) | 264 | #define IVTV_DBGFLG_DMA (1 << 5) |
265 | #define IVTV_DBGFLG_IRQ (1 << 6) | 265 | #define IVTV_DBGFLG_IRQ (1 << 6) |
266 | #define IVTV_DBGFLG_DEC (1 << 7) | 266 | #define IVTV_DBGFLG_DEC (1 << 7) |
267 | #define IVTV_DBGFLG_YUV (1 << 8) | 267 | #define IVTV_DBGFLG_YUV (1 << 8) |
268 | #define IVTV_DBGFLG_I2C (1 << 9) | ||
268 | /* Flag to turn on high volume debugging */ | 269 | /* Flag to turn on high volume debugging */ |
269 | #define IVTV_DBGFLG_HIGHVOL (1 << 9) | 270 | #define IVTV_DBGFLG_HIGHVOL (1 << 10) |
270 | 271 | ||
271 | /* NOTE: extra space before comma in 'itv->num , ## args' is required for | 272 | /* NOTE: extra space before comma in 'itv->num , ## args' is required for |
272 | gcc-2.95, otherwise it won't compile. */ | 273 | gcc-2.95, otherwise it won't compile. */ |
@@ -275,30 +276,32 @@ extern const u32 yuv_offset[4]; | |||
275 | if ((x) & ivtv_debug) \ | 276 | if ((x) & ivtv_debug) \ |
276 | printk(KERN_INFO "ivtv%d " type ": " fmt, itv->num , ## args); \ | 277 | printk(KERN_INFO "ivtv%d " type ": " fmt, itv->num , ## args); \ |
277 | } while (0) | 278 | } while (0) |
278 | #define IVTV_DEBUG_WARN(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_WARN, "warning", fmt , ## args) | 279 | #define IVTV_DEBUG_WARN(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_WARN, "warn", fmt , ## args) |
279 | #define IVTV_DEBUG_INFO(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_INFO, "info",fmt , ## args) | 280 | #define IVTV_DEBUG_INFO(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_INFO, "info", fmt , ## args) |
280 | #define IVTV_DEBUG_API(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_API, "api", fmt , ## args) | 281 | #define IVTV_DEBUG_MB(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_MB, "mb", fmt , ## args) |
281 | #define IVTV_DEBUG_DMA(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_DMA, "dma", fmt , ## args) | 282 | #define IVTV_DEBUG_DMA(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_DMA, "dma", fmt , ## args) |
282 | #define IVTV_DEBUG_IOCTL(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_IOCTL, "ioctl", fmt , ## args) | 283 | #define IVTV_DEBUG_IOCTL(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_IOCTL, "ioctl", fmt , ## args) |
283 | #define IVTV_DEBUG_I2C(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_I2C, "i2c", fmt , ## args) | 284 | #define IVTV_DEBUG_FILE(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_FILE, "file", fmt , ## args) |
284 | #define IVTV_DEBUG_IRQ(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_IRQ, "irq", fmt , ## args) | 285 | #define IVTV_DEBUG_I2C(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_I2C, "i2c", fmt , ## args) |
285 | #define IVTV_DEBUG_DEC(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_DEC, "dec", fmt , ## args) | 286 | #define IVTV_DEBUG_IRQ(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_IRQ, "irq", fmt , ## args) |
286 | #define IVTV_DEBUG_YUV(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_YUV, "yuv", fmt , ## args) | 287 | #define IVTV_DEBUG_DEC(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_DEC, "dec", fmt , ## args) |
288 | #define IVTV_DEBUG_YUV(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_YUV, "yuv", fmt , ## args) | ||
287 | 289 | ||
288 | #define IVTV_DEBUG_HIGH_VOL(x, type, fmt, args...) \ | 290 | #define IVTV_DEBUG_HIGH_VOL(x, type, fmt, args...) \ |
289 | do { \ | 291 | do { \ |
290 | if (((x) & ivtv_debug) && (ivtv_debug & IVTV_DBGFLG_HIGHVOL)) \ | 292 | if (((x) & ivtv_debug) && (ivtv_debug & IVTV_DBGFLG_HIGHVOL)) \ |
291 | printk(KERN_INFO "ivtv%d " type ": " fmt, itv->num , ## args); \ | 293 | printk(KERN_INFO "ivtv%d " type ": " fmt, itv->num , ## args); \ |
292 | } while (0) | 294 | } while (0) |
293 | #define IVTV_DEBUG_HI_WARN(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_WARN, "warning", fmt , ## args) | 295 | #define IVTV_DEBUG_HI_WARN(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_WARN, "warn", fmt , ## args) |
294 | #define IVTV_DEBUG_HI_INFO(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_INFO, "info",fmt , ## args) | 296 | #define IVTV_DEBUG_HI_INFO(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_INFO, "info", fmt , ## args) |
295 | #define IVTV_DEBUG_HI_API(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_API, "api", fmt , ## args) | 297 | #define IVTV_DEBUG_HI_MB(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_MB, "mb", fmt , ## args) |
296 | #define IVTV_DEBUG_HI_DMA(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_DMA, "dma", fmt , ## args) | 298 | #define IVTV_DEBUG_HI_DMA(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_DMA, "dma", fmt , ## args) |
297 | #define IVTV_DEBUG_HI_IOCTL(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_IOCTL, "ioctl", fmt , ## args) | 299 | #define IVTV_DEBUG_HI_IOCTL(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_IOCTL, "ioctl", fmt , ## args) |
298 | #define IVTV_DEBUG_HI_I2C(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_I2C, "i2c", fmt , ## args) | 300 | #define IVTV_DEBUG_HI_FILE(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_FILE, "file", fmt , ## args) |
299 | #define IVTV_DEBUG_HI_IRQ(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_IRQ, "irq", fmt , ## args) | 301 | #define IVTV_DEBUG_HI_I2C(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_I2C, "i2c", fmt , ## args) |
300 | #define IVTV_DEBUG_HI_DEC(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_DEC, "dec", fmt , ## args) | 302 | #define IVTV_DEBUG_HI_IRQ(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_IRQ, "irq", fmt , ## args) |
301 | #define IVTV_DEBUG_HI_YUV(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_YUV, "yuv", fmt , ## args) | 303 | #define IVTV_DEBUG_HI_DEC(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_DEC, "dec", fmt , ## args) |
304 | #define IVTV_DEBUG_HI_YUV(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_YUV, "yuv", fmt , ## args) | ||
302 | 305 | ||
303 | /* Standard kernel messages */ | 306 | /* Standard kernel messages */ |
304 | #define IVTV_ERR(fmt, args...) printk(KERN_ERR "ivtv%d: " fmt, itv->num , ## args) | 307 | #define IVTV_ERR(fmt, args...) printk(KERN_ERR "ivtv%d: " fmt, itv->num , ## args) |