diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/hid-sensor-hub.h | 5 | ||||
| -rw-r--r-- | include/linux/thermal.h | 56 |
2 files changed, 59 insertions, 2 deletions
diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h index 51f7ccadf923..4173a8fdad9e 100644 --- a/include/linux/hid-sensor-hub.h +++ b/include/linux/hid-sensor-hub.h | |||
| @@ -33,6 +33,8 @@ | |||
| 33 | * @units: Measurment unit for this attribute. | 33 | * @units: Measurment unit for this attribute. |
| 34 | * @unit_expo: Exponent used in the data. | 34 | * @unit_expo: Exponent used in the data. |
| 35 | * @size: Size in bytes for data size. | 35 | * @size: Size in bytes for data size. |
| 36 | * @logical_minimum: Logical minimum value for this attribute. | ||
| 37 | * @logical_maximum: Logical maximum value for this attribute. | ||
| 36 | */ | 38 | */ |
| 37 | struct hid_sensor_hub_attribute_info { | 39 | struct hid_sensor_hub_attribute_info { |
| 38 | u32 usage_id; | 40 | u32 usage_id; |
| @@ -146,6 +148,7 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev, | |||
| 146 | 148 | ||
| 147 | /** | 149 | /** |
| 148 | * sensor_hub_input_attr_get_raw_value() - Synchronous read request | 150 | * sensor_hub_input_attr_get_raw_value() - Synchronous read request |
| 151 | * @hsdev: Hub device instance. | ||
| 149 | * @usage_id: Attribute usage id of parent physical device as per spec | 152 | * @usage_id: Attribute usage id of parent physical device as per spec |
| 150 | * @attr_usage_id: Attribute usage id as per spec | 153 | * @attr_usage_id: Attribute usage id as per spec |
| 151 | * @report_id: Report id to look for | 154 | * @report_id: Report id to look for |
| @@ -160,6 +163,7 @@ int sensor_hub_input_attr_get_raw_value(struct hid_sensor_hub_device *hsdev, | |||
| 160 | u32 attr_usage_id, u32 report_id); | 163 | u32 attr_usage_id, u32 report_id); |
| 161 | /** | 164 | /** |
| 162 | * sensor_hub_set_feature() - Feature set request | 165 | * sensor_hub_set_feature() - Feature set request |
| 166 | * @hsdev: Hub device instance. | ||
| 163 | * @report_id: Report id to look for | 167 | * @report_id: Report id to look for |
| 164 | * @field_index: Field index inside a report | 168 | * @field_index: Field index inside a report |
| 165 | * @value: Value to set | 169 | * @value: Value to set |
| @@ -172,6 +176,7 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, | |||
| 172 | 176 | ||
| 173 | /** | 177 | /** |
| 174 | * sensor_hub_get_feature() - Feature get request | 178 | * sensor_hub_get_feature() - Feature get request |
| 179 | * @hsdev: Hub device instance. | ||
| 175 | * @report_id: Report id to look for | 180 | * @report_id: Report id to look for |
| 176 | * @field_index: Field index inside a report | 181 | * @field_index: Field index inside a report |
| 177 | * @value: Place holder for return value | 182 | * @value: Place holder for return value |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index fc52e307efab..5eac316490ea 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
| @@ -314,6 +314,8 @@ void thermal_zone_of_sensor_unregister(struct device *dev, | |||
| 314 | } | 314 | } |
| 315 | 315 | ||
| 316 | #endif | 316 | #endif |
| 317 | |||
| 318 | #if IS_ENABLED(CONFIG_THERMAL) | ||
| 317 | struct thermal_zone_device *thermal_zone_device_register(const char *, int, int, | 319 | struct thermal_zone_device *thermal_zone_device_register(const char *, int, int, |
| 318 | void *, struct thermal_zone_device_ops *, | 320 | void *, struct thermal_zone_device_ops *, |
| 319 | const struct thermal_zone_params *, int, int); | 321 | const struct thermal_zone_params *, int, int); |
| @@ -340,8 +342,58 @@ struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, | |||
| 340 | struct thermal_cooling_device *, int); | 342 | struct thermal_cooling_device *, int); |
| 341 | void thermal_cdev_update(struct thermal_cooling_device *); | 343 | void thermal_cdev_update(struct thermal_cooling_device *); |
| 342 | void thermal_notify_framework(struct thermal_zone_device *, int); | 344 | void thermal_notify_framework(struct thermal_zone_device *, int); |
| 343 | 345 | #else | |
| 344 | #ifdef CONFIG_NET | 346 | static inline struct thermal_zone_device *thermal_zone_device_register( |
| 347 | const char *type, int trips, int mask, void *devdata, | ||
| 348 | struct thermal_zone_device_ops *ops, | ||
| 349 | const struct thermal_zone_params *tzp, | ||
| 350 | int passive_delay, int polling_delay) | ||
| 351 | { return ERR_PTR(-ENODEV); } | ||
| 352 | static inline void thermal_zone_device_unregister( | ||
| 353 | struct thermal_zone_device *tz) | ||
| 354 | { } | ||
| 355 | static inline int thermal_zone_bind_cooling_device( | ||
| 356 | struct thermal_zone_device *tz, int trip, | ||
| 357 | struct thermal_cooling_device *cdev, | ||
| 358 | unsigned long upper, unsigned long lower) | ||
| 359 | { return -ENODEV; } | ||
| 360 | static inline int thermal_zone_unbind_cooling_device( | ||
| 361 | struct thermal_zone_device *tz, int trip, | ||
| 362 | struct thermal_cooling_device *cdev) | ||
| 363 | { return -ENODEV; } | ||
| 364 | static inline void thermal_zone_device_update(struct thermal_zone_device *tz) | ||
| 365 | { } | ||
| 366 | static inline struct thermal_cooling_device * | ||
| 367 | thermal_cooling_device_register(char *type, void *devdata, | ||
| 368 | const struct thermal_cooling_device_ops *ops) | ||
| 369 | { return ERR_PTR(-ENODEV); } | ||
| 370 | static inline struct thermal_cooling_device * | ||
| 371 | thermal_of_cooling_device_register(struct device_node *np, | ||
| 372 | char *type, void *devdata, const struct thermal_cooling_device_ops *ops) | ||
| 373 | { return ERR_PTR(-ENODEV); } | ||
| 374 | static inline void thermal_cooling_device_unregister( | ||
| 375 | struct thermal_cooling_device *cdev) | ||
| 376 | { } | ||
| 377 | static inline struct thermal_zone_device *thermal_zone_get_zone_by_name( | ||
| 378 | const char *name) | ||
| 379 | { return ERR_PTR(-ENODEV); } | ||
| 380 | static inline int thermal_zone_get_temp( | ||
| 381 | struct thermal_zone_device *tz, unsigned long *temp) | ||
| 382 | { return -ENODEV; } | ||
| 383 | static inline int get_tz_trend(struct thermal_zone_device *tz, int trip) | ||
| 384 | { return -ENODEV; } | ||
| 385 | static inline struct thermal_instance * | ||
| 386 | get_thermal_instance(struct thermal_zone_device *tz, | ||
| 387 | struct thermal_cooling_device *cdev, int trip) | ||
| 388 | { return ERR_PTR(-ENODEV); } | ||
| 389 | static inline void thermal_cdev_update(struct thermal_cooling_device *cdev) | ||
| 390 | { } | ||
| 391 | static inline void thermal_notify_framework(struct thermal_zone_device *tz, | ||
| 392 | int trip) | ||
| 393 | { } | ||
| 394 | #endif /* CONFIG_THERMAL */ | ||
| 395 | |||
| 396 | #if defined(CONFIG_NET) && IS_ENABLED(CONFIG_THERMAL) | ||
| 345 | extern int thermal_generate_netlink_event(struct thermal_zone_device *tz, | 397 | extern int thermal_generate_netlink_event(struct thermal_zone_device *tz, |
| 346 | enum events event); | 398 | enum events event); |
| 347 | #else | 399 | #else |
