| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for Samsung S5K5BAF UXGA 1/5" 2M CMOS Image Sensor |
|---|
| 3 | 4 | * with embedded SoC ISP. |
|---|
| .. | .. |
|---|
| 7 | 8 | * |
|---|
| 8 | 9 | * Based on S5K6AA driver authored by Sylwester Nawrocki |
|---|
| 9 | 10 | * Copyright (C) 2013, Samsung Electronics Co., Ltd. |
|---|
| 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 version 2 as |
|---|
| 13 | | - * published by the Free Software Foundation. |
|---|
| 14 | 11 | */ |
|---|
| 15 | 12 | |
|---|
| 16 | 13 | #include <linux/clk.h> |
|---|
| .. | .. |
|---|
| 283 | 280 | struct { |
|---|
| 284 | 281 | u16 id; |
|---|
| 285 | 282 | u16 offset; |
|---|
| 286 | | - } seq[0]; |
|---|
| 287 | | - u16 data[0]; |
|---|
| 283 | + } seq[]; |
|---|
| 288 | 284 | }; |
|---|
| 289 | 285 | |
|---|
| 290 | 286 | struct s5k5baf { |
|---|
| .. | .. |
|---|
| 566 | 562 | if (fw == NULL) |
|---|
| 567 | 563 | return NULL; |
|---|
| 568 | 564 | |
|---|
| 569 | | - data = fw->data + 2 * fw->count; |
|---|
| 565 | + data = &fw->seq[0].id + 2 * fw->count; |
|---|
| 570 | 566 | |
|---|
| 571 | 567 | for (i = 0; i < fw->count; ++i) { |
|---|
| 572 | 568 | if (fw->seq[i].id == seq_id) |
|---|
| .. | .. |
|---|
| 766 | 762 | { |
|---|
| 767 | 763 | u16 en_pkts; |
|---|
| 768 | 764 | |
|---|
| 769 | | - if (state->bus_type == V4L2_MBUS_CSI2) |
|---|
| 765 | + if (state->bus_type == V4L2_MBUS_CSI2_DPHY) |
|---|
| 770 | 766 | en_pkts = EN_PACKETS_CSI2; |
|---|
| 771 | 767 | else |
|---|
| 772 | 768 | en_pkts = 0; |
|---|
| .. | .. |
|---|
| 1841 | 1837 | { |
|---|
| 1842 | 1838 | struct device_node *node = dev->of_node; |
|---|
| 1843 | 1839 | struct device_node *node_ep; |
|---|
| 1844 | | - struct v4l2_fwnode_endpoint ep; |
|---|
| 1840 | + struct v4l2_fwnode_endpoint ep = { .bus_type = 0 }; |
|---|
| 1845 | 1841 | int ret; |
|---|
| 1846 | 1842 | |
|---|
| 1847 | 1843 | if (!node) { |
|---|
| .. | .. |
|---|
| 1875 | 1871 | state->bus_type = ep.bus_type; |
|---|
| 1876 | 1872 | |
|---|
| 1877 | 1873 | switch (state->bus_type) { |
|---|
| 1878 | | - case V4L2_MBUS_CSI2: |
|---|
| 1874 | + case V4L2_MBUS_CSI2_DPHY: |
|---|
| 1879 | 1875 | state->nlanes = ep.bus.mipi_csi2.num_data_lanes; |
|---|
| 1880 | 1876 | break; |
|---|
| 1881 | 1877 | case V4L2_MBUS_PARALLEL: |
|---|
| .. | .. |
|---|
| 1949 | 1945 | return ret; |
|---|
| 1950 | 1946 | } |
|---|
| 1951 | 1947 | |
|---|
| 1952 | | -static int s5k5baf_probe(struct i2c_client *c, |
|---|
| 1953 | | - const struct i2c_device_id *id) |
|---|
| 1948 | +static int s5k5baf_probe(struct i2c_client *c) |
|---|
| 1954 | 1949 | { |
|---|
| 1955 | 1950 | struct s5k5baf *state; |
|---|
| 1956 | 1951 | int ret; |
|---|
| .. | .. |
|---|
| 2049 | 2044 | .of_match_table = s5k5baf_of_match, |
|---|
| 2050 | 2045 | .name = S5K5BAF_DRIVER_NAME |
|---|
| 2051 | 2046 | }, |
|---|
| 2052 | | - .probe = s5k5baf_probe, |
|---|
| 2047 | + .probe_new = s5k5baf_probe, |
|---|
| 2053 | 2048 | .remove = s5k5baf_remove, |
|---|
| 2054 | 2049 | .id_table = s5k5baf_id, |
|---|
| 2055 | 2050 | }; |
|---|