audio: mpxxdtyy: Convert to new DT_<COMPAT>_<INSTANCE> defines

Convert mpxxdtyy 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:
Kumar Gala 2019-01-29 14:52:53 -06:00 committed by Kumar Gala
commit a3682f67d4
3 changed files with 5 additions and 8 deletions

View file

@ -12,6 +12,3 @@
#define CONFIG_LP3943_DEV_NAME DT_ST_STM32_I2C_V1_40005C00_TI_LP3943_60_LABEL #define CONFIG_LP3943_DEV_NAME DT_ST_STM32_I2C_V1_40005C00_TI_LP3943_60_LABEL
#define CONFIG_LP3943_I2C_ADDRESS DT_ST_STM32_I2C_V1_40005C00_TI_LP3943_60_BASE_ADDRESS #define CONFIG_LP3943_I2C_ADDRESS DT_ST_STM32_I2C_V1_40005C00_TI_LP3943_60_BASE_ADDRESS
#define CONFIG_LP3943_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005C00_TI_LP3943_60_BUS_NAME #define CONFIG_LP3943_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005C00_TI_LP3943_60_BUS_NAME
#define DT_MPXXDTYY_DEV_NAME DT_ST_STM32_I2S_40015000_ST_MPXXDTYY_0_LABEL
#define DT_MPXXDTYY_MASTER_DEV_NAME DT_ST_STM32_I2S_40015000_ST_MPXXDTYY_0_BUS_NAME

View file

@ -88,10 +88,10 @@ static int mpxxdtyy_initialize(struct device *dev)
{ {
struct mpxxdtyy_data *const data = DEV_DATA(dev); struct mpxxdtyy_data *const data = DEV_DATA(dev);
data->comm_master = device_get_binding(DT_MPXXDTYY_MASTER_DEV_NAME); data->comm_master = device_get_binding(DT_ST_MPXXDTYY_0_BUS_NAME);
if (data->comm_master == NULL) { if (data->comm_master == NULL) {
LOG_ERR("master %s not found", DT_MPXXDTYY_MASTER_DEV_NAME); LOG_ERR("master %s not found", DT_ST_MPXXDTYY_0_BUS_NAME);
return -EINVAL; return -EINVAL;
} }
@ -101,6 +101,6 @@ static int mpxxdtyy_initialize(struct device *dev)
static struct mpxxdtyy_data mpxxdtyy_data; static struct mpxxdtyy_data mpxxdtyy_data;
DEVICE_AND_API_INIT(mpxxdtyy, DT_MPXXDTYY_DEV_NAME, mpxxdtyy_initialize, DEVICE_AND_API_INIT(mpxxdtyy, DT_ST_MPXXDTYY_0_LABEL, mpxxdtyy_initialize,
&mpxxdtyy_data, NULL, POST_KERNEL, &mpxxdtyy_data, NULL, POST_KERNEL,
CONFIG_AUDIO_DMIC_INIT_PRIORITY, &mpxxdtyy_driver_api); CONFIG_AUDIO_DMIC_INIT_PRIORITY, &mpxxdtyy_driver_api);

View file

@ -121,11 +121,11 @@ void main(void)
int ret; int ret;
struct device *mic_dev = device_get_binding(DT_MPXXDTYY_DEV_NAME); struct device *mic_dev = device_get_binding(DT_ST_MPXXDTYY_0_LABEL);
if (!mic_dev) { if (!mic_dev) {
printk("Could not get pointer to %s device\n", printk("Could not get pointer to %s device\n",
DT_MPXXDTYY_DEV_NAME); DT_ST_MPXXDTYY_0_LABEL);
return; return;
} }