forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/i2c/s5k6aa.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Driver for Samsung S5K6AAFX SXGA 1/6" 1.3M CMOS Image Sensor
34 * with embedded SoC ISP.
....@@ -7,11 +8,6 @@
78 *
89 * Based on a driver authored by Dongsoo Nathaniel Kim.
910 * Copyright (C) 2009, Dongsoo Nathaniel Kim <dongsoo45.kim@samsung.com>
10
- *
11
- * This program is free software; you can redistribute it and/or modify
12
- * it under the terms of the GNU General Public License as published by
13
- * the Free Software Foundation; either version 2 of the License, or
14
- * (at your option) any later version.
1511 */
1612
1713 #include <linux/clk.h>
....@@ -688,7 +684,7 @@
688684 * but there is nothing indicating how to switch between both
689685 * in the datasheet. For now default BT.601 interface is assumed.
690686 */
691
- if (bus_type == V4L2_MBUS_CSI2)
687
+ if (bus_type == V4L2_MBUS_CSI2_DPHY)
692688 cfg = nlanes;
693689 else if (bus_type != V4L2_MBUS_PARALLEL)
694690 return -EINVAL;
....@@ -729,7 +725,7 @@
729725 * @s5k6aa: pointer to &struct s5k6aa describing the device
730726 * @preset: s5kaa preset to be applied
731727 *
732
- * Configure output resolution and color fromat, pixel clock
728
+ * Configure output resolution and color format, pixel clock
733729 * frequency range, device frame rate type and frame period range.
734730 */
735731 static int s5k6aa_set_prev_config(struct s5k6aa *s5k6aa,
....@@ -1576,7 +1572,8 @@
15761572
15771573 sd = &s5k6aa->sd;
15781574 v4l2_i2c_subdev_init(sd, client, &s5k6aa_subdev_ops);
1579
- strlcpy(sd->name, DRIVER_NAME, sizeof(sd->name));
1575
+ /* Static name; NEVER use in new drivers! */
1576
+ strscpy(sd->name, DRIVER_NAME, sizeof(sd->name));
15801577
15811578 sd->internal_ops = &s5k6aa_subdev_internal_ops;
15821579 sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;