summaryrefslogtreecommitdiff
path: root/src/superio/ite
diff options
context:
space:
mode:
Diffstat (limited to 'src/superio/ite')
-rw-r--r--src/superio/ite/common/env_ctrl.c12
-rw-r--r--src/superio/ite/common/env_ctrl.h22
-rw-r--r--src/superio/ite/common/env_ctrl_chip.h2
-rw-r--r--src/superio/ite/it8716f/superio.c2
4 files changed, 19 insertions, 19 deletions
diff --git a/src/superio/ite/common/env_ctrl.c b/src/superio/ite/common/env_ctrl.c
index f69273e984..57896e0c01 100644
--- a/src/superio/ite/common/env_ctrl.c
+++ b/src/superio/ite/common/env_ctrl.c
@@ -156,7 +156,7 @@ static void fan_smartconfig(const u16 base, const u8 fan,
/* 50% duty cycle by default */
const u8 duty = conf->pwm_start ? conf->pwm_start : 50;
- if (IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_8BIT_PWM))
+ if (CONFIG(SUPERIO_ITE_ENV_CTRL_8BIT_PWM))
pwm_start = ITE_EC_FAN_CTL_PWM_DUTY(duty);
else
pwm_ctrl |= ITE_EC_FAN_CTL_PWM_DUTY(duty);
@@ -193,12 +193,12 @@ static void enable_fan(const u16 base, const u8 fan,
u8 reg;
if (conf->mode == FAN_IGNORE ||
- (IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_NO_ONOFF) &&
+ (CONFIG(SUPERIO_ITE_ENV_CTRL_NO_ONOFF) &&
conf->mode <= FAN_MODE_OFF))
return;
/* FAN_CTL2 might have its own frequency setting */
- if (IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_PWM_FREQ2) && fan == 2) {
+ if (CONFIG(SUPERIO_ITE_ENV_CTRL_PWM_FREQ2) && fan == 2) {
reg = ite_ec_read(base, ITE_EC_ADC_TEMP_EXTRA_CHANNEL_ENABLE);
reg &= ~ITE_EC_FAN_PWM_CLOCK_MASK;
reg |= ITE_EC_FAN_PWM_DEFAULT_CLOCK;
@@ -216,14 +216,14 @@ static void enable_fan(const u16 base, const u8 fan,
ite_ec_write(base, ITE_EC_FAN_CTL_MODE, reg);
}
- if (IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_FAN16_CONFIG)
+ if (CONFIG(SUPERIO_ITE_ENV_CTRL_FAN16_CONFIG)
&& conf->mode >= FAN_MODE_ON) {
reg = ite_ec_read(base, ITE_EC_FAN_TAC_COUNTER_ENABLE);
reg |= ITE_EC_FAN_TAC_16BIT_ENABLE(fan);
ite_ec_write(base, ITE_EC_FAN_TAC_COUNTER_ENABLE, reg);
}
- if (IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS) && fan > 3) {
+ if (CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS) && fan > 3) {
reg = ite_ec_read(base, ITE_EC_FAN_SEC_CTL);
if (conf->mode >= FAN_MODE_ON)
reg |= ITE_EC_FAN_SEC_CTL_TAC_EN(fan);
@@ -238,7 +238,7 @@ static void enable_fan(const u16 base, const u8 fan,
reg &= ~ITE_EC_FAN_MAIN_CTL_TAC_EN(fan);
/* Some ITEs have SmartGuardian always enabled */
- if (!IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_NO_ONOFF)) {
+ if (!CONFIG(SUPERIO_ITE_ENV_CTRL_NO_ONOFF)) {
if (conf->mode >= FAN_SMART_SOFTWARE)
reg |= ITE_EC_FAN_MAIN_CTL_SMART(fan);
else
diff --git a/src/superio/ite/common/env_ctrl.h b/src/superio/ite/common/env_ctrl.h
index e67af3445e..e29e33f54a 100644
--- a/src/superio/ite/common/env_ctrl.h
+++ b/src/superio/ite/common/env_ctrl.h
@@ -21,7 +21,7 @@
#include "env_ctrl_chip.h"
-#if IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_8BIT_PWM)
+#if CONFIG(SUPERIO_ITE_ENV_CTRL_8BIT_PWM)
#define ITE_EC_FAN_MAX_PWM 0xff
#define ITE_EC_FAN_PWM_DEFAULT_CLOCK ITE_EC_FAN_PWM_CLOCK_6MHZ
#else
@@ -58,12 +58,12 @@
#define ITE_EC_FAN_SEC_CTL_TAC_EN(x) (1 << (x))
#define ITE_EC_FAN_TAC_LIMIT(x) \
- (((x) > 3 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \
+ (((x) > 3 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \
? (0x84 + ((x)-4) * 2) \
: (0x10 + ((x)-1)) \
)
#define ITE_EC_FAN_TAC_EXT_LIMIT(x) \
- (((x) > 3 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \
+ (((x) > 3 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \
? (0x85 + ((x)-4) * 2) \
: (0x1b + ((x)-1)) \
)
@@ -87,12 +87,12 @@
#define ITE_EC_FAN_CTL_ON(x) (1 << ((x)-1))
#define ITE_EC_FAN_CTL_PWM_CONTROL(x) \
- (((x) > 3 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \
+ (((x) > 3 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \
? (0x1e + ((x)-4)) \
: (0x15 + ((x)-1)) \
)
-#if IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)
+#if CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)
#define ITE_EC_FAN_CTL_TEMPIN_MASK (7 << 3)
#define ITE_EC_FAN_CTL_TEMPIN(x) ((((x)-1) & 7) << 3)
#else
@@ -145,32 +145,32 @@ static const u8 ITE_EC_TEMP_ADJUST[] = { 0x56, 0x57, 0x59 };
#define ITE_EC_BEEP_FREQ_DIVISOR(x) (((x) & 0x0f) << 0)
#define ITE_EC_FAN_CTL_TEMP_LIMIT_OFF(x) \
- (((x) == 5 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \
+ (((x) == 5 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \
? (0xa0) \
: (0x60 + ((x)-1) * 8) \
)
#define ITE_EC_FAN_CTL_TEMP_LIMIT_START(x) \
- (((x) == 5 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \
+ (((x) == 5 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \
? (0xa1) \
: (0x61 + ((x)-1) * 8) \
)
#define ITE_EC_FAN_CTL_TEMP_LIMIT_FULL(x) \
- (((x) == 5 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \
+ (((x) == 5 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \
? (0xa2) \
: (0x62 + ((x)-1) * 8) \
)
#define ITE_EC_FAN_CTL_PWM_START(x) \
- (((x) == 5 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \
+ (((x) == 5 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \
? (0xa3) \
: (0x63 + ((x)-1) * 8) \
)
#define ITE_EC_FAN_CTL_PWM_AUTO(x) \
- (((x) == 5 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \
+ (((x) == 5 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \
? (0xa4) \
: (0x64 + ((x)-1) * 8) \
)
#define ITE_EC_FAN_CTL_DELTA_TEMP(x) \
- (((x) == 5 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \
+ (((x) == 5 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \
? (0xa5) \
: (0x65 + ((x)-1) * 8) \
)
diff --git a/src/superio/ite/common/env_ctrl_chip.h b/src/superio/ite/common/env_ctrl_chip.h
index 68bf5a035f..923bfa3aea 100644
--- a/src/superio/ite/common/env_ctrl_chip.h
+++ b/src/superio/ite/common/env_ctrl_chip.h
@@ -21,7 +21,7 @@
#define ITE_EC_TMPIN_CNT 3
-#if IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)
+#if CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)
#define ITE_EC_FAN_CNT 5
#else
#define ITE_EC_FAN_CNT 3
diff --git a/src/superio/ite/it8716f/superio.c b/src/superio/ite/it8716f/superio.c
index c9330e70eb..de1ef0d73e 100644
--- a/src/superio/ite/it8716f/superio.c
+++ b/src/superio/ite/it8716f/superio.c
@@ -26,7 +26,7 @@
#include "it8716f.h"
-#if !IS_ENABLED(CONFIG_SUPERIO_ITE_IT8716F_OVERRIDE_FANCTL)
+#if !CONFIG(SUPERIO_ITE_IT8716F_OVERRIDE_FANCTL)
void init_ec(u16 base)
{