]> git.dujemihanovic.xyz Git - u-boot.git/commit
dm: i2c: use CONFIG_IS_ENABLED macro for DM_I2C/DM_I2C_GPIO
authorIgor Opaniuk <igor.opaniuk@foundries.io>
Tue, 9 Feb 2021 11:52:45 +0000 (13:52 +0200)
committerHeiko Schocher <hs@denx.de>
Sun, 21 Feb 2021 05:08:00 +0000 (06:08 +0100)
commit2147a16983d17bcb0438607aa7760494afc27014
tree153470783919253c3a9bbcbc0e34b38c62f138f1
parenta907dce88e462251d96be9cdd72900543e4798df
dm: i2c: use CONFIG_IS_ENABLED macro for DM_I2C/DM_I2C_GPIO

Use CONFIG_IS_ENABLED() macro, which provides more convenient
way to check $(SPL)DM_I2C/$(SPL)DM_I2C_GPIO configs
for both SPL and U-Boot proper.

CONFIG_IS_ENABLED(DM_I2C) expands to:
- 1 if CONFIG_SPL_BUILD is undefined and CONFIG_DM_I2C is set to 'y',
- 1 if CONFIG_SPL_BUILD is defined and CONFIG_SPL_DM_I2C is set to 'y',
- 0 otherwise.

All occurences were replaced automatically using these bash cmds:
$ find . -type f -exec sed -i
     's/ifndef CONFIG_DM_I2C/if !CONFIG_IS_ENABLED(DM_I2C)/g' {} +
$ find . -type f -exec sed -i
    's/ifdef CONFIG_DM_I2C/if CONFIG_IS_ENABLED(DM_I2C)/g' {} +
$ find . -type f -exec sed -i
    's/defined(CONFIG_DM_I2C)/CONFIG_IS_ENABLED(DM_I2C)/g' {} +
$ find . -type f -exec sed -i
    's/ifndef CONFIG_DM_I2C_GPIO/if !CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} +
$ find . -type f -exec sed -i
    's/ifdef CONFIG_DM_I2C_GPIO/if CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} +
$ find . -type f -exec sed -i
    's/defined(CONFIG_DM_I2C_GPIO)/CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} +

Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
107 files changed:
arch/arm/include/asm/arch-fsl-layerscape/config.h
arch/arm/include/asm/arch-lpc32xx/i2c.h
arch/arm/include/asm/mach-imx/mxc_i2c.h
arch/arm/include/asm/omap_i2c.h
arch/arm/mach-imx/i2c-mxv7.c
arch/arm/mach-keystone/ddr3_spd.c
arch/arm/mach-kirkwood/include/mach/config.h
arch/arm/mach-omap2/am33xx/board.c
arch/arm/mach-omap2/am33xx/clk_synthesizer.c
arch/arm/mach-omap2/boot-common.c
arch/arm/mach-omap2/clocks-common.c
arch/arm/mach-sunxi/board.c
arch/powerpc/include/asm/fsl_i2c.h
board/freescale/common/dcu_sii9022a.c
board/freescale/common/diu_ch7301.c
board/freescale/common/emc2305.c
board/freescale/common/qixis.c
board/freescale/common/sys_eeprom.c
board/freescale/common/vid.c
board/freescale/common/vsc3316_3308.c
board/freescale/ls1012aqds/ls1012aqds.c
board/freescale/ls1012ardb/eth.c
board/freescale/ls1012ardb/ls1012ardb.c
board/freescale/ls1021aqds/dcu.c
board/freescale/ls1021aqds/ls1021aqds.c
board/freescale/ls1021atwr/ls1021atwr.c
board/freescale/ls1028a/ls1028a.c
board/freescale/ls1043aqds/ls1043aqds.c
board/freescale/ls1046afrwy/ls1046afrwy.c
board/freescale/ls1046aqds/ls1046aqds.c
board/freescale/ls1088a/eth_ls1088aqds.c
board/freescale/ls1088a/ls1088a.c
board/freescale/ls2080aqds/eth.c
board/freescale/ls2080aqds/ls2080aqds.c
board/freescale/ls2080ardb/ls2080ardb.c
board/freescale/lx2160a/lx2160a.c
board/freescale/p1010rdb/p1010rdb.c
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
board/freescale/t102xrdb/t102xrdb.c
board/freescale/t208xqds/t208xqds.c
board/friendlyarm/nanopi2/onewire.c
board/keymile/common/ivm.c
board/samsung/common/misc.c
board/samsung/trats/trats.c
board/samsung/trats2/trats2.c
board/sunxi/board.c
board/ti/am335x/board.c
board/ti/am335x/mux.c
board/ti/am43xx/board.c
board/ti/common/board_detect.c
board/ti/ks2_evm/board_k2g.c
board/wandboard/wandboard.c
cmd/eeprom.c
cmd/i2c.c
doc/driver-model/i2c-howto.rst
drivers/ddr/fsl/main.c
drivers/i2c/davinci_i2c.c
drivers/i2c/designware_i2c.c
drivers/i2c/fsl_i2c.c
drivers/i2c/ihs_i2c.c
drivers/i2c/lpc32xx_i2c.c
drivers/i2c/mv_i2c.c
drivers/i2c/mvtwsi.c
drivers/i2c/mxc_i2c.c
drivers/i2c/omap24xx_i2c.c
drivers/power/palmas.c
drivers/power/pmic/pmic_tps62362.c
drivers/power/pmic/pmic_tps65217.c
drivers/power/pmic/pmic_tps65218.c
drivers/power/pmic/pmic_tps65910.c
drivers/power/twl4030.c
drivers/power/twl6030.c
drivers/tpm/tpm_atmel_twi.c
drivers/usb/host/ohci-lpc32xx.c
include/_exports.h
include/config_fallbacks.h
include/configs/MPC8548CDS.h
include/configs/P1010RDB.h
include/configs/P2041RDB.h
include/configs/T102xRDB.h
include/configs/T104xRDB.h
include/configs/T208xQDS.h
include/configs/T208xRDB.h
include/configs/T4240RDB.h
include/configs/am43xx_evm.h
include/configs/corenet_ds.h
include/configs/ls1012a_common.h
include/configs/ls1021aiot.h
include/configs/ls1021aqds.h
include/configs/ls1021atsn.h
include/configs/ls1021atwr.h
include/configs/ls1028a_common.h
include/configs/ls1043a_common.h
include/configs/ls1046a_common.h
include/configs/ls1088a_common.h
include/configs/ls1088aqds.h
include/configs/ls2080a_common.h
include/configs/ls2080aqds.h
include/configs/ls2080ardb.h
include/configs/p1_p2_rdb_pc.h
include/configs/sunxi-common.h
include/configs/ti_armv7_common.h
include/exports.h
include/i2c.h
include/palmas.h
include/twl4030.h
include/twl6030.h