.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
---|
1 | 2 | /* |
---|
2 | 3 | * Maxim Integrated MAX2175 RF to Bits tuner driver |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * |
---|
7 | 8 | * Copyright (C) 2016 Maxim Integrated Products |
---|
8 | 9 | * Copyright (C) 2017 Renesas Electronics Corporation |
---|
9 | | - * |
---|
10 | | - * This program is free software; you can redistribute it and/or modify |
---|
11 | | - * it under the terms of the GNU General Public License version 2 |
---|
12 | | - * as published by the Free Software Foundation. |
---|
13 | | - * |
---|
14 | | - * This program is distributed in the hope that it will be useful, |
---|
15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | | - * GNU General Public License for more details. |
---|
18 | 10 | */ |
---|
19 | 11 | |
---|
20 | 12 | #include <linux/clk.h> |
---|
.. | .. |
---|
599 | 591 | lo_freq *= lo_mult; |
---|
600 | 592 | |
---|
601 | 593 | int_desired = lo_freq / ctx->xtal_freq; |
---|
602 | | - frac_desired = div_u64((u64)(lo_freq % ctx->xtal_freq) << 20, |
---|
603 | | - ctx->xtal_freq); |
---|
| 594 | + frac_desired = div64_ul((u64)(lo_freq % ctx->xtal_freq) << 20, |
---|
| 595 | + ctx->xtal_freq); |
---|
604 | 596 | |
---|
605 | 597 | /* Check CSM is not busy */ |
---|
606 | 598 | ret = max2175_poll_csm_ready(ctx); |
---|
.. | .. |
---|
1165 | 1157 | if (vt->index > 0) |
---|
1166 | 1158 | return -EINVAL; |
---|
1167 | 1159 | |
---|
1168 | | - strlcpy(vt->name, "RF", sizeof(vt->name)); |
---|
| 1160 | + strscpy(vt->name, "RF", sizeof(vt->name)); |
---|
1169 | 1161 | vt->type = V4L2_TUNER_RF; |
---|
1170 | 1162 | vt->capability = V4L2_TUNER_CAP_1HZ | V4L2_TUNER_CAP_FREQ_BANDS; |
---|
1171 | 1163 | vt->rangelow = ctx->bands_rf->rangelow; |
---|
.. | .. |
---|
1202 | 1194 | |
---|
1203 | 1195 | /* |
---|
1204 | 1196 | * I2S output enable/disable configuration. This is a private control. |
---|
1205 | | - * Refer to Documentation/media/v4l-drivers/max2175.rst for more details. |
---|
| 1197 | + * Refer to Documentation/userspace-api/media/drivers/max2175.rst for more details. |
---|
1206 | 1198 | */ |
---|
1207 | 1199 | static const struct v4l2_ctrl_config max2175_i2s_en = { |
---|
1208 | 1200 | .ops = &max2175_ctrl_ops, |
---|
.. | .. |
---|
1218 | 1210 | |
---|
1219 | 1211 | /* |
---|
1220 | 1212 | * HSLS value control LO freq adjacent location configuration. |
---|
1221 | | - * Refer to Documentation/media/v4l-drivers/max2175.rst for more details. |
---|
| 1213 | + * Refer to Documentation/userspace-api/media/drivers/max2175.rst for more details. |
---|
1222 | 1214 | */ |
---|
1223 | 1215 | static const struct v4l2_ctrl_config max2175_hsls = { |
---|
1224 | 1216 | .ops = &max2175_ctrl_ops, |
---|
.. | .. |
---|
1234 | 1226 | /* |
---|
1235 | 1227 | * Rx modes below are a set of preset configurations that decides the tuner's |
---|
1236 | 1228 | * sck and sample rate of transmission. They are separate for EU & NA regions. |
---|
1237 | | - * Refer to Documentation/media/v4l-drivers/max2175.rst for more details. |
---|
| 1229 | + * Refer to Documentation/userspace-api/media/drivers/max2175.rst for more details. |
---|
1238 | 1230 | */ |
---|
1239 | 1231 | static const char * const max2175_ctrl_eu_rx_modes[] = { |
---|
1240 | 1232 | [MAX2175_EU_FM_1_2] = "EU FM 1.2", |
---|
.. | .. |
---|
1279 | 1271 | return 0; |
---|
1280 | 1272 | } |
---|
1281 | 1273 | |
---|
1282 | | -static int max2175_probe(struct i2c_client *client, |
---|
1283 | | - const struct i2c_device_id *id) |
---|
| 1274 | +static int max2175_probe(struct i2c_client *client) |
---|
1284 | 1275 | { |
---|
1285 | 1276 | bool master = true, am_hiz = false; |
---|
1286 | 1277 | u32 refout_load, refout_bits = 0; /* REFOUT disabled */ |
---|
.. | .. |
---|
1441 | 1432 | .name = DRIVER_NAME, |
---|
1442 | 1433 | .of_match_table = max2175_of_ids, |
---|
1443 | 1434 | }, |
---|
1444 | | - .probe = max2175_probe, |
---|
| 1435 | + .probe_new = max2175_probe, |
---|
1445 | 1436 | .remove = max2175_remove, |
---|
1446 | 1437 | .id_table = max2175_id, |
---|
1447 | 1438 | }; |
---|