coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
thermal_zone.c File Reference
#include <acpi/acpigen.h>
#include <assert.h>
#include <commonlib/bsd/helpers.h>
#include <console/console.h>
#include <device/device.h>
#include <stdlib.h>
#include <string.h>
#include "chip.h"
Include dependency graph for thermal_zone.c:

Go to the source code of this file.

Macros

#define TZ_DEVICE_PATH   "\\_TZ"
 
#define DEFAULT_TC1   2
 
#define DEFAULT_TC2   5
 
#define DEFAULT_TSP   10
 
#define CELSIUS_TO_DECI_KELVIN(temp_c)   ((temp_c) * 10 + 2731)
 
#define SECONDS_TO_DECI_SECONDS(s)   ((s) * 10)
 

Functions

static const char * thermal_zone_acpi_name (const struct device *dev)
 
static void thermal_zone_fill_ssdt (const struct device *dev)
 
static void thermal_zone_enable_dev (struct device *dev)
 

Variables

static struct device_operations thermal_zone_ops
 
struct chip_operations drivers_acpi_thermal_zone_ops
 

Macro Definition Documentation

◆ CELSIUS_TO_DECI_KELVIN

#define CELSIUS_TO_DECI_KELVIN (   temp_c)    ((temp_c) * 10 + 2731)

Definition at line 19 of file thermal_zone.c.

◆ DEFAULT_TC1

#define DEFAULT_TC1   2

Definition at line 15 of file thermal_zone.c.

◆ DEFAULT_TC2

#define DEFAULT_TC2   5

Definition at line 16 of file thermal_zone.c.

◆ DEFAULT_TSP

#define DEFAULT_TSP   10

Definition at line 17 of file thermal_zone.c.

◆ SECONDS_TO_DECI_SECONDS

#define SECONDS_TO_DECI_SECONDS (   s)    ((s) * 10)

Definition at line 20 of file thermal_zone.c.

◆ TZ_DEVICE_PATH

#define TZ_DEVICE_PATH   "\\_TZ"

Definition at line 13 of file thermal_zone.c.

Function Documentation

◆ thermal_zone_acpi_name()

static const char* thermal_zone_acpi_name ( const struct device dev)
static

Definition at line 22 of file thermal_zone.c.

References ACPI_NAME_BUFFER_SIZE, DEVICE_PATH_GENERIC, device_path::generic, generic_path::id, malloc(), name, NULL, device::path, snprintf(), and device_path::type.

Here is the call graph for this function:

◆ thermal_zone_enable_dev()

static void thermal_zone_enable_dev ( struct device dev)
static

Definition at line 123 of file thermal_zone.c.

◆ thermal_zone_fill_ssdt()

Variable Documentation

◆ drivers_acpi_thermal_zone_ops

struct chip_operations drivers_acpi_thermal_zone_ops
Initial value:
= {
.enable_dev = thermal_zone_enable_dev,
}
static void thermal_zone_enable_dev(struct device *dev)
Definition: thermal_zone.c:123

Definition at line 123 of file thermal_zone.c.

◆ thermal_zone_ops

struct device_operations thermal_zone_ops
static
Initial value:
= {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.acpi_name = thermal_zone_acpi_name,
.acpi_fill_ssdt = thermal_zone_fill_ssdt,
}
static void noop_read_resources(struct device *dev)
Standard device operations function pointers shims.
Definition: device.h:73
static void noop_set_resources(struct device *dev)
Definition: device.h:74
static const char * thermal_zone_acpi_name(const struct device *dev)
Definition: thermal_zone.c:22
static void thermal_zone_fill_ssdt(const struct device *dev)
Definition: thermal_zone.c:35

Definition at line 35 of file thermal_zone.c.