Re: [PATCH V3 2/5] platform: arm64: Add driver for EC found on Qualcomm reference devices
From: kernel test robot
Date: Tue Mar 10 2026 - 02:30:48 EST
Hi Sibi,
kernel test robot noticed the following build errors:
[auto build test ERROR on a0ae2a256046c0c5d3778d1a194ff2e171f16e5f]
url: https://github.com/intel-lab-lkp/linux/commits/Sibi-Sankar/dt-bindings-embedded-controller-Add-EC-bindings-for-Qualcomm-reference-devices/20260309-074148
base: a0ae2a256046c0c5d3778d1a194ff2e171f16e5f
patch link: https://lore.kernel.org/r/20260308233646.2318676-3-sibi.sankar%40oss.qualcomm.com
patch subject: [PATCH V3 2/5] platform: arm64: Add driver for EC found on Qualcomm reference devices
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20260310/202603101413.1egT3NBN-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260310/202603101413.1egT3NBN-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603101413.1egT3NBN-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from include/linux/ioport.h:16,
from include/linux/acpi.h:13,
from include/linux/i2c.h:13,
from drivers/platform/arm64/qcom-hamoa-ec.c:7:
drivers/platform/arm64/qcom-hamoa-ec.c: In function 'qcom_ec_thermal_capabilities':
>> drivers/platform/arm64/qcom-hamoa-ec.c:56:42: error: implicit declaration of function 'FIELD_GET' [-Wimplicit-function-declaration]
56 | #define EC_THERMAL_FAN_CNT(x) (FIELD_GET(GENMASK(1, 0), (x)))
| ^~~~~~~~~
include/linux/minmax.h:92:35: note: in definition of macro '__careful_cmp_once'
92 | auto ux = (x); auto uy = (y); \
| ^
include/linux/minmax.h:112:25: note: in expansion of macro '__careful_cmp'
112 | #define max(x, y) __careful_cmp(max, x, y)
| ^~~~~~~~~~~~~
drivers/platform/arm64/qcom-hamoa-ec.c:170:24: note: in expansion of macro 'max'
170 | cap->fan_cnt = max(EC_MAX_FAN_CNT, EC_THERMAL_FAN_CNT(resp[1]));
| ^~~
drivers/platform/arm64/qcom-hamoa-ec.c:170:44: note: in expansion of macro 'EC_THERMAL_FAN_CNT'
170 | cap->fan_cnt = max(EC_MAX_FAN_CNT, EC_THERMAL_FAN_CNT(resp[1]));
| ^~~~~~~~~~~~~~~~~~
vim +/FIELD_GET +56 drivers/platform/arm64/qcom-hamoa-ec.c
> 7 #include <linux/i2c.h>
8 #include <linux/kernel.h>
9 #include <linux/module.h>
10 #include <linux/pm.h>
11 #include <linux/thermal.h>
12
13 #define EC_SCI_EVT_READ_CMD 0x05
14 #define EC_FW_VERSION_CMD 0x0e
15 #define EC_MODERN_STANDBY_CMD 0x23
16 #define EC_FAN_DBG_CONTROL_CMD 0x30
17 #define EC_SCI_EVT_CONTROL_CMD 0x35
18 #define EC_THERMAL_CAP_CMD 0x42
19
20 #define EC_FW_VERSION_RESP_LEN 4
21 #define EC_THERMAL_CAP_RESP_LEN 3
22 #define EC_FAN_DEBUG_CMD_LEN 6
23 #define EC_FAN_SPEED_DATA_SIZE 4
24
25 #define EC_MODERN_STANDBY_ENTER 0x01
26 #define EC_MODERN_STANDBY_EXIT 0x00
27
28 #define EC_FAN_DEBUG_MODE_ON BIT(0)
29 #define EC_FAN_ON BIT(1)
30 #define EC_FAN_DEBUG_TYPE_PWM BIT(2)
31 #define EC_MAX_FAN_CNT 2
32 #define EC_FAN_NAME_SIZE 20
33 #define EC_FAN_MAX_PWM 255
34
35 enum qcom_ec_sci_events {
36 EC_FAN1_STATUS_CHANGE_EVT = 0x30,
37 EC_FAN2_STATUS_CHANGE_EVT,
38 EC_FAN1_SPEED_CHANGE_EVT,
39 EC_FAN2_SPEED_CHANGE_EVT,
40 EC_NEW_LUT_SET_EVT,
41 EC_FAN_PROFILE_SWITCH_EVT,
42 EC_THERMISTOR_1_THRESHOLD_CROSS_EVT,
43 EC_THERMISTOR_2_THRESHOLD_CROSS_EVT,
44 EC_THERMISTOR_3_THRESHOLD_CROSS_EVT,
45 /* Reserved: 0x39 - 0x3c/0x3f */
46 EC_RECOVERED_FROM_RESET_EVT = 0x3d,
47 };
48
49 struct qcom_ec_version {
50 u8 main_version;
51 u8 sub_version;
52 u8 test_version;
53 };
54
55 struct qcom_ec_thermal_cap {
> 56 #define EC_THERMAL_FAN_CNT(x) (FIELD_GET(GENMASK(1, 0), (x)))
57 #define EC_THERMAL_FAN_TYPE(x) (FIELD_GET(GENMASK(4, 2), (x)))
58 #define EC_THERMAL_THERMISTOR_MASK(x) (FIELD_GET(GENMASK(7, 0), (x)))
59 u8 fan_cnt;
60 u8 fan_type;
61 u8 thermistor_mask;
62 };
63
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki