diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/acpi.h | 1 | ||||
| -rw-r--r-- | include/linux/power_supply.h | 2 | ||||
| -rw-r--r-- | include/linux/sonypi.h | 8 | ||||
| -rw-r--r-- | include/linux/thermal.h | 48 |
4 files changed, 50 insertions, 9 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d047f846c3ed..6586cbd0d4af 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -97,6 +97,7 @@ void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); | |||
| 97 | /* the following four functions are architecture-dependent */ | 97 | /* the following four functions are architecture-dependent */ |
| 98 | void acpi_numa_slit_init (struct acpi_table_slit *slit); | 98 | void acpi_numa_slit_init (struct acpi_table_slit *slit); |
| 99 | void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); | 99 | void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); |
| 100 | void acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa); | ||
| 100 | void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); | 101 | void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); |
| 101 | void acpi_numa_arch_fixup(void); | 102 | void acpi_numa_arch_fixup(void); |
| 102 | 103 | ||
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 8ff25e0e7f7a..594c494ac3f0 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
| @@ -73,6 +73,8 @@ enum power_supply_property { | |||
| 73 | POWER_SUPPLY_PROP_VOLTAGE_AVG, | 73 | POWER_SUPPLY_PROP_VOLTAGE_AVG, |
| 74 | POWER_SUPPLY_PROP_CURRENT_NOW, | 74 | POWER_SUPPLY_PROP_CURRENT_NOW, |
| 75 | POWER_SUPPLY_PROP_CURRENT_AVG, | 75 | POWER_SUPPLY_PROP_CURRENT_AVG, |
| 76 | POWER_SUPPLY_PROP_POWER_NOW, | ||
| 77 | POWER_SUPPLY_PROP_POWER_AVG, | ||
| 76 | POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, | 78 | POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, |
| 77 | POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN, | 79 | POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN, |
| 78 | POWER_SUPPLY_PROP_CHARGE_FULL, | 80 | POWER_SUPPLY_PROP_CHARGE_FULL, |
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index f41ffd7c2dd9..34c4475ac4a2 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h | |||
| @@ -103,6 +103,14 @@ | |||
| 103 | #define SONYPI_EVENT_WIRELESS_OFF 61 | 103 | #define SONYPI_EVENT_WIRELESS_OFF 61 |
| 104 | #define SONYPI_EVENT_ZOOM_IN_PRESSED 62 | 104 | #define SONYPI_EVENT_ZOOM_IN_PRESSED 62 |
| 105 | #define SONYPI_EVENT_ZOOM_OUT_PRESSED 63 | 105 | #define SONYPI_EVENT_ZOOM_OUT_PRESSED 63 |
| 106 | #define SONYPI_EVENT_CD_EJECT_PRESSED 64 | ||
| 107 | #define SONYPI_EVENT_MODEKEY_PRESSED 65 | ||
| 108 | #define SONYPI_EVENT_PKEY_P4 66 | ||
| 109 | #define SONYPI_EVENT_PKEY_P5 67 | ||
| 110 | #define SONYPI_EVENT_SETTINGKEY_PRESSED 68 | ||
| 111 | #define SONYPI_EVENT_VOLUME_INC_PRESSED 69 | ||
| 112 | #define SONYPI_EVENT_VOLUME_DEC_PRESSED 70 | ||
| 113 | #define SONYPI_EVENT_BRIGHTNESS_PRESSED 71 | ||
| 106 | 114 | ||
| 107 | /* get/set brightness */ | 115 | /* get/set brightness */ |
| 108 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) | 116 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 917707e6151d..1de8b9eb841b 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
| @@ -27,27 +27,46 @@ | |||
| 27 | 27 | ||
| 28 | #include <linux/idr.h> | 28 | #include <linux/idr.h> |
| 29 | #include <linux/device.h> | 29 | #include <linux/device.h> |
| 30 | #include <linux/workqueue.h> | ||
| 30 | 31 | ||
| 31 | struct thermal_zone_device; | 32 | struct thermal_zone_device; |
| 32 | struct thermal_cooling_device; | 33 | struct thermal_cooling_device; |
| 33 | 34 | ||
| 35 | enum thermal_device_mode { | ||
| 36 | THERMAL_DEVICE_DISABLED = 0, | ||
| 37 | THERMAL_DEVICE_ENABLED, | ||
| 38 | }; | ||
| 39 | |||
| 40 | enum thermal_trip_type { | ||
| 41 | THERMAL_TRIP_ACTIVE = 0, | ||
| 42 | THERMAL_TRIP_PASSIVE, | ||
| 43 | THERMAL_TRIP_HOT, | ||
| 44 | THERMAL_TRIP_CRITICAL, | ||
| 45 | }; | ||
| 46 | |||
| 34 | struct thermal_zone_device_ops { | 47 | struct thermal_zone_device_ops { |
| 35 | int (*bind) (struct thermal_zone_device *, | 48 | int (*bind) (struct thermal_zone_device *, |
| 36 | struct thermal_cooling_device *); | 49 | struct thermal_cooling_device *); |
| 37 | int (*unbind) (struct thermal_zone_device *, | 50 | int (*unbind) (struct thermal_zone_device *, |
| 38 | struct thermal_cooling_device *); | 51 | struct thermal_cooling_device *); |
| 39 | int (*get_temp) (struct thermal_zone_device *, char *); | 52 | int (*get_temp) (struct thermal_zone_device *, unsigned long *); |
| 40 | int (*get_mode) (struct thermal_zone_device *, char *); | 53 | int (*get_mode) (struct thermal_zone_device *, |
| 41 | int (*set_mode) (struct thermal_zone_device *, const char *); | 54 | enum thermal_device_mode *); |
| 42 | int (*get_trip_type) (struct thermal_zone_device *, int, char *); | 55 | int (*set_mode) (struct thermal_zone_device *, |
| 43 | int (*get_trip_temp) (struct thermal_zone_device *, int, char *); | 56 | enum thermal_device_mode); |
| 57 | int (*get_trip_type) (struct thermal_zone_device *, int, | ||
| 58 | enum thermal_trip_type *); | ||
| 59 | int (*get_trip_temp) (struct thermal_zone_device *, int, | ||
| 60 | unsigned long *); | ||
| 44 | int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *); | 61 | int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *); |
| 62 | int (*notify) (struct thermal_zone_device *, int, | ||
| 63 | enum thermal_trip_type); | ||
| 45 | }; | 64 | }; |
| 46 | 65 | ||
| 47 | struct thermal_cooling_device_ops { | 66 | struct thermal_cooling_device_ops { |
| 48 | int (*get_max_state) (struct thermal_cooling_device *, char *); | 67 | int (*get_max_state) (struct thermal_cooling_device *, unsigned long *); |
| 49 | int (*get_cur_state) (struct thermal_cooling_device *, char *); | 68 | int (*get_cur_state) (struct thermal_cooling_device *, unsigned long *); |
| 50 | int (*set_cur_state) (struct thermal_cooling_device *, unsigned int); | 69 | int (*set_cur_state) (struct thermal_cooling_device *, unsigned long); |
| 51 | }; | 70 | }; |
| 52 | 71 | ||
| 53 | #define THERMAL_TRIPS_NONE -1 | 72 | #define THERMAL_TRIPS_NONE -1 |
| @@ -88,11 +107,19 @@ struct thermal_zone_device { | |||
| 88 | struct device device; | 107 | struct device device; |
| 89 | void *devdata; | 108 | void *devdata; |
| 90 | int trips; | 109 | int trips; |
| 110 | int tc1; | ||
| 111 | int tc2; | ||
| 112 | int passive_delay; | ||
| 113 | int polling_delay; | ||
| 114 | int last_temperature; | ||
| 115 | bool passive; | ||
| 116 | unsigned int forced_passive; | ||
| 91 | struct thermal_zone_device_ops *ops; | 117 | struct thermal_zone_device_ops *ops; |
| 92 | struct list_head cooling_devices; | 118 | struct list_head cooling_devices; |
| 93 | struct idr idr; | 119 | struct idr idr; |
| 94 | struct mutex lock; /* protect cooling devices list */ | 120 | struct mutex lock; /* protect cooling devices list */ |
| 95 | struct list_head node; | 121 | struct list_head node; |
| 122 | struct delayed_work poll_queue; | ||
| 96 | #if defined(CONFIG_THERMAL_HWMON) | 123 | #if defined(CONFIG_THERMAL_HWMON) |
| 97 | struct list_head hwmon_node; | 124 | struct list_head hwmon_node; |
| 98 | struct thermal_hwmon_device *hwmon; | 125 | struct thermal_hwmon_device *hwmon; |
| @@ -104,13 +131,16 @@ struct thermal_zone_device { | |||
| 104 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, | 131 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, |
| 105 | struct | 132 | struct |
| 106 | thermal_zone_device_ops | 133 | thermal_zone_device_ops |
| 107 | *); | 134 | *, int tc1, int tc2, |
| 135 | int passive_freq, | ||
| 136 | int polling_freq); | ||
| 108 | void thermal_zone_device_unregister(struct thermal_zone_device *); | 137 | void thermal_zone_device_unregister(struct thermal_zone_device *); |
| 109 | 138 | ||
| 110 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, | 139 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, |
| 111 | struct thermal_cooling_device *); | 140 | struct thermal_cooling_device *); |
| 112 | int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, | 141 | int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, |
| 113 | struct thermal_cooling_device *); | 142 | struct thermal_cooling_device *); |
| 143 | void thermal_zone_device_update(struct thermal_zone_device *); | ||
| 114 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, | 144 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, |
| 115 | struct | 145 | struct |
| 116 | thermal_cooling_device_ops | 146 | thermal_cooling_device_ops |
