Thomas Gleixner | 1621633 | 2019-05-19 15:51:31 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 2 | /* |
| 3 | * NXP TDA18212HN silicon tuner driver |
| 4 | * |
| 5 | * Copyright (C) 2011 Antti Palosaari <crope@iki.fi> |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 6 | */ |
| 7 | |
Joe Perches | 2b50763 | 2011-07-31 04:30:10 -0300 | [diff] [blame] | 8 | #include "tda18212.h" |
Antti Palosaari | 3b60b76 | 2014-08-04 01:00:46 -0300 | [diff] [blame] | 9 | #include <linux/regmap.h> |
Mauro Carvalho Chehab | f1baab8 | 2013-11-02 06:07:42 -0300 | [diff] [blame] | 10 | |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 11 | struct tda18212_dev { |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 12 | struct tda18212_config cfg; |
| 13 | struct i2c_client *client; |
Antti Palosaari | 3b60b76 | 2014-08-04 01:00:46 -0300 | [diff] [blame] | 14 | struct regmap *regmap; |
Antti Palosaari | 835bf82 | 2011-11-13 11:20:08 -0300 | [diff] [blame] | 15 | |
| 16 | u32 if_frequency; |
Joe Perches | 2b50763 | 2011-07-31 04:30:10 -0300 | [diff] [blame] | 17 | }; |
| 18 | |
Mauro Carvalho Chehab | 14d24d1 | 2011-12-24 12:24:33 -0300 | [diff] [blame] | 19 | static int tda18212_set_params(struct dvb_frontend *fe) |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 20 | { |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 21 | struct tda18212_dev *dev = fe->tuner_priv; |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 22 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; |
| 23 | int ret, i; |
| 24 | u32 if_khz; |
| 25 | u8 buf[9]; |
Antti Palosaari | b682ad1 | 2011-08-12 18:29:10 -0300 | [diff] [blame] | 26 | #define DVBT_6 0 |
| 27 | #define DVBT_7 1 |
| 28 | #define DVBT_8 2 |
| 29 | #define DVBT2_6 3 |
| 30 | #define DVBT2_7 4 |
| 31 | #define DVBT2_8 5 |
| 32 | #define DVBC_6 6 |
| 33 | #define DVBC_8 7 |
Mauro Carvalho Chehab | 6cff36b | 2014-03-03 16:27:38 -0300 | [diff] [blame] | 34 | #define ATSC_VSB 8 |
| 35 | #define ATSC_QAM 9 |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 36 | static const u8 bw_params[][3] = { |
Antti Palosaari | b682ad1 | 2011-08-12 18:29:10 -0300 | [diff] [blame] | 37 | /* reg: 0f 13 23 */ |
| 38 | [DVBT_6] = { 0xb3, 0x20, 0x03 }, |
| 39 | [DVBT_7] = { 0xb3, 0x31, 0x01 }, |
| 40 | [DVBT_8] = { 0xb3, 0x22, 0x01 }, |
| 41 | [DVBT2_6] = { 0xbc, 0x20, 0x03 }, |
| 42 | [DVBT2_7] = { 0xbc, 0x72, 0x03 }, |
| 43 | [DVBT2_8] = { 0xbc, 0x22, 0x01 }, |
| 44 | [DVBC_6] = { 0x92, 0x50, 0x03 }, |
| 45 | [DVBC_8] = { 0x92, 0x53, 0x03 }, |
Mauro Carvalho Chehab | 6cff36b | 2014-03-03 16:27:38 -0300 | [diff] [blame] | 46 | [ATSC_VSB] = { 0x7d, 0x20, 0x63 }, |
| 47 | [ATSC_QAM] = { 0x7d, 0x20, 0x63 }, |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 48 | }; |
| 49 | |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 50 | dev_dbg(&dev->client->dev, |
Antti Palosaari | bdb3265 | 2014-08-03 23:26:27 -0300 | [diff] [blame] | 51 | "delivery_system=%d frequency=%d bandwidth_hz=%d\n", |
| 52 | c->delivery_system, c->frequency, |
Antti Palosaari | d46ddbe | 2012-08-09 20:50:36 -0300 | [diff] [blame] | 53 | c->bandwidth_hz); |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 54 | |
| 55 | if (fe->ops.i2c_gate_ctrl) |
| 56 | fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ |
| 57 | |
| 58 | switch (c->delivery_system) { |
Mauro Carvalho Chehab | 6cff36b | 2014-03-03 16:27:38 -0300 | [diff] [blame] | 59 | case SYS_ATSC: |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 60 | if_khz = dev->cfg.if_atsc_vsb; |
Mauro Carvalho Chehab | 6cff36b | 2014-03-03 16:27:38 -0300 | [diff] [blame] | 61 | i = ATSC_VSB; |
| 62 | break; |
| 63 | case SYS_DVBC_ANNEX_B: |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 64 | if_khz = dev->cfg.if_atsc_qam; |
Mauro Carvalho Chehab | 6cff36b | 2014-03-03 16:27:38 -0300 | [diff] [blame] | 65 | i = ATSC_QAM; |
| 66 | break; |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 67 | case SYS_DVBT: |
| 68 | switch (c->bandwidth_hz) { |
| 69 | case 6000000: |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 70 | if_khz = dev->cfg.if_dvbt_6; |
Antti Palosaari | b682ad1 | 2011-08-12 18:29:10 -0300 | [diff] [blame] | 71 | i = DVBT_6; |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 72 | break; |
| 73 | case 7000000: |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 74 | if_khz = dev->cfg.if_dvbt_7; |
Antti Palosaari | b682ad1 | 2011-08-12 18:29:10 -0300 | [diff] [blame] | 75 | i = DVBT_7; |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 76 | break; |
| 77 | case 8000000: |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 78 | if_khz = dev->cfg.if_dvbt_8; |
Antti Palosaari | b682ad1 | 2011-08-12 18:29:10 -0300 | [diff] [blame] | 79 | i = DVBT_8; |
| 80 | break; |
| 81 | default: |
| 82 | ret = -EINVAL; |
| 83 | goto error; |
| 84 | } |
| 85 | break; |
| 86 | case SYS_DVBT2: |
| 87 | switch (c->bandwidth_hz) { |
| 88 | case 6000000: |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 89 | if_khz = dev->cfg.if_dvbt2_6; |
Antti Palosaari | b682ad1 | 2011-08-12 18:29:10 -0300 | [diff] [blame] | 90 | i = DVBT2_6; |
| 91 | break; |
| 92 | case 7000000: |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 93 | if_khz = dev->cfg.if_dvbt2_7; |
Antti Palosaari | b682ad1 | 2011-08-12 18:29:10 -0300 | [diff] [blame] | 94 | i = DVBT2_7; |
| 95 | break; |
| 96 | case 8000000: |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 97 | if_khz = dev->cfg.if_dvbt2_8; |
Antti Palosaari | b682ad1 | 2011-08-12 18:29:10 -0300 | [diff] [blame] | 98 | i = DVBT2_8; |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 99 | break; |
| 100 | default: |
| 101 | ret = -EINVAL; |
| 102 | goto error; |
| 103 | } |
| 104 | break; |
Mauro Carvalho Chehab | 0349471 | 2011-12-22 18:11:39 -0300 | [diff] [blame] | 105 | case SYS_DVBC_ANNEX_A: |
| 106 | case SYS_DVBC_ANNEX_C: |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 107 | if_khz = dev->cfg.if_dvbc; |
Antti Palosaari | b682ad1 | 2011-08-12 18:29:10 -0300 | [diff] [blame] | 108 | i = DVBC_8; |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 109 | break; |
| 110 | default: |
| 111 | ret = -EINVAL; |
| 112 | goto error; |
| 113 | } |
| 114 | |
Antti Palosaari | 3b60b76 | 2014-08-04 01:00:46 -0300 | [diff] [blame] | 115 | ret = regmap_write(dev->regmap, 0x23, bw_params[i][2]); |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 116 | if (ret) |
| 117 | goto error; |
| 118 | |
Antti Palosaari | 3b60b76 | 2014-08-04 01:00:46 -0300 | [diff] [blame] | 119 | ret = regmap_write(dev->regmap, 0x06, 0x00); |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 120 | if (ret) |
| 121 | goto error; |
| 122 | |
Antti Palosaari | 3b60b76 | 2014-08-04 01:00:46 -0300 | [diff] [blame] | 123 | ret = regmap_write(dev->regmap, 0x0f, bw_params[i][0]); |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 124 | if (ret) |
| 125 | goto error; |
| 126 | |
| 127 | buf[0] = 0x02; |
| 128 | buf[1] = bw_params[i][1]; |
| 129 | buf[2] = 0x03; /* default value */ |
Antti Palosaari | 8cffcc7 | 2011-11-13 11:22:58 -0300 | [diff] [blame] | 130 | buf[3] = DIV_ROUND_CLOSEST(if_khz, 50); |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 131 | buf[4] = ((c->frequency / 1000) >> 16) & 0xff; |
| 132 | buf[5] = ((c->frequency / 1000) >> 8) & 0xff; |
| 133 | buf[6] = ((c->frequency / 1000) >> 0) & 0xff; |
| 134 | buf[7] = 0xc1; |
| 135 | buf[8] = 0x01; |
Antti Palosaari | 3b60b76 | 2014-08-04 01:00:46 -0300 | [diff] [blame] | 136 | ret = regmap_bulk_write(dev->regmap, 0x12, buf, sizeof(buf)); |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 137 | if (ret) |
| 138 | goto error; |
| 139 | |
Antti Palosaari | 835bf82 | 2011-11-13 11:20:08 -0300 | [diff] [blame] | 140 | /* actual IF rounded as it is on register */ |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 141 | dev->if_frequency = buf[3] * 50 * 1000; |
Antti Palosaari | 835bf82 | 2011-11-13 11:20:08 -0300 | [diff] [blame] | 142 | |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 143 | exit: |
| 144 | if (fe->ops.i2c_gate_ctrl) |
| 145 | fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ |
| 146 | |
| 147 | return ret; |
| 148 | |
| 149 | error: |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 150 | dev_dbg(&dev->client->dev, "failed=%d\n", ret); |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 151 | goto exit; |
| 152 | } |
| 153 | |
Antti Palosaari | 835bf82 | 2011-11-13 11:20:08 -0300 | [diff] [blame] | 154 | static int tda18212_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) |
| 155 | { |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 156 | struct tda18212_dev *dev = fe->tuner_priv; |
Antti Palosaari | 835bf82 | 2011-11-13 11:20:08 -0300 | [diff] [blame] | 157 | |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 158 | *frequency = dev->if_frequency; |
Antti Palosaari | 835bf82 | 2011-11-13 11:20:08 -0300 | [diff] [blame] | 159 | |
| 160 | return 0; |
| 161 | } |
| 162 | |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 163 | static const struct dvb_tuner_ops tda18212_tuner_ops = { |
| 164 | .info = { |
Mauro Carvalho Chehab | a3f90c7 | 2018-07-05 18:59:35 -0400 | [diff] [blame] | 165 | .name = "NXP TDA18212", |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 166 | |
Mauro Carvalho Chehab | a3f90c7 | 2018-07-05 18:59:35 -0400 | [diff] [blame] | 167 | .frequency_min_hz = 48 * MHz, |
| 168 | .frequency_max_hz = 864 * MHz, |
| 169 | .frequency_step_hz = 1 * kHz, |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 170 | }, |
| 171 | |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 172 | .set_params = tda18212_set_params, |
Antti Palosaari | 835bf82 | 2011-11-13 11:20:08 -0300 | [diff] [blame] | 173 | .get_if_frequency = tda18212_get_if_frequency, |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 174 | }; |
| 175 | |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 176 | static int tda18212_probe(struct i2c_client *client, |
| 177 | const struct i2c_device_id *id) |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 178 | { |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 179 | struct tda18212_config *cfg = client->dev.platform_data; |
| 180 | struct dvb_frontend *fe = cfg->fe; |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 181 | struct tda18212_dev *dev; |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 182 | int ret; |
Antti Palosaari | 3b60b76 | 2014-08-04 01:00:46 -0300 | [diff] [blame] | 183 | unsigned int chip_id; |
Antti Palosaari | 976bcb2 | 2014-07-31 16:35:56 -0300 | [diff] [blame] | 184 | char *version; |
Antti Palosaari | 3b60b76 | 2014-08-04 01:00:46 -0300 | [diff] [blame] | 185 | static const struct regmap_config regmap_config = { |
| 186 | .reg_bits = 8, |
| 187 | .val_bits = 8, |
| 188 | }; |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 189 | |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 190 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
| 191 | if (dev == NULL) { |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 192 | ret = -ENOMEM; |
Antti Palosaari | bdb3265 | 2014-08-03 23:26:27 -0300 | [diff] [blame] | 193 | dev_err(&client->dev, "kzalloc() failed\n"); |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 194 | goto err; |
| 195 | } |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 196 | |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 197 | memcpy(&dev->cfg, cfg, sizeof(struct tda18212_config)); |
| 198 | dev->client = client; |
Antti Palosaari | 3b60b76 | 2014-08-04 01:00:46 -0300 | [diff] [blame] | 199 | dev->regmap = devm_regmap_init_i2c(client, ®map_config); |
| 200 | if (IS_ERR(dev->regmap)) { |
| 201 | ret = PTR_ERR(dev->regmap); |
| 202 | goto err; |
| 203 | } |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 204 | |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 205 | /* check if the tuner is there */ |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 206 | if (fe->ops.i2c_gate_ctrl) |
| 207 | fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ |
| 208 | |
Antti Palosaari | 3b60b76 | 2014-08-04 01:00:46 -0300 | [diff] [blame] | 209 | ret = regmap_read(dev->regmap, 0x00, &chip_id); |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 210 | dev_dbg(&dev->client->dev, "chip_id=%02x\n", chip_id); |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 211 | |
| 212 | if (fe->ops.i2c_gate_ctrl) |
| 213 | fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ |
| 214 | |
Antti Palosaari | 976bcb2 | 2014-07-31 16:35:56 -0300 | [diff] [blame] | 215 | if (ret) |
| 216 | goto err; |
| 217 | |
| 218 | switch (chip_id) { |
| 219 | case 0xc7: |
| 220 | version = "M"; /* master */ |
| 221 | break; |
| 222 | case 0x47: |
| 223 | version = "S"; /* slave */ |
| 224 | break; |
| 225 | default: |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 226 | ret = -ENODEV; |
Antti Palosaari | 976bcb2 | 2014-07-31 16:35:56 -0300 | [diff] [blame] | 227 | goto err; |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 228 | } |
| 229 | |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 230 | dev_info(&dev->client->dev, |
Antti Palosaari | bdb3265 | 2014-08-03 23:26:27 -0300 | [diff] [blame] | 231 | "NXP TDA18212HN/%s successfully identified\n", version); |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 232 | |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 233 | fe->tuner_priv = dev; |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 234 | memcpy(&fe->ops.tuner_ops, &tda18212_tuner_ops, |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 235 | sizeof(struct dvb_tuner_ops)); |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 236 | i2c_set_clientdata(client, dev); |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 237 | |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 238 | return 0; |
Antti Palosaari | 976bcb2 | 2014-07-31 16:35:56 -0300 | [diff] [blame] | 239 | err: |
Antti Palosaari | bdb3265 | 2014-08-03 23:26:27 -0300 | [diff] [blame] | 240 | dev_dbg(&client->dev, "failed=%d\n", ret); |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 241 | kfree(dev); |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 242 | return ret; |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 243 | } |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 244 | |
| 245 | static int tda18212_remove(struct i2c_client *client) |
| 246 | { |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 247 | struct tda18212_dev *dev = i2c_get_clientdata(client); |
| 248 | struct dvb_frontend *fe = dev->cfg.fe; |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 249 | |
Antti Palosaari | bdb3265 | 2014-08-03 23:26:27 -0300 | [diff] [blame] | 250 | dev_dbg(&client->dev, "\n"); |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 251 | |
| 252 | memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops)); |
| 253 | fe->tuner_priv = NULL; |
Antti Palosaari | e4a42e1 | 2014-08-03 23:40:23 -0300 | [diff] [blame] | 254 | kfree(dev); |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 255 | |
| 256 | return 0; |
| 257 | } |
| 258 | |
| 259 | static const struct i2c_device_id tda18212_id[] = { |
| 260 | {"tda18212", 0}, |
| 261 | {} |
| 262 | }; |
| 263 | MODULE_DEVICE_TABLE(i2c, tda18212_id); |
| 264 | |
| 265 | static struct i2c_driver tda18212_driver = { |
| 266 | .driver = { |
Antti Palosaari | 0e584cc | 2014-08-03 23:05:31 -0300 | [diff] [blame] | 267 | .name = "tda18212", |
| 268 | }, |
| 269 | .probe = tda18212_probe, |
| 270 | .remove = tda18212_remove, |
| 271 | .id_table = tda18212_id, |
| 272 | }; |
| 273 | |
| 274 | module_i2c_driver(tda18212_driver); |
Antti Palosaari | 26eb704 | 2011-04-09 20:07:30 -0300 | [diff] [blame] | 275 | |
| 276 | MODULE_DESCRIPTION("NXP TDA18212HN silicon tuner driver"); |
| 277 | MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>"); |
| 278 | MODULE_LICENSE("GPL"); |