--- zzzz-none-000/linux-3.10.107/arch/blackfin/mach-bf527/boards/tll6527m.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/blackfin/mach-bf527/boards/tll6527m.c 2021-02-04 17:41:59.000000000 +0000 @@ -28,8 +28,7 @@ #include #include -#if defined(CONFIG_TOUCHSCREEN_AD7879) \ - || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) +#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879) #include #define LCD_BACKLIGHT_GPIO 0x40 /* TLL6527M uses TLL7UIQ35 / ADI LCD EZ Extender. AD7879 AUX GPIO is used for @@ -45,7 +44,7 @@ * Driver needs to know address, irq and flag pin. */ -#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) +#if IS_ENABLED(CONFIG_USB_MUSB_HDRC) static struct resource musb_resources[] = { [0] = { .start = 0xffc03800, @@ -104,7 +103,7 @@ }; #endif -#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) +#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) #include static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { @@ -133,7 +132,7 @@ }; #endif -#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) +#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR) static struct mtd_partition tll6527m_partitions[] = { { .name = "bootloader(nor)", @@ -182,7 +181,7 @@ }; #endif -#if defined(CONFIG_GPIO_DECODER) || defined(CONFIG_GPIO_DECODER_MODULE) +#if IS_ENABLED(CONFIG_GPIO_DECODER) /* An SN74LVC138A 3:8 decoder chip has been used to generate 7 augmented * outputs used as SPI CS lines for all SPI SLAVE devices on TLL6527v1-0. * EXP_GPIO_SPISEL_BASE is the base number for the expanded outputs being @@ -215,7 +214,7 @@ #endif -#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) +#if IS_ENABLED(CONFIG_INPUT_ADXL34X) #include static const struct adxl34x_platform_data adxl345_info = { .x_axis_offset = 0, @@ -250,14 +249,14 @@ }; #endif -#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) +#if IS_ENABLED(CONFIG_RTC_DRV_BFIN) static struct platform_device rtc_device = { .name = "rtc-bfin", .id = -1, }; #endif -#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) +#if IS_ENABLED(CONFIG_BFIN_MAC) #include static const unsigned short bfin_mac_peripherals[] = P_RMII0; @@ -290,8 +289,7 @@ }; #endif -#if defined(CONFIG_MTD_M25P80) \ - || defined(CONFIG_MTD_M25P80_MODULE) +#if IS_ENABLED(CONFIG_MTD_M25P80) static struct mtd_partition bfin_spi_flash_partitions[] = { { .name = "bootloader(spi)", @@ -318,14 +316,13 @@ }; #endif -#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) +#if IS_ENABLED(CONFIG_MMC_SPI) static struct bfin5xx_spi_chip mmc_spi_chip_info = { .enable_dma = 0, }; #endif -#if defined(CONFIG_TOUCHSCREEN_AD7879) \ - || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) +#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879) static const struct ad7879_platform_data bfin_ad7879_ts_info = { .model = 7879, /* Model = AD7879 */ .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */ @@ -343,7 +340,7 @@ }; #endif -#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) +#if IS_ENABLED(CONFIG_SND_BF5XX_I2S) static struct platform_device bfin_i2s = { .name = "bfin-i2s", .id = CONFIG_SND_BF5XX_SPORT_NUM, @@ -351,7 +348,7 @@ }; #endif -#if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE) +#if IS_ENABLED(CONFIG_GPIO_MCP23S08) #include static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = { .chip[0].is_present = true, @@ -364,8 +361,7 @@ #endif static struct spi_board_info bfin_spi_board_info[] __initdata = { -#if defined(CONFIG_MTD_M25P80) \ - || defined(CONFIG_MTD_M25P80_MODULE) +#if IS_ENABLED(CONFIG_MTD_M25P80) { /* the modalias must be the same as spi device driver name */ .modalias = "m25p80", /* Name of spi_driver for this device */ @@ -381,7 +377,7 @@ }, #endif -#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) +#if IS_ENABLED(CONFIG_MMC_SPI) { .modalias = "mmc_spi", /* @@ -396,8 +392,7 @@ .mode = SPI_MODE_0, }, #endif -#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) \ - || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) +#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI) { .modalias = "ad7879", .platform_data = &bfin_ad7879_ts_info, @@ -409,7 +404,7 @@ .mode = SPI_CPHA | SPI_CPOL, }, #endif -#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) +#if IS_ENABLED(CONFIG_SPI_SPIDEV) { .modalias = "spidev", .max_speed_hz = 10000000, @@ -419,7 +414,7 @@ .mode = SPI_CPHA | SPI_CPOL, }, #endif -#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) +#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) { .modalias = "bfin-lq035q1-spi", .max_speed_hz = 20000000, @@ -428,7 +423,7 @@ .mode = SPI_CPHA | SPI_CPOL, }, #endif -#if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE) +#if IS_ENABLED(CONFIG_GPIO_MCP23S08) { .modalias = "mcp23s08", .platform_data = &bfin_mcp23s08_sys_gpio_info, @@ -448,7 +443,7 @@ #endif }; -#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) +#if IS_ENABLED(CONFIG_SPI_BFIN5XX) /* SPI controller data */ static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = EXP_GPIO_SPISEL_BASE + 8 + MAX_CTRL_CS, @@ -487,7 +482,7 @@ }; #endif /* spi master and devices */ -#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN) #ifdef CONFIG_SERIAL_BFIN_UART0 static struct resource bfin_uart0_resources[] = { { @@ -600,7 +595,7 @@ #endif #endif -#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) +#if IS_ENABLED(CONFIG_BFIN_SIR) #ifdef CONFIG_BFIN_SIR0 static struct resource bfin_sir0_resources[] = { { @@ -655,7 +650,7 @@ #endif #endif -#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) +#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static struct resource bfin_twi0_resource[] = { @@ -683,26 +678,25 @@ #endif static struct i2c_board_info __initdata bfin_i2c_board_info[] = { -#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) +#if IS_ENABLED(CONFIG_BFIN_TWI_LCD) { I2C_BOARD_INFO("pcf8574_lcd", 0x22), }, #endif -#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) +#if IS_ENABLED(CONFIG_FB_BFIN_7393) { I2C_BOARD_INFO("bfin-adv7393", 0x2B), }, #endif -#if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) \ - || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE) +#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_I2C) { I2C_BOARD_INFO("ad7879", 0x2C), .irq = IRQ_PH14, .platform_data = (void *)&bfin_ad7879_ts_info, }, #endif -#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) +#if IS_ENABLED(CONFIG_SND_SOC_SSM2602) { I2C_BOARD_INFO("ssm2602", 0x1b), }, @@ -714,8 +708,7 @@ { I2C_BOARD_INFO("ltc3576", 0x09), }, -#if defined(CONFIG_INPUT_ADXL34X_I2C) \ - || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE) +#if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C) { I2C_BOARD_INFO("adxl34x", 0x53), .irq = IRQ_PH13, @@ -724,8 +717,7 @@ #endif }; -#if defined(CONFIG_SERIAL_BFIN_SPORT) \ - || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART static struct resource bfin_sport0_uart_resources[] = { { @@ -823,28 +815,28 @@ &bfin_dpmc, -#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) +#if IS_ENABLED(CONFIG_RTC_DRV_BFIN) &rtc_device, #endif -#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) +#if IS_ENABLED(CONFIG_USB_MUSB_HDRC) &musb_device, #endif -#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) +#if IS_ENABLED(CONFIG_BFIN_MAC) &bfin_mii_bus, &bfin_mac_device, #endif -#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) +#if IS_ENABLED(CONFIG_SPI_BFIN5XX) &bfin_spi0_device, #endif -#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) +#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) &bfin_lq035q1_device, #endif -#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN) #ifdef CONFIG_SERIAL_BFIN_UART0 &bfin_uart0_device, #endif @@ -853,7 +845,7 @@ #endif #endif -#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) +#if IS_ENABLED(CONFIG_BFIN_SIR) #ifdef CONFIG_BFIN_SIR0 &bfin_sir0_device, #endif @@ -862,12 +854,11 @@ #endif #endif -#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) +#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) &i2c_bfin_twi_device, #endif -#if defined(CONFIG_SERIAL_BFIN_SPORT) \ - || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART &bfin_sport0_uart_device, #endif @@ -876,15 +867,15 @@ #endif #endif -#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) +#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR) &tll6527m_flash_device, #endif -#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) +#if IS_ENABLED(CONFIG_SND_BF5XX_I2S) &bfin_i2s, #endif -#if defined(CONFIG_GPIO_DECODER) || defined(CONFIG_GPIO_DECODER_MODULE) +#if IS_ENABLED(CONFIG_GPIO_DECODER) &spi_decoded_gpio, #endif };