@@ -45,9 +45,9 @@ struct mcux_acmp_config {
45
45
CMP_Type * base ;
46
46
acmp_filter_config_t filter ;
47
47
const struct pinctrl_dev_config * pincfg ;
48
- #ifdef CONFIG_MCUX_ACMP_TRIGGER
48
+ #ifdef CONFIG_SENSOR_MCUX_ACMP_TRIGGER
49
49
void (* irq_config_func )(const struct device * dev );
50
- #endif /* CONFIG_MCUX_ACMP_TRIGGER */
50
+ #endif /* CONFIG_SENSOR_MCUX_ACMP_TRIGGER */
51
51
bool high_speed : 1 ;
52
52
bool unfiltered : 1 ;
53
53
bool output : 1 ;
@@ -61,15 +61,15 @@ struct mcux_acmp_data {
61
61
#if MCUX_ACMP_HAS_DISCRETE_MODE
62
62
acmp_discrete_mode_config_t discrete_config ;
63
63
#endif
64
- #ifdef CONFIG_MCUX_ACMP_TRIGGER
64
+ #ifdef CONFIG_SENSOR_MCUX_ACMP_TRIGGER
65
65
const struct device * dev ;
66
66
sensor_trigger_handler_t rising_handler ;
67
67
const struct sensor_trigger * rising_trigger ;
68
68
sensor_trigger_handler_t falling_handler ;
69
69
const struct sensor_trigger * falling_trigger ;
70
70
struct k_work work ;
71
71
volatile uint32_t status ;
72
- #endif /* CONFIG_MCUX_ACMP_TRIGGER */
72
+ #endif /* CONFIG_SENSOR_MCUX_ACMP_TRIGGER */
73
73
bool cout ;
74
74
};
75
75
@@ -370,7 +370,7 @@ static int mcux_acmp_channel_get(const struct device *dev,
370
370
return 0 ;
371
371
}
372
372
373
- #ifdef CONFIG_MCUX_ACMP_TRIGGER
373
+ #ifdef CONFIG_SENSOR_MCUX_ACMP_TRIGGER
374
374
static int mcux_acmp_trigger_set (const struct device * dev ,
375
375
const struct sensor_trigger * trig ,
376
376
sensor_trigger_handler_t handler )
@@ -431,7 +431,7 @@ static void mcux_acmp_isr(const struct device *dev)
431
431
432
432
k_work_submit (& data -> work );
433
433
}
434
- #endif /* CONFIG_MCUX_ACMP_TRIGGER */
434
+ #endif /* CONFIG_SENSOR_MCUX_ACMP_TRIGGER */
435
435
436
436
static int mcux_acmp_init (const struct device * dev )
437
437
{
@@ -462,15 +462,15 @@ static int mcux_acmp_init(const struct device *dev)
462
462
/* Disable DAC */
463
463
ACMP_SetDACConfig (config -> base , NULL );
464
464
465
- #ifdef CONFIG_MCUX_ACMP_TRIGGER
465
+ #ifdef CONFIG_SENSOR_MCUX_ACMP_TRIGGER
466
466
data -> dev = dev ;
467
467
k_work_init (& data -> work , mcux_acmp_trigger_work_handler );
468
468
469
469
config -> irq_config_func (dev );
470
470
ACMP_EnableInterrupts (config -> base ,
471
471
kACMP_OutputRisingInterruptEnable |
472
472
kACMP_OutputFallingInterruptEnable );
473
- #endif /* CONFIG_MCUX_ACMP_TRIGGER */
473
+ #endif /* CONFIG_SENSOR_MCUX_ACMP_TRIGGER */
474
474
475
475
ACMP_Enable (config -> base , true);
476
476
@@ -480,9 +480,9 @@ static int mcux_acmp_init(const struct device *dev)
480
480
static const struct sensor_driver_api mcux_acmp_driver_api = {
481
481
.attr_set = mcux_acmp_attr_set ,
482
482
.attr_get = mcux_acmp_attr_get ,
483
- #ifdef CONFIG_MCUX_ACMP_TRIGGER
483
+ #ifdef CONFIG_SENSOR_MCUX_ACMP_TRIGGER
484
484
.trigger_set = mcux_acmp_trigger_set ,
485
- #endif /* CONFIG_MCUX_ACMP_TRIGGER */
485
+ #endif /* CONFIG_SENSOR_MCUX_ACMP_TRIGGER */
486
486
.sample_fetch = mcux_acmp_sample_fetch ,
487
487
.channel_get = mcux_acmp_channel_get ,
488
488
};
@@ -503,7 +503,7 @@ static const struct mcux_acmp_config mcux_acmp_config_##n = { \
503
503
config_func_init \
504
504
}
505
505
506
- #ifdef CONFIG_MCUX_ACMP_TRIGGER
506
+ #ifdef CONFIG_SENSOR_MCUX_ACMP_TRIGGER
507
507
#define MCUX_ACMP_CONFIG_FUNC (n ) \
508
508
static void mcux_acmp_config_func_##n(const struct device *dev) \
509
509
{ \
@@ -517,12 +517,12 @@ static const struct mcux_acmp_config mcux_acmp_config_##n = { \
517
517
.irq_config_func = mcux_acmp_config_func_##n
518
518
#define MCUX_ACMP_INIT_CONFIG (n ) \
519
519
MCUX_ACMP_DECLARE_CONFIG(n, MCUX_ACMP_CONFIG_FUNC_INIT(n))
520
- #else /* !CONFIG_MCUX_ACMP_TRIGGER */
520
+ #else /* !CONFIG_SENSOR_MCUX_ACMP_TRIGGER */
521
521
#define MCUX_ACMP_CONFIG_FUNC (n )
522
522
#define MCUX_ACMP_CONFIG_FUNC_INIT
523
523
#define MCUX_ACMP_INIT_CONFIG (n ) \
524
524
MCUX_ACMP_DECLARE_CONFIG(n, MCUX_ACMP_CONFIG_FUNC_INIT)
525
- #endif /* !CONFIG_MCUX_ACMP_TRIGGER */
525
+ #endif /* !CONFIG_SENSOR_MCUX_ACMP_TRIGGER */
526
526
527
527
#define MCUX_ACMP_INIT (n ) \
528
528
static struct mcux_acmp_data mcux_acmp_data_##n; \
0 commit comments