~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/lcd.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/lcd.h (Version linux-6.11-rc3) and /include/linux/lcd.h (Version unix-v6-master)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 
  2 /*                                                
  3  * LCD Lowlevel Control Abstraction               
  4  *                                                
  5  * Copyright (C) 2003,2004 Hewlett-Packard Com    
  6  *                                                
  7  */                                               
  8                                                   
  9 #ifndef _LINUX_LCD_H                              
 10 #define _LINUX_LCD_H                              
 11                                                   
 12 #include <linux/device.h>                         
 13 #include <linux/mutex.h>                          
 14 #include <linux/notifier.h>                       
 15 #include <linux/fb.h>                             
 16                                                   
 17 /* Notes on locking:                              
 18  *                                                
 19  * lcd_device->ops_lock is an internal backlig    
 20  * field and no code outside the core should n    
 21  *                                                
 22  * Access to set_power() is serialised by the     
 23  * most drivers seem to need this and historic    
 24  *                                                
 25  * Most drivers don't need locking on their ge    
 26  * If yours does, you need to implement it in     
 27  * update_lock mutex if appropriate.              
 28  *                                                
 29  * Any other use of the locks below is probabl    
 30  */                                               
 31                                                   
 32 struct lcd_device;                                
 33 struct fb_info;                                   
 34                                                   
 35 struct lcd_properties {                           
 36         /* The maximum value for contrast (rea    
 37         int max_contrast;                         
 38 };                                                
 39                                                   
 40 struct lcd_ops {                                  
 41         /* Get the LCD panel power status (0:     
 42            power on, flat panel power off, 4:     
 43         int (*get_power)(struct lcd_device *);    
 44         /* Enable or disable power to the LCD     
 45         int (*set_power)(struct lcd_device *,     
 46         /* Get the current contrast setting (0    
 47         int (*get_contrast)(struct lcd_device     
 48         /* Set LCD panel contrast */              
 49         int (*set_contrast)(struct lcd_device     
 50         /* Set LCD panel mode (resolutions ...    
 51         int (*set_mode)(struct lcd_device *, s    
 52         /* Check if given framebuffer device i    
 53            return 0 if not, !=0 if it is. If N    
 54         int (*check_fb)(struct lcd_device *, s    
 55 };                                                
 56                                                   
 57 struct lcd_device {                               
 58         struct lcd_properties props;              
 59         /* This protects the 'ops' field. If '    
 60            registered this device has been unl    
 61            points to something in the body of     
 62         struct mutex ops_lock;                    
 63         /* If this is NULL, the backing module    
 64         const struct lcd_ops *ops;                
 65         /* Serialise access to set_power metho    
 66         struct mutex update_lock;                 
 67         /* The framebuffer notifier block */      
 68         struct notifier_block fb_notif;           
 69                                                   
 70         struct device dev;                        
 71 };                                                
 72                                                   
 73 struct lcd_platform_data {                        
 74         /* reset lcd panel device. */             
 75         int (*reset)(struct lcd_device *ld);      
 76         /* on or off to lcd panel. if 'enable'    
 77            lcd power off and 1, lcd power on.     
 78         int (*power_on)(struct lcd_device *ld,    
 79                                                   
 80         /* it indicates whether lcd panel was     
 81            from bootloader or not. */             
 82         int lcd_enabled;                          
 83         /* it means delay for stable time when    
 84            or high to low that is dependent on    
 85            low active or high active. */          
 86         unsigned int reset_delay;                 
 87         /* stable time needing to become lcd p    
 88         unsigned int power_on_delay;              
 89         /* stable time needing to become lcd p    
 90         unsigned int power_off_delay;             
 91                                                   
 92         /* it could be used for any purpose. *    
 93         void *pdata;                              
 94 };                                                
 95                                                   
 96 static inline void lcd_set_power(struct lcd_de    
 97 {                                                 
 98         mutex_lock(&ld->update_lock);             
 99         if (ld->ops && ld->ops->set_power)        
100                 ld->ops->set_power(ld, power);    
101         mutex_unlock(&ld->update_lock);           
102 }                                                 
103                                                   
104 extern struct lcd_device *lcd_device_register(    
105         struct device *parent, void *devdata,     
106 extern struct lcd_device *devm_lcd_device_regi    
107         const char *name, struct device *paren    
108         void *devdata, const struct lcd_ops *o    
109 extern void lcd_device_unregister(struct lcd_d    
110 extern void devm_lcd_device_unregister(struct     
111         struct lcd_device *ld);                   
112                                                   
113 #define to_lcd_device(obj) container_of(obj, s    
114                                                   
115 static inline void * lcd_get_data(struct lcd_d    
116 {                                                 
117         return dev_get_drvdata(&ld_dev->dev);     
118 }                                                 
119                                                   
120                                                   
121 #endif                                            
122                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php