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

TOMOYO Linux Cross Reference
Linux/include/uapi/regulator/regulator.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ 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 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 /*
  3  * Regulator uapi header
  4  *
  5  * Author: Naresh Solanki <Naresh.Solanki@9elements.com>
  6  */
  7 
  8 #ifndef _UAPI_REGULATOR_H
  9 #define _UAPI_REGULATOR_H
 10 
 11 #ifdef __KERNEL__
 12 #include <linux/types.h>
 13 #else
 14 #include <stdint.h>
 15 #endif
 16 
 17 /*
 18  * Regulator notifier events.
 19  *
 20  * UNDER_VOLTAGE  Regulator output is under voltage.
 21  * OVER_CURRENT   Regulator output current is too high.
 22  * REGULATION_OUT Regulator output is out of regulation.
 23  * FAIL           Regulator output has failed.
 24  * OVER_TEMP      Regulator over temp.
 25  * FORCE_DISABLE  Regulator forcibly shut down by software.
 26  * VOLTAGE_CHANGE Regulator voltage changed.
 27  *                Data passed is old voltage cast to (void *).
 28  * DISABLE        Regulator was disabled.
 29  * PRE_VOLTAGE_CHANGE   Regulator is about to have voltage changed.
 30  *                      Data passed is "struct pre_voltage_change_data"
 31  * ABORT_VOLTAGE_CHANGE Regulator voltage change failed for some reason.
 32  *                      Data passed is old voltage cast to (void *).
 33  * PRE_DISABLE    Regulator is about to be disabled
 34  * ABORT_DISABLE  Regulator disable failed for some reason
 35  *
 36  * NOTE: These events can be OR'ed together when passed into handler.
 37  */
 38 
 39 #define REGULATOR_EVENT_UNDER_VOLTAGE           0x01
 40 #define REGULATOR_EVENT_OVER_CURRENT            0x02
 41 #define REGULATOR_EVENT_REGULATION_OUT          0x04
 42 #define REGULATOR_EVENT_FAIL                    0x08
 43 #define REGULATOR_EVENT_OVER_TEMP               0x10
 44 #define REGULATOR_EVENT_FORCE_DISABLE           0x20
 45 #define REGULATOR_EVENT_VOLTAGE_CHANGE          0x40
 46 #define REGULATOR_EVENT_DISABLE                 0x80
 47 #define REGULATOR_EVENT_PRE_VOLTAGE_CHANGE      0x100
 48 #define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE    0x200
 49 #define REGULATOR_EVENT_PRE_DISABLE             0x400
 50 #define REGULATOR_EVENT_ABORT_DISABLE           0x800
 51 #define REGULATOR_EVENT_ENABLE                  0x1000
 52 /*
 53  * Following notifications should be emitted only if detected condition
 54  * is such that the HW is likely to still be working but consumers should
 55  * take a recovery action to prevent problems escalating into errors.
 56  */
 57 #define REGULATOR_EVENT_UNDER_VOLTAGE_WARN      0x2000
 58 #define REGULATOR_EVENT_OVER_CURRENT_WARN       0x4000
 59 #define REGULATOR_EVENT_OVER_VOLTAGE_WARN       0x8000
 60 #define REGULATOR_EVENT_OVER_TEMP_WARN          0x10000
 61 #define REGULATOR_EVENT_WARN_MASK               0x1E000
 62 
 63 struct reg_genl_event {
 64         char reg_name[32];
 65         uint64_t event;
 66 };
 67 
 68 /* attributes of reg_genl_family */
 69 enum {
 70         REG_GENL_ATTR_UNSPEC,
 71         REG_GENL_ATTR_EVENT,    /* reg event info needed by user space */
 72         __REG_GENL_ATTR_MAX,
 73 };
 74 
 75 #define REG_GENL_ATTR_MAX (__REG_GENL_ATTR_MAX - 1)
 76 
 77 /* commands supported by the reg_genl_family */
 78 enum {
 79         REG_GENL_CMD_UNSPEC,
 80         REG_GENL_CMD_EVENT,     /* kernel->user notifications for reg events */
 81         __REG_GENL_CMD_MAX,
 82 };
 83 
 84 #define REG_GENL_CMD_MAX (__REG_GENL_CMD_MAX - 1)
 85 
 86 #define REG_GENL_FAMILY_NAME            "reg_event"
 87 #define REG_GENL_VERSION                0x01
 88 #define REG_GENL_MCAST_GROUP_NAME       "reg_mc_group"
 89 
 90 #endif /* _UAPI_REGULATOR_H */
 91 

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