aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/mxc/s1d13521_debug.h
blob: 2a0cd5af1e5e1159f090d4d79a3a5bb36c90fa6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//-----------------------------------------------------------------------------
//
// linux/drivers/video/epson/s1d13521fb.h --
// Function header for Epson S1D13521 controller frame buffer drivers.
//
// Copyright(c) Seiko Epson Corporation 2000-2008.
// All rights reserved.
//
// This file is subject to the terms and conditions of the GNU General Public
// License. See the file COPYING in the main directory of this archive for
// more details.
//
//----------------------------------------------------------------------------

#ifndef __S1D13521_DEBUG_H__
  #define __S1D13521_DEBUG_H__

  #include <linux/kernel.h>

  //-----------------------------------------------------------------------------
  // Global Function Prototypes
  //-----------------------------------------------------------------------------
  
//  #undef CONFIG_FB_EPSON_DEBUG_PRINTK

  #ifdef CONFIG_FB_EPSON_DEBUG_PRINTK
//    #define dbg_info(fmt, args...) do { printk(KERN_INFO fmt, ## args); } while (0)
    #define dbg_info(fmt, args...) 				   do { printk(KERN_INFO fmt, ## args); } while (0)
    #define DEBUGMSG(con, fmt, args...) 		   do { if(con != 0) printk(fmt, ## args); } while (0)
    #define DEBUGMSG_FUNC_ENTER(con) 			   do { if(con != 0) printk("%s]+++\n", __FUNCTION__); } while (0)
    #define DEBUGMSG_FUNC_EXIT(con) 			   do { if(con != 0) printk("%s]---\n", __FUNCTION__); } while (0)
    #define DEBUGMSG_FUNC_EXIT_CODE(con, x) 	   do { if(con != 0) printk("%s]--- ret=%d\n", __FUNCTION__, x); } while (0)
  #else
    #define dbg_info(fmt, args...) 					do { } while (0)
    #define DEBUGMSG(con, fmt, args...) 			do { } while (0)
    #define DEBUGMSG_FUNC_ENTER(con) 				do { } while (0)
    #define DEBUGMSG_FUNC_EXIT(con) 				do { } while (0)
    #define DEBUGMSG_FUNC_EXIT_CODE(con, code) 		do { } while (0)
  #endif

  #ifdef CONFIG_FB_EPSON_DEBUG_PRINTK
    #define assert(expr) \
          if(!(expr)) { \
          printk( "Assertion failed! %s,%s,%s,line=%d\n",\
          #expr,__FILE__,__FUNCTION__,__LINE__); \
          BUG(); \
          }
  #else
    #define assert(expr)
  #endif


#endif  //__S1D13521_DEBUG_H__