Skip to content
Permalink
Browse files

drivers: pwm: imx: replace deprecated DTS macros

Replace deprecated DT macros with DT_INST_ variants.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
  • Loading branch information...
nashif committed Jul 6, 2019
1 parent e99c4d2 commit 437692c057e40ea8de35c710a2dfbe4f5e35c0fa
Showing with 12 additions and 12 deletions.
  1. +12 −12 drivers/pwm/pwm_imx.c
@@ -154,55 +154,55 @@ static const struct pwm_driver_api imx_pwm_driver_api = {

#ifdef CONFIG_PWM_1
static const struct imx_pwm_config imx_pwm_config_1 = {
.base = (PWM_Type *)PWM_1_BASE_ADDRESS,
.prescaler = PWM_1_PRESCALER,
.base = (PWM_Type *)DT_ALIAS_PWM_1_BASE_ADDRESS,
.prescaler = DT_ALIAS_PWM_1_PRESCALER,
};

static struct imx_pwm_data imx_pwm_data_1;

DEVICE_AND_API_INIT(imx_pwm_1, PWM_1_LABEL, &imx_pwm_init,
DEVICE_AND_API_INIT(imx_pwm_1, DT_ALIAS_PWM_1_LABEL, &imx_pwm_init,
&imx_pwm_data_1, &imx_pwm_config_1,
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
&imx_pwm_driver_api);
#endif /* CONFIG_PWM_1 */

#ifdef CONFIG_PWM_2
static const struct imx_pwm_config imx_pwm_config_2 = {
.base = (PWM_Type *)PWM_2_BASE_ADDRESS,
.prescaler = PWM_2_PRESCALER,
.base = (PWM_Type *)DT_ALIAS_PWM_2_BASE_ADDRESS,
.prescaler = DT_ALIAS_PWM_2_PRESCALER,
};

static struct imx_pwm_data imx_pwm_data_2;

DEVICE_AND_API_INIT(imx_pwm_2, PWM_2_LABEL, &imx_pwm_init,
DEVICE_AND_API_INIT(imx_pwm_2, DT_ALIAS_PWM_2_LABEL, &imx_pwm_init,
&imx_pwm_data_2, &imx_pwm_config_2,
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
&imx_pwm_driver_api);
#endif /* CONFIG_PWM_2 */

#ifdef CONFIG_PWM_3
static const struct imx_pwm_config imx_pwm_config_3 = {
.base = (PWM_Type *)PWM_3_BASE_ADDRESS,
.prescaler = PWM_3_PRESCALER,
.base = (PWM_Type *)DT_ALIAS_PWM_3_BASE_ADDRESS,
.prescaler = DT_ALIAS_PWM_3_PRESCALER,
};

static struct imx_pwm_data imx_pwm_data_3;

DEVICE_AND_API_INIT(imx_pwm_3, PWM_3_LABEL, &imx_pwm_init,
DEVICE_AND_API_INIT(imx_pwm_3, DT_ALIAS_PWM_3_LABEL, &imx_pwm_init,
&imx_pwm_data_3, &imx_pwm_config_3,
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
&imx_pwm_driver_api);
#endif /* CONFIG_PWM_3 */

#ifdef CONFIG_PWM_4
static const struct imx_pwm_config imx_pwm_config_4 = {
.base = (PWM_Type *)PWM_4_BASE_ADDRESS,
.prescaler = PWM_4_PRESCALER,
.base = (PWM_Type *)DT_ALIAS_PWM_4_BASE_ADDRESS
.prescaler = DT_ALIAS_PWM_4_PRESCALER,
};

static struct imx_pwm_data imx_pwm_data_4;

DEVICE_AND_API_INIT(imx_pwm_4, PWM_4_LABEL, &imx_pwm_init,
DEVICE_AND_API_INIT(imx_pwm_4, DT_ALIAS_PWM_4_LABEL, &imx_pwm_init,
&imx_pwm_data_4, &imx_pwm_config_4,
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
&imx_pwm_driver_api);

0 comments on commit 437692c

Please sign in to comment.
You can’t perform that action at this time.