@@ -108,9 +108,6 @@ struct spi_cdns_cfg {
108
108
uint32_t clock_frequency ;
109
109
uint32_t ext_clock ;
110
110
irq_config_func_t irq_config ;
111
- #ifdef CONFIG_PINCTRL
112
- const struct pinctrl_dev_config * pcfg ;
113
- #endif
114
111
uint8_t fifo_width ;
115
112
uint16_t rx_fifo_depth ;
116
113
uint16_t tx_fifo_depth ;
@@ -573,7 +570,6 @@ static void spi_cdns_isr(const struct device *dev)
573
570
spi_cdns_cs_control (dev , false);
574
571
}
575
572
pm_device_busy_clear (dev );
576
- pm_device_runtime_put (dev );
577
573
}
578
574
#endif
579
575
@@ -642,7 +638,6 @@ static int spi_cdns_transceive(const struct device *dev, const struct spi_config
642
638
643
639
spi_context_lock (& data -> ctx , asynchronous , cb , userdata , config );
644
640
645
- pm_device_runtime_get (dev );
646
641
pm_device_busy_set (dev );
647
642
648
643
spi_cdns_spi_enable (dev , false);
@@ -712,7 +707,6 @@ static int spi_cdns_transceive(const struct device *dev, const struct spi_config
712
707
spi_cdns_cs_control (dev , false);
713
708
}
714
709
pm_device_busy_clear (dev );
715
- pm_device_runtime_put (dev );
716
710
}
717
711
718
712
#ifdef CONFIG_SPI_SLAVE
@@ -795,39 +789,6 @@ static int spi_cdns_release(const struct device *dev, const struct spi_config *c
795
789
return 0 ;
796
790
}
797
791
798
- #ifdef CONFIG_PM_DEVICE
799
- static int spi_cdns_pm_action (const struct device * dev , enum pm_device_action action )
800
- {
801
- const struct spi_cdns_cfg * cfg = dev -> config ;
802
- int ret ;
803
-
804
- switch (action ) {
805
- case PM_DEVICE_ACTION_RESUME :
806
- /* TODO: Enable SPI Clock */
807
- #ifdef CONFIG_PINCTRL
808
- ret = pinctrl_apply_state (cfg -> pcfg , PINCTRL_STATE_DEFAULT );
809
- if (ret < 0 ) {
810
- return ret ;
811
- }
812
- #endif
813
- break ;
814
- case PM_DEVICE_ACTION_SUSPEND :
815
- /* TODO: Disable SPI Clock */
816
- #ifdef CONFIG_PINCTRL
817
- ret = pinctrl_apply_state (cfg -> pcfg , PINCTRL_STATE_SLEEP );
818
- if (ret < 0 ) {
819
- return ret ;
820
- }
821
- #endif
822
- break ;
823
- default :
824
- ret = - ENOTSUP ;
825
- }
826
-
827
- return ret ;
828
- }
829
- #endif /* CONFIG_PM_DEVICE */
830
-
831
792
/**
832
793
* SPI driver API registered in Zephyr spi framework
833
794
*/
@@ -863,9 +824,8 @@ static DEVICE_API(spi, spi_cdns_api) = {
863
824
.tx_fifo_depth = DT_INST_PROP(n, tx_fifo_depth), \
864
825
.rx_fifo_depth = DT_INST_PROP(n, rx_fifo_depth), \
865
826
}; \
866
- SPI_DEVICE_DT_INST_DEFINE(n, spi_cdns_init, spi_cdns_pm_action, &spi_cdns_data_##n, \
867
- &spi_cdns_cfg_##n, POST_KERNEL, CONFIG_SPI_INIT_PRIORITY, \
868
- &spi_cdns_api); \
827
+ SPI_DEVICE_DT_INST_DEFINE(n, spi_cdns_init, NULL, &spi_cdns_data_##n, &spi_cdns_cfg_##n, \
828
+ POST_KERNEL, CONFIG_SPI_INIT_PRIORITY, &spi_cdns_api); \
869
829
static void spi_cdns_irq_config_##n(void) \
870
830
{ \
871
831
IRQ_CONNECT(DT_INST_IRQN(n), DT_INST_IRQ(n, priority), spi_cdns_isr, \
0 commit comments