Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / drivers / media / platform / video-mux.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * video stream multiplexer controlled via mux control
4  *
5  * Copyright (C) 2013 Pengutronix, Sascha Hauer <kernel@pengutronix.de>
6  * Copyright (C) 2016-2017 Pengutronix, Philipp Zabel <kernel@pengutronix.de>
7  */
8
9 #include <linux/err.h>
10 #include <linux/module.h>
11 #include <linux/mutex.h>
12 #include <linux/mux/consumer.h>
13 #include <linux/of.h>
14 #include <linux/of_graph.h>
15 #include <linux/platform_device.h>
16 #include <linux/slab.h>
17 #include <media/v4l2-async.h>
18 #include <media/v4l2-device.h>
19 #include <media/v4l2-fwnode.h>
20 #include <media/v4l2-mc.h>
21 #include <media/v4l2-subdev.h>
22
23 struct video_mux_asd {
24         struct v4l2_async_subdev base;
25         unsigned int port;
26 };
27
28 static inline struct video_mux_asd *to_video_mux_asd(struct v4l2_async_subdev *asd)
29 {
30         return container_of(asd, struct video_mux_asd, base);
31 }
32
33 struct video_mux_pad_cfg {
34         unsigned int num_lanes;
35         bool non_continuous;
36         struct v4l2_subdev *source;
37 };
38
39 struct video_mux {
40         struct v4l2_subdev subdev;
41         struct v4l2_async_notifier notifier;
42         struct media_pad *pads;
43         struct v4l2_mbus_framefmt *format_mbus;
44         struct video_mux_pad_cfg *cfg;
45         struct mux_control *mux;
46         struct mutex lock;
47         int active;
48 };
49
50 static const struct v4l2_mbus_framefmt video_mux_format_mbus_default = {
51         .width = 1,
52         .height = 1,
53         .code = MEDIA_BUS_FMT_Y8_1X8,
54         .field = V4L2_FIELD_NONE,
55 };
56
57 static inline struct video_mux *
58 notifier_to_video_mux(struct v4l2_async_notifier *n)
59 {
60         return container_of(n, struct video_mux, notifier);
61 }
62
63 static inline struct video_mux *v4l2_subdev_to_video_mux(struct v4l2_subdev *sd)
64 {
65         return container_of(sd, struct video_mux, subdev);
66 }
67
68 static int video_mux_link_setup(struct media_entity *entity,
69                                 const struct media_pad *local,
70                                 const struct media_pad *remote, u32 flags)
71 {
72         struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
73         struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
74         u16 source_pad = entity->num_pads - 1;
75         int ret = 0;
76
77         /*
78          * The mux state is determined by the enabled sink pad link.
79          * Enabling or disabling the source pad link has no effect.
80          */
81         if (local->flags & MEDIA_PAD_FL_SOURCE)
82                 return 0;
83
84         dev_dbg(sd->dev, "link setup '%s':%d->'%s':%d[%d]",
85                 remote->entity->name, remote->index, local->entity->name,
86                 local->index, flags & MEDIA_LNK_FL_ENABLED);
87
88         mutex_lock(&vmux->lock);
89
90         if (flags & MEDIA_LNK_FL_ENABLED) {
91                 if (vmux->active == local->index)
92                         goto out;
93
94                 if (vmux->active >= 0) {
95                         ret = -EBUSY;
96                         goto out;
97                 }
98
99                 dev_dbg(sd->dev, "setting %d active\n", local->index);
100                 ret = mux_control_try_select(vmux->mux, local->index);
101                 if (ret < 0)
102                         goto out;
103                 vmux->active = local->index;
104
105                 /* Propagate the active format to the source */
106                 vmux->format_mbus[source_pad] = vmux->format_mbus[vmux->active];
107         } else {
108                 if (vmux->active != local->index)
109                         goto out;
110
111                 dev_dbg(sd->dev, "going inactive\n");
112                 mux_control_deselect(vmux->mux);
113                 vmux->active = -1;
114         }
115
116 out:
117         mutex_unlock(&vmux->lock);
118         return ret;
119 }
120
121 static const struct media_entity_operations video_mux_ops = {
122         .link_setup = video_mux_link_setup,
123         .link_validate = v4l2_subdev_link_validate,
124         .get_fwnode_pad = v4l2_subdev_get_fwnode_pad_1_to_1,
125 };
126
127 static int video_mux_s_stream(struct v4l2_subdev *sd, int enable)
128 {
129         struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
130         struct v4l2_subdev *upstream_sd;
131         struct media_pad *pad;
132
133         if (vmux->active == -1) {
134                 dev_err(sd->dev, "Can not start streaming on inactive mux\n");
135                 return -EINVAL;
136         }
137
138         pad = media_entity_remote_pad(&sd->entity.pads[vmux->active]);
139         if (!pad) {
140                 dev_err(sd->dev, "Failed to find remote source pad\n");
141                 return -ENOLINK;
142         }
143
144         if (!is_media_entity_v4l2_subdev(pad->entity)) {
145                 dev_err(sd->dev, "Upstream entity is not a v4l2 subdev\n");
146                 return -ENODEV;
147         }
148
149         upstream_sd = media_entity_to_v4l2_subdev(pad->entity);
150
151         return v4l2_subdev_call(upstream_sd, video, s_stream, enable);
152 }
153
154 static const struct v4l2_subdev_video_ops video_mux_subdev_video_ops = {
155         .s_stream = video_mux_s_stream,
156 };
157
158 static struct v4l2_mbus_framefmt *
159 __video_mux_get_pad_format(struct v4l2_subdev *sd,
160                            struct v4l2_subdev_state *sd_state,
161                            unsigned int pad, u32 which)
162 {
163         struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
164
165         switch (which) {
166         case V4L2_SUBDEV_FORMAT_TRY:
167                 return v4l2_subdev_get_try_format(sd, sd_state, pad);
168         case V4L2_SUBDEV_FORMAT_ACTIVE:
169                 return &vmux->format_mbus[pad];
170         default:
171                 return NULL;
172         }
173 }
174
175 static int video_mux_get_format(struct v4l2_subdev *sd,
176                             struct v4l2_subdev_state *sd_state,
177                             struct v4l2_subdev_format *sdformat)
178 {
179         struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
180
181         mutex_lock(&vmux->lock);
182
183         sdformat->format = *__video_mux_get_pad_format(sd, sd_state,
184                                                        sdformat->pad,
185                                                        sdformat->which);
186
187         mutex_unlock(&vmux->lock);
188
189         return 0;
190 }
191
192 static int video_mux_set_format(struct v4l2_subdev *sd,
193                             struct v4l2_subdev_state *sd_state,
194                             struct v4l2_subdev_format *sdformat)
195 {
196         struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
197         struct v4l2_mbus_framefmt *mbusformat, *source_mbusformat;
198         struct media_pad *pad = &vmux->pads[sdformat->pad];
199         u16 source_pad = sd->entity.num_pads - 1;
200
201         mbusformat = __video_mux_get_pad_format(sd, sd_state, sdformat->pad,
202                                                 sdformat->which);
203         if (!mbusformat)
204                 return -EINVAL;
205
206         source_mbusformat = __video_mux_get_pad_format(sd, sd_state,
207                                                        source_pad,
208                                                        sdformat->which);
209         if (!source_mbusformat)
210                 return -EINVAL;
211
212         /* No size limitations except V4L2 compliance requirements */
213         v4l_bound_align_image(&sdformat->format.width, 1, 65536, 0,
214                               &sdformat->format.height, 1, 65536, 0, 0);
215
216         /* All formats except LVDS and vendor specific formats are acceptable */
217         switch (sdformat->format.code) {
218         case MEDIA_BUS_FMT_RGB444_1X12:
219         case MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE:
220         case MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE:
221         case MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE:
222         case MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE:
223         case MEDIA_BUS_FMT_RGB565_1X16:
224         case MEDIA_BUS_FMT_BGR565_2X8_BE:
225         case MEDIA_BUS_FMT_BGR565_2X8_LE:
226         case MEDIA_BUS_FMT_RGB565_2X8_BE:
227         case MEDIA_BUS_FMT_RGB565_2X8_LE:
228         case MEDIA_BUS_FMT_RGB666_1X18:
229         case MEDIA_BUS_FMT_RBG888_1X24:
230         case MEDIA_BUS_FMT_RGB666_1X24_CPADHI:
231         case MEDIA_BUS_FMT_BGR888_1X24:
232         case MEDIA_BUS_FMT_GBR888_1X24:
233         case MEDIA_BUS_FMT_RGB888_1X24:
234         case MEDIA_BUS_FMT_RGB888_2X12_BE:
235         case MEDIA_BUS_FMT_RGB888_2X12_LE:
236         case MEDIA_BUS_FMT_ARGB8888_1X32:
237         case MEDIA_BUS_FMT_RGB888_1X32_PADHI:
238         case MEDIA_BUS_FMT_RGB101010_1X30:
239         case MEDIA_BUS_FMT_RGB121212_1X36:
240         case MEDIA_BUS_FMT_RGB161616_1X48:
241         case MEDIA_BUS_FMT_Y8_1X8:
242         case MEDIA_BUS_FMT_UV8_1X8:
243         case MEDIA_BUS_FMT_UYVY8_1_5X8:
244         case MEDIA_BUS_FMT_VYUY8_1_5X8:
245         case MEDIA_BUS_FMT_YUYV8_1_5X8:
246         case MEDIA_BUS_FMT_YVYU8_1_5X8:
247         case MEDIA_BUS_FMT_UYVY8_2X8:
248         case MEDIA_BUS_FMT_VYUY8_2X8:
249         case MEDIA_BUS_FMT_YUYV8_2X8:
250         case MEDIA_BUS_FMT_YVYU8_2X8:
251         case MEDIA_BUS_FMT_Y10_1X10:
252         case MEDIA_BUS_FMT_UYVY10_2X10:
253         case MEDIA_BUS_FMT_VYUY10_2X10:
254         case MEDIA_BUS_FMT_YUYV10_2X10:
255         case MEDIA_BUS_FMT_YVYU10_2X10:
256         case MEDIA_BUS_FMT_Y12_1X12:
257         case MEDIA_BUS_FMT_UYVY12_2X12:
258         case MEDIA_BUS_FMT_VYUY12_2X12:
259         case MEDIA_BUS_FMT_YUYV12_2X12:
260         case MEDIA_BUS_FMT_YVYU12_2X12:
261         case MEDIA_BUS_FMT_UYVY8_1X16:
262         case MEDIA_BUS_FMT_VYUY8_1X16:
263         case MEDIA_BUS_FMT_YUYV8_1X16:
264         case MEDIA_BUS_FMT_YVYU8_1X16:
265         case MEDIA_BUS_FMT_YDYUYDYV8_1X16:
266         case MEDIA_BUS_FMT_UYVY10_1X20:
267         case MEDIA_BUS_FMT_VYUY10_1X20:
268         case MEDIA_BUS_FMT_YUYV10_1X20:
269         case MEDIA_BUS_FMT_YVYU10_1X20:
270         case MEDIA_BUS_FMT_VUY8_1X24:
271         case MEDIA_BUS_FMT_YUV8_1X24:
272         case MEDIA_BUS_FMT_UYYVYY8_0_5X24:
273         case MEDIA_BUS_FMT_UYVY12_1X24:
274         case MEDIA_BUS_FMT_VYUY12_1X24:
275         case MEDIA_BUS_FMT_YUYV12_1X24:
276         case MEDIA_BUS_FMT_YVYU12_1X24:
277         case MEDIA_BUS_FMT_YUV10_1X30:
278         case MEDIA_BUS_FMT_UYYVYY10_0_5X30:
279         case MEDIA_BUS_FMT_AYUV8_1X32:
280         case MEDIA_BUS_FMT_UYYVYY12_0_5X36:
281         case MEDIA_BUS_FMT_YUV12_1X36:
282         case MEDIA_BUS_FMT_YUV16_1X48:
283         case MEDIA_BUS_FMT_UYYVYY16_0_5X48:
284         case MEDIA_BUS_FMT_JPEG_1X8:
285         case MEDIA_BUS_FMT_AHSV8888_1X32:
286         case MEDIA_BUS_FMT_SBGGR8_1X8:
287         case MEDIA_BUS_FMT_SGBRG8_1X8:
288         case MEDIA_BUS_FMT_SGRBG8_1X8:
289         case MEDIA_BUS_FMT_SRGGB8_1X8:
290         case MEDIA_BUS_FMT_SBGGR10_1X10:
291         case MEDIA_BUS_FMT_SGBRG10_1X10:
292         case MEDIA_BUS_FMT_SGRBG10_1X10:
293         case MEDIA_BUS_FMT_SRGGB10_1X10:
294         case MEDIA_BUS_FMT_SBGGR12_1X12:
295         case MEDIA_BUS_FMT_SGBRG12_1X12:
296         case MEDIA_BUS_FMT_SGRBG12_1X12:
297         case MEDIA_BUS_FMT_SRGGB12_1X12:
298         case MEDIA_BUS_FMT_SBGGR14_1X14:
299         case MEDIA_BUS_FMT_SGBRG14_1X14:
300         case MEDIA_BUS_FMT_SGRBG14_1X14:
301         case MEDIA_BUS_FMT_SRGGB14_1X14:
302         case MEDIA_BUS_FMT_SBGGR16_1X16:
303         case MEDIA_BUS_FMT_SGBRG16_1X16:
304         case MEDIA_BUS_FMT_SGRBG16_1X16:
305         case MEDIA_BUS_FMT_SRGGB16_1X16:
306                 break;
307         default:
308                 sdformat->format.code = MEDIA_BUS_FMT_Y8_1X8;
309                 break;
310         }
311         if (sdformat->format.field == V4L2_FIELD_ANY)
312                 sdformat->format.field = V4L2_FIELD_NONE;
313
314         mutex_lock(&vmux->lock);
315
316         /* Source pad mirrors active sink pad, no limitations on sink pads */
317         if ((pad->flags & MEDIA_PAD_FL_SOURCE) && vmux->active >= 0)
318                 sdformat->format = vmux->format_mbus[vmux->active];
319
320         *mbusformat = sdformat->format;
321
322         /* Propagate the format from an active sink to source */
323         if ((pad->flags & MEDIA_PAD_FL_SINK) && (pad->index == vmux->active))
324                 *source_mbusformat = sdformat->format;
325
326         mutex_unlock(&vmux->lock);
327
328         return 0;
329 }
330
331 static int video_mux_init_cfg(struct v4l2_subdev *sd,
332                               struct v4l2_subdev_state *sd_state)
333 {
334         struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
335         struct v4l2_mbus_framefmt *mbusformat;
336         unsigned int i;
337
338         mutex_lock(&vmux->lock);
339
340         for (i = 0; i < sd->entity.num_pads; i++) {
341                 mbusformat = v4l2_subdev_get_try_format(sd, sd_state, i);
342                 *mbusformat = video_mux_format_mbus_default;
343         }
344
345         mutex_unlock(&vmux->lock);
346
347         return 0;
348 }
349
350 static int video_mux_get_mbus_config(struct v4l2_subdev *sd,
351                                      unsigned int pad,
352                                      struct v4l2_mbus_config *cfg)
353 {
354         struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
355         const u32 mask = V4L2_MBUS_CSI2_LANE_MASK;
356         int ret;
357
358         ret = v4l2_subdev_call(vmux->cfg[vmux->active].source, pad, get_mbus_config,
359                                0, cfg);
360
361         if (ret != -ENOIOCTLCMD)
362                 return ret;
363
364         cfg->type = V4L2_MBUS_CSI2_DPHY;
365         cfg->flags = (vmux->cfg[vmux->active].num_lanes << __ffs(mask)) & mask;
366
367         /* Support for non-continuous CSI-2 clock is missing in pdate mode */
368         if (vmux->cfg[vmux->active].non_continuous)
369                 cfg->flags |= V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK;
370         else
371                 cfg->flags |= V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
372
373         return 0;
374 };
375
376 static const struct v4l2_subdev_pad_ops video_mux_pad_ops = {
377         .init_cfg = video_mux_init_cfg,
378         .get_fmt = video_mux_get_format,
379         .set_fmt = video_mux_set_format,
380         .get_mbus_config = video_mux_get_mbus_config,
381 };
382
383 static const struct v4l2_subdev_ops video_mux_subdev_ops = {
384         .pad = &video_mux_pad_ops,
385         .video = &video_mux_subdev_video_ops,
386 };
387
388 static int video_mux_notify_bound(struct v4l2_async_notifier *notifier,
389                                   struct v4l2_subdev *sd,
390                                   struct v4l2_async_subdev *asd)
391 {
392         struct video_mux *vmux = notifier_to_video_mux(notifier);
393         unsigned int port = to_video_mux_asd(asd)->port;
394
395         vmux->cfg[port].source = sd;
396
397         return v4l2_create_fwnode_links(sd, &vmux->subdev);
398 }
399
400 static const struct v4l2_async_notifier_operations video_mux_notify_ops = {
401         .bound = video_mux_notify_bound,
402 };
403
404 static int video_mux_async_register(struct video_mux *vmux,
405                                     unsigned int num_input_pads)
406 {
407         unsigned int i;
408         int ret;
409
410         v4l2_async_notifier_init(&vmux->notifier);
411
412         for (i = 0; i < num_input_pads; i++) {
413                 struct video_mux_asd *asd;
414                 struct fwnode_handle *ep, *remote_ep;
415
416                 ep = fwnode_graph_get_endpoint_by_id(
417                         dev_fwnode(vmux->subdev.dev), i, 0,
418                         FWNODE_GRAPH_ENDPOINT_NEXT);
419                 if (!ep)
420                         continue;
421
422                 /* Skip dangling endpoints for backwards compatibility */
423                 remote_ep = fwnode_graph_get_remote_endpoint(ep);
424                 if (!remote_ep) {
425                         fwnode_handle_put(ep);
426                         continue;
427                 }
428                 fwnode_handle_put(remote_ep);
429
430                 asd = v4l2_async_notifier_add_fwnode_remote_subdev(
431                         &vmux->notifier, ep, struct video_mux_asd);
432                 asd->port = i;
433
434                 fwnode_handle_put(ep);
435
436                 if (IS_ERR(asd)) {
437                         ret = PTR_ERR(asd);
438                         /* OK if asd already exists */
439                         if (ret != -EEXIST)
440                                 return ret;
441                 }
442         }
443
444         vmux->notifier.ops = &video_mux_notify_ops;
445
446         ret = v4l2_async_subdev_notifier_register(&vmux->subdev,
447                                                   &vmux->notifier);
448         if (ret)
449                 return ret;
450
451         return v4l2_async_register_subdev(&vmux->subdev);
452 }
453
454 static int video_mux_probe(struct platform_device *pdev)
455 {
456         struct device_node *np = pdev->dev.of_node;
457         struct device *dev = &pdev->dev;
458         struct v4l2_fwnode_endpoint fwnode_ep = {
459                 .bus_type = V4L2_MBUS_CSI2_DPHY
460         };
461         struct device_node *ep;
462         struct video_mux *vmux;
463         unsigned int num_pads = 0;
464         unsigned int i;
465         int ret;
466
467         vmux = devm_kzalloc(dev, sizeof(*vmux), GFP_KERNEL);
468         if (!vmux)
469                 return -ENOMEM;
470
471         platform_set_drvdata(pdev, vmux);
472
473         v4l2_subdev_init(&vmux->subdev, &video_mux_subdev_ops);
474         snprintf(vmux->subdev.name, sizeof(vmux->subdev.name), "%pOFn", np);
475         vmux->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
476         vmux->subdev.dev = dev;
477
478         /*
479          * The largest numbered port is the output port. It determines
480          * total number of pads.
481          */
482         for_each_endpoint_of_node(np, ep) {
483                 struct of_endpoint endpoint;
484
485                 of_graph_parse_endpoint(ep, &endpoint);
486                 num_pads = max(num_pads, endpoint.port + 1);
487         }
488
489         if (num_pads < 2) {
490                 dev_err(dev, "Not enough ports %d\n", num_pads);
491                 return -EINVAL;
492         }
493
494         vmux->mux = devm_mux_control_get(dev, NULL);
495         if (IS_ERR(vmux->mux)) {
496                 ret = PTR_ERR(vmux->mux);
497                 if (ret != -EPROBE_DEFER)
498                         dev_err(dev, "Failed to get mux: %d\n", ret);
499                 return ret;
500         }
501
502         mutex_init(&vmux->lock);
503         vmux->active = -1;
504         vmux->pads = devm_kcalloc(dev, num_pads, sizeof(*vmux->pads),
505                                   GFP_KERNEL);
506         if (!vmux->pads)
507                 return -ENOMEM;
508
509         vmux->format_mbus = devm_kcalloc(dev, num_pads,
510                                          sizeof(*vmux->format_mbus),
511                                          GFP_KERNEL);
512         if (!vmux->format_mbus)
513                 return -ENOMEM;
514
515         vmux->cfg = devm_kcalloc(dev, num_pads, sizeof(*vmux->cfg), GFP_KERNEL);
516         if (!vmux->cfg)
517                 return -ENOMEM;
518
519         for (i = 0; i < num_pads; i++) {
520                 vmux->pads[i].flags = (i < num_pads - 1) ? MEDIA_PAD_FL_SINK
521                                                          : MEDIA_PAD_FL_SOURCE;
522                 vmux->format_mbus[i] = video_mux_format_mbus_default;
523
524                 ep = of_graph_get_endpoint_by_regs(pdev->dev.of_node, i, 0);
525                 if (ep) {
526                         ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep), &fwnode_ep);
527                         if (!ret) {
528                                 /* Get number of data lanes */
529                                 vmux->cfg[i].num_lanes = fwnode_ep.bus.mipi_csi2.num_data_lanes;
530                                 vmux->cfg[i].non_continuous = fwnode_ep.bus.mipi_csi2.flags &
531                                                         V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK;
532                         }
533                         of_node_put(ep);
534                 }
535         }
536
537         vmux->subdev.entity.function = MEDIA_ENT_F_VID_MUX;
538         ret = media_entity_pads_init(&vmux->subdev.entity, num_pads,
539                                      vmux->pads);
540         if (ret < 0)
541                 return ret;
542
543         vmux->subdev.entity.ops = &video_mux_ops;
544
545         ret = video_mux_async_register(vmux, num_pads - 1);
546         if (ret) {
547                 v4l2_async_notifier_unregister(&vmux->notifier);
548                 v4l2_async_notifier_cleanup(&vmux->notifier);
549         }
550
551         return ret;
552 }
553
554 static int video_mux_remove(struct platform_device *pdev)
555 {
556         struct video_mux *vmux = platform_get_drvdata(pdev);
557         struct v4l2_subdev *sd = &vmux->subdev;
558
559         v4l2_async_notifier_unregister(&vmux->notifier);
560         v4l2_async_notifier_cleanup(&vmux->notifier);
561         v4l2_async_unregister_subdev(sd);
562         media_entity_cleanup(&sd->entity);
563
564         return 0;
565 }
566
567 static const struct of_device_id video_mux_dt_ids[] = {
568         { .compatible = "video-mux", },
569         { /* sentinel */ }
570 };
571 MODULE_DEVICE_TABLE(of, video_mux_dt_ids);
572
573 static struct platform_driver video_mux_driver = {
574         .probe          = video_mux_probe,
575         .remove         = video_mux_remove,
576         .driver         = {
577                 .of_match_table = video_mux_dt_ids,
578                 .name = "video-mux",
579         },
580 };
581
582 module_platform_driver(video_mux_driver);
583
584 MODULE_DESCRIPTION("video stream multiplexer");
585 MODULE_AUTHOR("Sascha Hauer, Pengutronix");
586 MODULE_AUTHOR("Philipp Zabel, Pengutronix");
587 MODULE_LICENSE("GPL");