@@ -50,8 +50,7 @@ static inline unsigned int video_pix_fmt_bpp(uint32_t pixelformat)
5050 }
5151}
5252
53- static void __frame_done_cb (CSI_Type * base , csi_handle_t * handle ,
54- status_t status , void * user_data )
53+ static void __frame_done_cb (CSI_Type * base , csi_handle_t * handle , status_t status , void * user_data )
5554{
5655 struct video_mcux_csi_data * data = user_data ;
5756 const struct device * dev = data -> dev ;
@@ -66,8 +65,7 @@ static void __frame_done_cb(CSI_Type *base, csi_handle_t *handle,
6665 return ;
6766 }
6867
69- status = CSI_TransferGetFullBuffer (config -> base , & (data -> csi_handle ),
70- & buffer_addr );
68+ status = CSI_TransferGetFullBuffer (config -> base , & (data -> csi_handle ), & buffer_addr );
7169 if (status != kStatus_Success ) {
7270 result = VIDEO_BUF_ERROR ;
7371 goto done ;
@@ -116,8 +114,7 @@ static void __frame_done_cb(CSI_Type *base, csi_handle_t *handle,
116114 return ;
117115}
118116
119- static int video_mcux_csi_set_fmt (const struct device * dev ,
120- enum video_endpoint_id ep ,
117+ static int video_mcux_csi_set_fmt (const struct device * dev , enum video_endpoint_id ep ,
121118 struct video_format * fmt )
122119{
123120 const struct video_mcux_csi_config * config = dev -> config ;
@@ -144,8 +141,7 @@ static int video_mcux_csi_set_fmt(const struct device *dev,
144141 return - EIO ;
145142 }
146143
147- ret = CSI_TransferCreateHandle (config -> base , & data -> csi_handle ,
148- __frame_done_cb , data );
144+ ret = CSI_TransferCreateHandle (config -> base , & data -> csi_handle , __frame_done_cb , data );
149145 if (ret != kStatus_Success ) {
150146 return - EIO ;
151147 }
@@ -157,8 +153,7 @@ static int video_mcux_csi_set_fmt(const struct device *dev,
157153 return 0 ;
158154}
159155
160- static int video_mcux_csi_get_fmt (const struct device * dev ,
161- enum video_endpoint_id ep ,
156+ static int video_mcux_csi_get_fmt (const struct device * dev , enum video_endpoint_id ep ,
162157 struct video_format * fmt )
163158{
164159 struct video_mcux_csi_data * data = dev -> data ;
@@ -173,7 +168,6 @@ static int video_mcux_csi_get_fmt(const struct device *dev,
173168 return video_mcux_csi_set_fmt (dev , ep , fmt );
174169 }
175170
176-
177171 fmt -> pixelformat = data -> pixelformat ;
178172 fmt -> height = data -> csi_config .height ;
179173 fmt -> width = data -> csi_config .width ;
@@ -218,10 +212,7 @@ static int video_mcux_csi_stream_stop(const struct device *dev)
218212 return 0 ;
219213}
220214
221-
222- static int video_mcux_csi_flush (const struct device * dev ,
223- enum video_endpoint_id ep ,
224- bool cancel )
215+ static int video_mcux_csi_flush (const struct device * dev , enum video_endpoint_id ep , bool cancel )
225216{
226217 const struct video_mcux_csi_config * config = dev -> config ;
227218 struct video_mcux_csi_data * data = dev -> data ;
@@ -237,25 +228,22 @@ static int video_mcux_csi_flush(const struct device *dev,
237228 } else {
238229 /* Flush driver output queue */
239230 do {
240- ret = CSI_TransferGetFullBuffer (config -> base ,
241- & (data -> csi_handle ),
231+ ret = CSI_TransferGetFullBuffer (config -> base , & (data -> csi_handle ),
242232 & buffer_addr );
243233 } while (ret == kStatus_Success );
244234
245235 while ((vbuf = k_fifo_get (& data -> fifo_in , K_NO_WAIT ))) {
246236 k_fifo_put (& data -> fifo_out , vbuf );
247237 if (IS_ENABLED (CONFIG_POLL ) && data -> signal ) {
248- k_poll_signal_raise (data -> signal ,
249- VIDEO_BUF_ABORTED );
238+ k_poll_signal_raise (data -> signal , VIDEO_BUF_ABORTED );
250239 }
251240 }
252241 }
253242
254243 return 0 ;
255244}
256245
257- static int video_mcux_csi_enqueue (const struct device * dev ,
258- enum video_endpoint_id ep ,
246+ static int video_mcux_csi_enqueue (const struct device * dev , enum video_endpoint_id ep ,
259247 struct video_buffer * vbuf )
260248{
261249 const struct video_mcux_csi_config * config = dev -> config ;
@@ -281,10 +269,8 @@ static int video_mcux_csi_enqueue(const struct device *dev,
281269 return 0 ;
282270}
283271
284- static int video_mcux_csi_dequeue (const struct device * dev ,
285- enum video_endpoint_id ep ,
286- struct video_buffer * * vbuf ,
287- k_timeout_t timeout )
272+ static int video_mcux_csi_dequeue (const struct device * dev , enum video_endpoint_id ep ,
273+ struct video_buffer * * vbuf , k_timeout_t timeout )
288274{
289275 struct video_mcux_csi_data * data = dev -> data ;
290276
@@ -300,9 +286,7 @@ static int video_mcux_csi_dequeue(const struct device *dev,
300286 return 0 ;
301287}
302288
303- static inline int video_mcux_csi_set_ctrl (const struct device * dev ,
304- unsigned int cid ,
305- void * value )
289+ static inline int video_mcux_csi_set_ctrl (const struct device * dev , unsigned int cid , void * value )
306290{
307291 const struct video_mcux_csi_config * config = dev -> config ;
308292 int ret = - ENOTSUP ;
@@ -315,9 +299,7 @@ static inline int video_mcux_csi_set_ctrl(const struct device *dev,
315299 return ret ;
316300}
317301
318- static inline int video_mcux_csi_get_ctrl (const struct device * dev ,
319- unsigned int cid ,
320- void * value )
302+ static inline int video_mcux_csi_get_ctrl (const struct device * dev , unsigned int cid , void * value )
321303{
322304 const struct video_mcux_csi_config * config = dev -> config ;
323305 int ret = - ENOTSUP ;
@@ -330,8 +312,7 @@ static inline int video_mcux_csi_get_ctrl(const struct device *dev,
330312 return ret ;
331313}
332314
333- static int video_mcux_csi_get_caps (const struct device * dev ,
334- enum video_endpoint_id ep ,
315+ static int video_mcux_csi_get_caps (const struct device * dev , enum video_endpoint_id ep ,
335316 struct video_caps * caps )
336317{
337318 const struct video_mcux_csi_config * config = dev -> config ;
@@ -387,8 +368,7 @@ static int video_mcux_csi_init(const struct device *dev)
387368}
388369
389370#ifdef CONFIG_POLL
390- static int video_mcux_csi_set_signal (const struct device * dev ,
391- enum video_endpoint_id ep ,
371+ static int video_mcux_csi_set_signal (const struct device * dev , enum video_endpoint_id ep ,
392372 struct k_poll_signal * signal )
393373{
394374 struct video_mcux_csi_data * data = dev -> data ;
@@ -434,8 +414,7 @@ static int video_mcux_csi_init_0(const struct device *dev)
434414{
435415 struct video_mcux_csi_data * data = dev -> data ;
436416
437- IRQ_CONNECT (DT_INST_IRQN (0 ), DT_INST_IRQ (0 , priority ),
438- video_mcux_csi_isr , NULL , 0 );
417+ IRQ_CONNECT (DT_INST_IRQN (0 ), DT_INST_IRQ (0 , priority ), video_mcux_csi_isr , NULL , 0 );
439418
440419 irq_enable (DT_INST_IRQN (0 ));
441420
@@ -449,9 +428,7 @@ static int video_mcux_csi_init_0(const struct device *dev)
449428 * necessary since the clock to the camera is provided by the
450429 * CSI peripheral.
451430 */
452- DEVICE_DT_INST_DEFINE (0 , & video_mcux_csi_init_0 ,
453- NULL , & video_mcux_csi_data_0 ,
454- & video_mcux_csi_config_0 ,
455- POST_KERNEL , CONFIG_VIDEO_MCUX_CSI_INIT_PRIORITY ,
456- & video_mcux_csi_driver_api );
431+ DEVICE_DT_INST_DEFINE (0 , & video_mcux_csi_init_0 , NULL , & video_mcux_csi_data_0 ,
432+ & video_mcux_csi_config_0 , POST_KERNEL , CONFIG_VIDEO_MCUX_CSI_INIT_PRIORITY ,
433+ & video_mcux_csi_driver_api );
457434#endif
0 commit comments