audio: tlv320dac310x: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert tlv320dac310x driver to use new defines so we can remove the dts_fixup.h code for it. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
d7b7dbd910
commit
5c640cd0b5
2 changed files with 6 additions and 24 deletions
|
@ -6,24 +6,6 @@
|
||||||
|
|
||||||
/* Board level DTS fixup file */
|
/* Board level DTS fixup file */
|
||||||
|
|
||||||
#define DT_CODEC_I2C_BUS_NAME \
|
|
||||||
DT_SNPS_DESIGNWARE_I2C_80400_TI_TLV320DAC_18_BUS_NAME
|
|
||||||
|
|
||||||
#define DT_CODEC_I2C_BUS_ADDR \
|
|
||||||
DT_SNPS_DESIGNWARE_I2C_80400_TI_TLV320DAC_18_BASE_ADDRESS
|
|
||||||
|
|
||||||
#define DT_CODEC_NAME \
|
|
||||||
DT_SNPS_DESIGNWARE_I2C_80400_TI_TLV320DAC_18_LABEL
|
|
||||||
|
|
||||||
#define DT_CODEC_RESET_GPIO_NAME \
|
|
||||||
DT_SNPS_DESIGNWARE_I2C_80400_TI_TLV320DAC_18_RESET_GPIOS_CONTROLLER
|
|
||||||
|
|
||||||
#define DT_CODEC_RESET_GPIO_FLAGS \
|
|
||||||
DT_SNPS_DESIGNWARE_I2C_80400_TI_TLV320DAC_18_RESET_GPIOS_FLAGS
|
|
||||||
|
|
||||||
#define DT_CODEC_RESET_GPIO_PIN \
|
|
||||||
DT_SNPS_DESIGNWARE_I2C_80400_TI_TLV320DAC_18_RESET_GPIOS_PIN
|
|
||||||
|
|
||||||
#define DT_SPI_NOR_SPI_NAME \
|
#define DT_SPI_NOR_SPI_NAME \
|
||||||
DT_SNPS_DESIGNWARE_SPI_E000_SPI_FLASH_0_BUS_NAME
|
DT_SNPS_DESIGNWARE_SPI_E000_SPI_FLASH_0_BUS_NAME
|
||||||
|
|
||||||
|
|
|
@ -41,12 +41,12 @@ struct codec_driver_data {
|
||||||
|
|
||||||
static struct codec_driver_config codec_device_config = {
|
static struct codec_driver_config codec_device_config = {
|
||||||
.i2c_device = NULL,
|
.i2c_device = NULL,
|
||||||
.i2c_dev_name = DT_CODEC_I2C_BUS_NAME,
|
.i2c_dev_name = DT_TI_TLV320DAC_0_BUS_NAME,
|
||||||
.i2c_address = DT_CODEC_I2C_BUS_ADDR,
|
.i2c_address = DT_TI_TLV320DAC_0_BASE_ADDRESS,
|
||||||
.gpio_device = NULL,
|
.gpio_device = NULL,
|
||||||
.gpio_dev_name = DT_CODEC_RESET_GPIO_NAME,
|
.gpio_dev_name = DT_TI_TLV320DAC_0_RESET_GPIOS_CONTROLLER,
|
||||||
.gpio_pin = DT_CODEC_RESET_GPIO_PIN,
|
.gpio_pin = DT_TI_TLV320DAC_0_RESET_GPIOS_PIN,
|
||||||
.gpio_flags = DT_CODEC_RESET_GPIO_FLAGS,
|
.gpio_flags = DT_TI_TLV320DAC_0_RESET_GPIOS_FLAGS,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct codec_driver_data codec_device_data;
|
static struct codec_driver_data codec_device_data;
|
||||||
|
@ -538,6 +538,6 @@ static const struct audio_codec_api codec_driver_api = {
|
||||||
.apply_properties = codec_apply_properties,
|
.apply_properties = codec_apply_properties,
|
||||||
};
|
};
|
||||||
|
|
||||||
DEVICE_AND_API_INIT(tlv320dac310x, DT_CODEC_NAME, codec_initialize,
|
DEVICE_AND_API_INIT(tlv320dac310x, DT_TI_TLV320DAC_0_LABEL, codec_initialize,
|
||||||
&codec_device_data, &codec_device_config, POST_KERNEL,
|
&codec_device_data, &codec_device_config, POST_KERNEL,
|
||||||
CONFIG_AUDIO_CODEC_INIT_PRIORITY, &codec_driver_api);
|
CONFIG_AUDIO_CODEC_INIT_PRIORITY, &codec_driver_api);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue