aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/i2c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-03-05 16:53:33 -0800
committerPatrick Georgi <pgeorgi@google.com>2019-03-08 08:33:24 +0000
commitcd49cce7b70e80b4acc49b56bb2bb94370b4d867 (patch)
tree8e89136e2da7cf54453ba8c112eda94415b56242 /src/drivers/i2c
parentb3a8cc54dbaf833c590a56f912209a5632b71f49 (diff)
coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX)
This patch is a raw application of find src/ -type f | xargs sed -i -e 's/IS_ENABLED\s*(CONFIG_/CONFIG(/g' Change-Id: I6262d6d5c23cabe23c242b4f38d446b74fe16b88 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31774 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/drivers/i2c')
-rw-r--r--src/drivers/i2c/da7219/da7219.c4
-rw-r--r--src/drivers/i2c/designware/dw_i2c.c4
-rw-r--r--src/drivers/i2c/designware/dw_i2c.h2
-rw-r--r--src/drivers/i2c/generic/generic.c4
-rw-r--r--src/drivers/i2c/hid/hid.c4
-rw-r--r--src/drivers/i2c/nau8825/nau8825.c4
-rw-r--r--src/drivers/i2c/tpm/tis.c4
-rw-r--r--src/drivers/i2c/tpm/tis_atmel.c6
-rw-r--r--src/drivers/i2c/w83795/w83795.c6
9 files changed, 19 insertions, 19 deletions
diff --git a/src/drivers/i2c/da7219/da7219.c b/src/drivers/i2c/da7219/da7219.c
index ebc22e0d61..5399f75395 100644
--- a/src/drivers/i2c/da7219/da7219.c
+++ b/src/drivers/i2c/da7219/da7219.c
@@ -24,7 +24,7 @@
#include <string.h>
#include "chip.h"
-#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+#if CONFIG(HAVE_ACPI_TABLES)
#define DA7219_ACPI_NAME "DLG7"
#define DA7219_ACPI_HID "DLGS7219"
@@ -113,7 +113,7 @@ static struct device_operations da7219_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
-#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+#if CONFIG(HAVE_ACPI_TABLES)
.acpi_name = da7219_acpi_name,
.acpi_fill_ssdt_generator = da7219_fill_ssdt,
#endif
diff --git a/src/drivers/i2c/designware/dw_i2c.c b/src/drivers/i2c/designware/dw_i2c.c
index 617e663472..93b662a63d 100644
--- a/src/drivers/i2c/designware/dw_i2c.c
+++ b/src/drivers/i2c/designware/dw_i2c.c
@@ -377,7 +377,7 @@ static int _dw_i2c_transfer(unsigned int bus, const struct i2c_msg *segments,
/* Process each segment */
while (count--) {
- if (IS_ENABLED(CONFIG_DRIVERS_I2C_DESIGNWARE_DEBUG)) {
+ if (CONFIG(DRIVERS_I2C_DESIGNWARE_DEBUG)) {
printk(BIOS_DEBUG, "i2c %u:%02x %s %d bytes : ",
bus, segments->slave,
(segments->flags & I2C_M_RD) ? "R" : "W",
@@ -401,7 +401,7 @@ static int _dw_i2c_transfer(unsigned int bus, const struct i2c_msg *segments,
}
}
- if (IS_ENABLED(CONFIG_DRIVERS_I2C_DESIGNWARE_DEBUG)) {
+ if (CONFIG(DRIVERS_I2C_DESIGNWARE_DEBUG)) {
int j;
for (j = 0; j < segments->len; j++)
printk(BIOS_DEBUG, "%02x ", segments->buf[j]);
diff --git a/src/drivers/i2c/designware/dw_i2c.h b/src/drivers/i2c/designware/dw_i2c.h
index 17304a18dc..d78000793e 100644
--- a/src/drivers/i2c/designware/dw_i2c.h
+++ b/src/drivers/i2c/designware/dw_i2c.h
@@ -20,7 +20,7 @@
#include <device/i2c.h>
#include <stdint.h>
-#if IS_ENABLED(CONFIG_DRIVERS_I2C_DESIGNWARE_DEBUG)
+#if CONFIG(DRIVERS_I2C_DESIGNWARE_DEBUG)
#define DW_I2C_DEBUG BIOS_DEBUG
#else
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c
index ca2dfafdc5..598f211ed8 100644
--- a/src/drivers/i2c/generic/generic.c
+++ b/src/drivers/i2c/generic/generic.c
@@ -24,7 +24,7 @@
#include <string.h>
#include "chip.h"
-#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+#if CONFIG(HAVE_ACPI_TABLES)
static bool i2c_generic_add_gpios_to_crs(struct drivers_i2c_generic_config *cfg)
{
@@ -192,7 +192,7 @@ static struct device_operations i2c_generic_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
-#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+#if CONFIG(HAVE_ACPI_TABLES)
.acpi_name = i2c_generic_acpi_name,
.acpi_fill_ssdt_generator = i2c_generic_fill_ssdt_generator,
#endif
diff --git a/src/drivers/i2c/hid/hid.c b/src/drivers/i2c/hid/hid.c
index 952e3e49f0..d570892c1d 100644
--- a/src/drivers/i2c/hid/hid.c
+++ b/src/drivers/i2c/hid/hid.c
@@ -19,7 +19,7 @@
#include <string.h>
#include "chip.h"
-#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+#if CONFIG(HAVE_ACPI_TABLES)
static void i2c_hid_fill_dsm(struct device *dev)
{
struct drivers_i2c_hid_config *config = dev->chip_info;
@@ -50,7 +50,7 @@ static struct device_operations i2c_hid_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
-#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+#if CONFIG(HAVE_ACPI_TABLES)
.acpi_name = i2c_hid_acpi_name,
.acpi_fill_ssdt_generator = i2c_hid_fill_ssdt_generator,
#endif
diff --git a/src/drivers/i2c/nau8825/nau8825.c b/src/drivers/i2c/nau8825/nau8825.c
index 3f905125c4..a98054abd0 100644
--- a/src/drivers/i2c/nau8825/nau8825.c
+++ b/src/drivers/i2c/nau8825/nau8825.c
@@ -24,7 +24,7 @@
#include <string.h>
#include "chip.h"
-#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+#if CONFIG(HAVE_ACPI_TABLES)
#define NAU8825_ACPI_NAME "NAU8"
#define NAU8825_ACPI_HID "10508825"
@@ -102,7 +102,7 @@ static struct device_operations nau8825_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
-#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+#if CONFIG(HAVE_ACPI_TABLES)
.acpi_name = nau8825_acpi_name,
.acpi_fill_ssdt_generator = nau8825_fill_ssdt,
#endif
diff --git a/src/drivers/i2c/tpm/tis.c b/src/drivers/i2c/tpm/tis.c
index 1893d167d2..92c89211df 100644
--- a/src/drivers/i2c/tpm/tis.c
+++ b/src/drivers/i2c/tpm/tis.c
@@ -143,7 +143,7 @@ int tis_sendrecv(const uint8_t *sendbuf, size_t sbuf_size,
ASSERT(sbuf_size >= 10);
/* Display the TPM command */
- if (IS_ENABLED(CONFIG_DRIVER_TPM_DISPLAY_TIS_BYTES)) {
+ if (CONFIG(DRIVER_TPM_DISPLAY_TIS_BYTES)) {
printk(BIOS_DEBUG, "TPM Command: 0x%08x\n",
read_at_be32(sendbuf, sizeof(uint16_t)
+ sizeof(uint32_t)));
@@ -165,7 +165,7 @@ int tis_sendrecv(const uint8_t *sendbuf, size_t sbuf_size,
*rbuf_len = len;
/* Display the TPM response */
- if (IS_ENABLED(CONFIG_DRIVER_TPM_DISPLAY_TIS_BYTES)) {
+ if (CONFIG(DRIVER_TPM_DISPLAY_TIS_BYTES)) {
printk(BIOS_DEBUG, "TPM Response: 0x%08x\n",
read_at_be32(recvbuf, sizeof(uint16_t)
+ sizeof(uint32_t)));
diff --git a/src/drivers/i2c/tpm/tis_atmel.c b/src/drivers/i2c/tpm/tis_atmel.c
index 0c1d86d33d..4b2f55441d 100644
--- a/src/drivers/i2c/tpm/tis_atmel.c
+++ b/src/drivers/i2c/tpm/tis_atmel.c
@@ -61,7 +61,7 @@ int tis_sendrecv(const uint8_t *sendbuf, size_t sbuf_size,
struct stopwatch sw;
ASSERT(sbuf_size >= 10);
- if (IS_ENABLED(CONFIG_DRIVER_TPM_DISPLAY_TIS_BYTES)) {
+ if (CONFIG(DRIVER_TPM_DISPLAY_TIS_BYTES)) {
/* Display the TPM command */
if (sbuf_size >= 10)
printk(BIOS_DEBUG, "TPM Command: 0x%08x\n",
@@ -106,7 +106,7 @@ int tis_sendrecv(const uint8_t *sendbuf, size_t sbuf_size,
/* Determine if there is additional response data */
if (recv_bytes > hdr_bytes) {
/* Display the TPM response */
- if (IS_ENABLED(CONFIG_DRIVER_TPM_DISPLAY_TIS_BYTES))
+ if (CONFIG(DRIVER_TPM_DISPLAY_TIS_BYTES))
hexdump(recvbuf, hdr_bytes);
/* Read the full TPM response */
@@ -120,7 +120,7 @@ int tis_sendrecv(const uint8_t *sendbuf, size_t sbuf_size,
*rbuf_len = status;
/* Display the TPM response */
- if (IS_ENABLED(CONFIG_DRIVER_TPM_DISPLAY_TIS_BYTES)) {
+ if (CONFIG(DRIVER_TPM_DISPLAY_TIS_BYTES)) {
printk(BIOS_DEBUG, "TPM Response: 0x%08x\n",
read_at_be32(recvbuf, sizeof(uint16_t)
+ sizeof(uint32_t)));
diff --git a/src/drivers/i2c/w83795/w83795.c b/src/drivers/i2c/w83795/w83795.c
index 02b7c375a6..68696362ef 100644
--- a/src/drivers/i2c/w83795/w83795.c
+++ b/src/drivers/i2c/w83795/w83795.c
@@ -142,14 +142,14 @@ static void w83795_init(struct device *dev, w83795_fan_mode_t mode, u8 dts_src)
uint8_t val;
uint16_t limit_value;
-#if IS_ENABLED(CONFIG_SMBUS_HAS_AUX_CHANNELS)
+#if CONFIG(SMBUS_HAS_AUX_CHANNELS)
uint8_t smbus_aux_channel_prev = smbus_get_current_channel();
smbus_switch_to_channel(config->smbus_aux);
printk(BIOS_DEBUG, "Set SMBUS controller to channel %d\n", config->smbus_aux);
#endif
if (smbus_read_byte(dev, 0x00) < 0) {
-#if IS_ENABLED(CONFIG_SMBUS_HAS_AUX_CHANNELS)
+#if CONFIG(SMBUS_HAS_AUX_CHANNELS)
/* Restore SMBUS channel setting */
smbus_switch_to_channel(smbus_aux_channel_prev);
printk(BIOS_DEBUG, "Set SMBUS controller to channel %d\n", smbus_aux_channel_prev);
@@ -346,7 +346,7 @@ static void w83795_init(struct device *dev, w83795_fan_mode_t mode, u8 dts_src)
val |= W83795_REG_CONFIG_START;
w83795_write(dev, W83795_REG_CONFIG, val);
-#if IS_ENABLED(CONFIG_SMBUS_HAS_AUX_CHANNELS)
+#if CONFIG(SMBUS_HAS_AUX_CHANNELS)
/* Restore SMBUS channel setting */
smbus_switch_to_channel(smbus_aux_channel_prev);
printk(BIOS_DEBUG, "Set SMBUS controller to channel %d\n", smbus_aux_channel_prev);