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

TOMOYO Linux Cross Reference
Linux/include/linux/usb/pd_ado.h

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 /include/linux/usb/pd_ado.h (Architecture sparc) and /include/linux/usb/pd_ado.h (Architecture m68k)


  1 // SPDX-License-Identifier: GPL-2.0+                1 // SPDX-License-Identifier: GPL-2.0+
  2 /*                                                  2 /*
  3  * Copyright (c) 2017 Dialog Semiconductor          3  * Copyright (c) 2017 Dialog Semiconductor
  4  *                                                  4  *
  5  * Author: Adam Thomson <Adam.Thomson.Opensour      5  * Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
  6  */                                                 6  */
  7                                                     7 
  8 #ifndef __LINUX_USB_PD_ADO_H                        8 #ifndef __LINUX_USB_PD_ADO_H
  9 #define __LINUX_USB_PD_ADO_H                        9 #define __LINUX_USB_PD_ADO_H
 10                                                    10 
 11 /* ADO : Alert Data Object */                      11 /* ADO : Alert Data Object */
 12 #define USB_PD_ADO_TYPE_SHIFT                      12 #define USB_PD_ADO_TYPE_SHIFT                   24
 13 #define USB_PD_ADO_TYPE_MASK                       13 #define USB_PD_ADO_TYPE_MASK                    0xff
 14 #define USB_PD_ADO_FIXED_BATT_SHIFT                14 #define USB_PD_ADO_FIXED_BATT_SHIFT             20
 15 #define USB_PD_ADO_FIXED_BATT_MASK                 15 #define USB_PD_ADO_FIXED_BATT_MASK              0xf
 16 #define USB_PD_ADO_HOT_SWAP_BATT_SHIFT             16 #define USB_PD_ADO_HOT_SWAP_BATT_SHIFT          16
 17 #define USB_PD_ADO_HOT_SWAP_BATT_MASK              17 #define USB_PD_ADO_HOT_SWAP_BATT_MASK           0xf
 18                                                    18 
 19 #define USB_PD_ADO_TYPE_BATT_STATUS_CHANGE         19 #define USB_PD_ADO_TYPE_BATT_STATUS_CHANGE      BIT(1)
 20 #define USB_PD_ADO_TYPE_OCP                        20 #define USB_PD_ADO_TYPE_OCP                     BIT(2)
 21 #define USB_PD_ADO_TYPE_OTP                        21 #define USB_PD_ADO_TYPE_OTP                     BIT(3)
 22 #define USB_PD_ADO_TYPE_OP_COND_CHANGE             22 #define USB_PD_ADO_TYPE_OP_COND_CHANGE          BIT(4)
 23 #define USB_PD_ADO_TYPE_SRC_INPUT_CHANGE           23 #define USB_PD_ADO_TYPE_SRC_INPUT_CHANGE        BIT(5)
 24 #define USB_PD_ADO_TYPE_OVP                        24 #define USB_PD_ADO_TYPE_OVP                     BIT(6)
 25                                                    25 
 26 static inline unsigned int usb_pd_ado_type(u32     26 static inline unsigned int usb_pd_ado_type(u32 ado)
 27 {                                                  27 {
 28         return (ado >> USB_PD_ADO_TYPE_SHIFT)      28         return (ado >> USB_PD_ADO_TYPE_SHIFT) & USB_PD_ADO_TYPE_MASK;
 29 }                                                  29 }
 30                                                    30 
 31 static inline unsigned int usb_pd_ado_fixed_ba     31 static inline unsigned int usb_pd_ado_fixed_batt(u32 ado)
 32 {                                                  32 {
 33         return (ado >> USB_PD_ADO_FIXED_BATT_S     33         return (ado >> USB_PD_ADO_FIXED_BATT_SHIFT) &
 34                USB_PD_ADO_FIXED_BATT_MASK;         34                USB_PD_ADO_FIXED_BATT_MASK;
 35 }                                                  35 }
 36                                                    36 
 37 static inline unsigned int usb_pd_ado_hot_swap     37 static inline unsigned int usb_pd_ado_hot_swap_batt(u32 ado)
 38 {                                                  38 {
 39         return (ado >> USB_PD_ADO_HOT_SWAP_BAT     39         return (ado >> USB_PD_ADO_HOT_SWAP_BATT_SHIFT) &
 40                USB_PD_ADO_HOT_SWAP_BATT_MASK;      40                USB_PD_ADO_HOT_SWAP_BATT_MASK;
 41 }                                                  41 }
 42 #endif /* __LINUX_USB_PD_ADO_H */                  42 #endif /* __LINUX_USB_PD_ADO_H */
 43                                                    43 

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