blob: 40743fbc6883414eac75a849aff1c2757e3ce8d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* Copyright 2022 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* Support code for STT temperature reporting */
#include "chipset.h"
#include "temp_sensor/pct2075.h"
#include "temp_sensor/temp_sensor.h"
int board_get_soc_temp_mk(int *temp_mk)
{
if (chipset_in_state(CHIPSET_STATE_HARD_OFF))
return EC_ERROR_NOT_POWERED;
return pct2075_get_val_mk(PCT2075_SENSOR_ID(DT_NODELABEL(soc_pct2075)),
temp_mk);
}
int board_get_ambient_temp_mk(int *temp_mk)
{
if (chipset_in_state(CHIPSET_STATE_HARD_OFF))
return EC_ERROR_NOT_POWERED;
return pct2075_get_val_mk(PCT2075_SENSOR_ID(DT_NODELABEL(amb_pct2075)),
temp_mk);
}
|