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

TOMOYO Linux Cross Reference
Linux/Documentation/userspace-api/gpio/chardev.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ 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.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/userspace-api/gpio/chardev.rst (Version linux-6.12-rc7) and /Documentation/userspace-api/gpio/chardev.rst (Version linux-5.14.21)


  1 .. SPDX-License-Identifier: GPL-2.0               
  2                                                   
  3 ===================================               
  4 GPIO Character Device Userspace API               
  5 ===================================               
  6                                                   
  7 This is latest version (v2) of the character d    
  8 ``include/uapi/linux/gpio.h.``                    
  9                                                   
 10 First added in 5.10.                              
 11                                                   
 12 .. note::                                         
 13    Do NOT abuse userspace APIs to control hard    
 14    drivers. There may already be a driver for     
 15    kernel driver is sure to provide a superior    
 16    from userspace.                                
 17                                                   
 18    Read Documentation/driver-api/gpio/drivers-    
 19    kernel wheels in userspace.                    
 20                                                   
 21    Similarly, for multi-function lines there m    
 22    Documentation/spi/index.rst, Documentation/    
 23    Documentation/driver-api/pwm.rst, Documenta    
 24    provide suitable drivers and APIs for your     
 25                                                   
 26 Basic examples using the character device API     
 27                                                   
 28 The API is based around two major objects, the    
 29 :ref:`gpio-v2-line-request`.                      
 30                                                   
 31 .. _gpio-v2-chip:                                 
 32                                                   
 33 Chip                                              
 34 ====                                              
 35                                                   
 36 The Chip represents a single GPIO chip and is     
 37 files of the form ``/dev/gpiochipX``.             
 38                                                   
 39 Each chip supports a number of GPIO lines,        
 40 :c:type:`chip.lines<gpiochip_info>`. Lines on     
 41 ``offset`` in the range from 0 to ``chip.lines    
 42                                                   
 43 Lines are requested from the chip using gpio-v    
 44 and the resulting line request is used to acce    
 45 monitor the lines for edge events.                
 46                                                   
 47 Within this documentation, the file descriptor    
 48 on the GPIO device file is referred to as ``ch    
 49                                                   
 50 Operations                                        
 51 ----------                                        
 52                                                   
 53 The following operations may be performed on t    
 54                                                   
 55 .. toctree::                                      
 56    :titlesonly:                                   
 57                                                   
 58    Get Line <gpio-v2-get-line-ioctl>              
 59    Get Chip Info <gpio-get-chipinfo-ioctl>        
 60    Get Line Info <gpio-v2-get-lineinfo-ioctl>     
 61    Watch Line Info <gpio-v2-get-lineinfo-watch    
 62    Unwatch Line Info <gpio-get-lineinfo-unwatc    
 63    Read Line Info Changed Events <gpio-v2-line    
 64                                                   
 65 .. _gpio-v2-line-request:                         
 66                                                   
 67 Line Request                                      
 68 ============                                      
 69                                                   
 70 Line requests are created by gpio-v2-get-line-    
 71 access to a set of requested lines.  The line     
 72 via the anonymous file descriptor returned in     
 73 :c:type:`request.fd<gpio_v2_line_request>` by     
 74                                                   
 75 Within this documentation, the line request fi    
 76 as ``req_fd``.                                    
 77                                                   
 78 Operations                                        
 79 ----------                                        
 80                                                   
 81 The following operations may be performed on t    
 82                                                   
 83 .. toctree::                                      
 84    :titlesonly:                                   
 85                                                   
 86    Get Line Values <gpio-v2-line-get-values-io    
 87    Set Line Values <gpio-v2-line-set-values-io    
 88    Read Line Edge Events <gpio-v2-line-event-r    
 89    Reconfigure Lines <gpio-v2-line-set-config-    
 90                                                   
 91 Types                                             
 92 =====                                             
 93                                                   
 94 This section contains the structs and enums th    
 95 as defined in ``include/uapi/linux/gpio.h``.      
 96                                                   
 97 .. kernel-doc:: include/uapi/linux/gpio.h         
 98    :identifiers:                                  
 99     gpio_v2_line_attr_id                          
100     gpio_v2_line_attribute                        
101     gpio_v2_line_changed_type                     
102     gpio_v2_line_config                           
103     gpio_v2_line_config_attribute                 
104     gpio_v2_line_event                            
105     gpio_v2_line_event_id                         
106     gpio_v2_line_flag                             
107     gpio_v2_line_info                             
108     gpio_v2_line_info_changed                     
109     gpio_v2_line_request                          
110     gpio_v2_line_values                           
111     gpiochip_info                                 
112                                                   
113 .. toctree::                                      
114    :hidden:                                       
115                                                   
116    error-codes                                    
                                                      

~ [ 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