Antti Palosaari | 711615d | 2014-04-14 21:55:12 -0300 | [diff] [blame] | 1 | /* |
| 2 | * Silicon Labs Si2168 DVB-T/T2/C demodulator driver |
| 3 | * |
| 4 | * Copyright (C) 2014 Antti Palosaari <crope@iki.fi> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | */ |
| 16 | |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 17 | #include "si2168_priv.h" |
| 18 | |
| 19 | static const struct dvb_frontend_ops si2168_ops; |
| 20 | |
| 21 | /* execute firmware command */ |
| 22 | static int si2168_cmd_execute(struct si2168 *s, struct si2168_cmd *cmd) |
| 23 | { |
| 24 | int ret; |
| 25 | unsigned long timeout; |
| 26 | |
| 27 | mutex_lock(&s->i2c_mutex); |
| 28 | |
| 29 | if (cmd->wlen) { |
| 30 | /* write cmd and args for firmware */ |
| 31 | ret = i2c_master_send(s->client, cmd->args, cmd->wlen); |
| 32 | if (ret < 0) { |
| 33 | goto err_mutex_unlock; |
| 34 | } else if (ret != cmd->wlen) { |
| 35 | ret = -EREMOTEIO; |
| 36 | goto err_mutex_unlock; |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | if (cmd->rlen) { |
| 41 | /* wait cmd execution terminate */ |
| 42 | #define TIMEOUT 50 |
| 43 | timeout = jiffies + msecs_to_jiffies(TIMEOUT); |
| 44 | while (!time_after(jiffies, timeout)) { |
| 45 | ret = i2c_master_recv(s->client, cmd->args, cmd->rlen); |
| 46 | if (ret < 0) { |
| 47 | goto err_mutex_unlock; |
| 48 | } else if (ret != cmd->rlen) { |
| 49 | ret = -EREMOTEIO; |
| 50 | goto err_mutex_unlock; |
| 51 | } |
| 52 | |
| 53 | /* firmware ready? */ |
| 54 | if ((cmd->args[0] >> 7) & 0x01) |
| 55 | break; |
| 56 | } |
| 57 | |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 58 | dev_dbg(&s->client->dev, "cmd execution took %d ms\n", |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 59 | jiffies_to_msecs(jiffies) - |
| 60 | (jiffies_to_msecs(timeout) - TIMEOUT)); |
| 61 | |
Antti Palosaari | eefae30 | 2014-06-13 11:08:25 -0300 | [diff] [blame] | 62 | if (!((cmd->args[0] >> 7) & 0x01)) { |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 63 | ret = -ETIMEDOUT; |
| 64 | goto err_mutex_unlock; |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | ret = 0; |
| 69 | |
| 70 | err_mutex_unlock: |
| 71 | mutex_unlock(&s->i2c_mutex); |
| 72 | if (ret) |
| 73 | goto err; |
| 74 | |
| 75 | return 0; |
| 76 | err: |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 77 | dev_dbg(&s->client->dev, "failed=%d\n", ret); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 78 | return ret; |
| 79 | } |
| 80 | |
| 81 | static int si2168_read_status(struct dvb_frontend *fe, fe_status_t *status) |
| 82 | { |
| 83 | struct si2168 *s = fe->demodulator_priv; |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 84 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 85 | int ret; |
| 86 | struct si2168_cmd cmd; |
| 87 | |
| 88 | *status = 0; |
| 89 | |
| 90 | if (!s->active) { |
| 91 | ret = -EAGAIN; |
| 92 | goto err; |
| 93 | } |
| 94 | |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 95 | switch (c->delivery_system) { |
| 96 | case SYS_DVBT: |
Antti Palosaari | 888680f | 2014-07-09 19:36:58 -0300 | [diff] [blame] | 97 | memcpy(cmd.args, "\xa0\x01", 2); |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 98 | cmd.wlen = 2; |
| 99 | cmd.rlen = 13; |
| 100 | break; |
Antti Palosaari | c790885 | 2014-04-12 01:58:32 -0300 | [diff] [blame] | 101 | case SYS_DVBC_ANNEX_A: |
Antti Palosaari | 888680f | 2014-07-09 19:36:58 -0300 | [diff] [blame] | 102 | memcpy(cmd.args, "\x90\x01", 2); |
Antti Palosaari | c790885 | 2014-04-12 01:58:32 -0300 | [diff] [blame] | 103 | cmd.wlen = 2; |
| 104 | cmd.rlen = 9; |
| 105 | break; |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 106 | case SYS_DVBT2: |
Antti Palosaari | 888680f | 2014-07-09 19:36:58 -0300 | [diff] [blame] | 107 | memcpy(cmd.args, "\x50\x01", 2); |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 108 | cmd.wlen = 2; |
| 109 | cmd.rlen = 14; |
| 110 | break; |
| 111 | default: |
| 112 | ret = -EINVAL; |
| 113 | goto err; |
| 114 | } |
| 115 | |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 116 | ret = si2168_cmd_execute(s, &cmd); |
| 117 | if (ret) |
| 118 | goto err; |
| 119 | |
| 120 | /* |
| 121 | * Possible values seen, in order from strong signal to weak: |
| 122 | * 16 0001 0110 full lock |
| 123 | * 1e 0001 1110 partial lock |
| 124 | * 1a 0001 1010 partial lock |
| 125 | * 18 0001 1000 no lock |
| 126 | * |
| 127 | * [b3:b1] lock bits |
| 128 | * [b4] statistics ready? Set in a few secs after lock is gained. |
| 129 | */ |
| 130 | |
Antti Palosaari | 722a042 | 2014-04-22 21:36:32 -0300 | [diff] [blame] | 131 | switch ((cmd.args[2] >> 1) & 0x03) { |
| 132 | case 0x01: |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 133 | *status = FE_HAS_SIGNAL | FE_HAS_CARRIER; |
| 134 | break; |
Antti Palosaari | 722a042 | 2014-04-22 21:36:32 -0300 | [diff] [blame] | 135 | case 0x03: |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 136 | *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI | |
| 137 | FE_HAS_SYNC | FE_HAS_LOCK; |
| 138 | break; |
| 139 | } |
| 140 | |
| 141 | s->fe_status = *status; |
| 142 | |
Antti Palosaari | 88ac8f8 | 2014-07-09 20:22:27 -0300 | [diff] [blame] | 143 | if (*status & FE_HAS_LOCK) { |
| 144 | c->cnr.len = 1; |
| 145 | c->cnr.stat[0].scale = FE_SCALE_DECIBEL; |
| 146 | c->cnr.stat[0].svalue = cmd.args[3] * 1000 / 4; |
| 147 | } else { |
| 148 | c->cnr.len = 1; |
| 149 | c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE; |
| 150 | } |
| 151 | |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 152 | dev_dbg(&s->client->dev, "status=%02x args=%*ph\n", |
| 153 | *status, cmd.rlen, cmd.args); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 154 | |
| 155 | return 0; |
| 156 | err: |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 157 | dev_dbg(&s->client->dev, "failed=%d\n", ret); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 158 | return ret; |
| 159 | } |
| 160 | |
| 161 | static int si2168_set_frontend(struct dvb_frontend *fe) |
| 162 | { |
| 163 | struct si2168 *s = fe->demodulator_priv; |
| 164 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; |
| 165 | int ret; |
| 166 | struct si2168_cmd cmd; |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 167 | u8 bandwidth, delivery_system; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 168 | |
| 169 | dev_dbg(&s->client->dev, |
CrazyCat | e395e57 | 2014-08-16 18:33:14 -0300 | [diff] [blame] | 170 | "delivery_system=%u modulation=%u frequency=%u bandwidth_hz=%u symbol_rate=%u inversion=%u, stream_id=%d\n", |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 171 | c->delivery_system, c->modulation, |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 172 | c->frequency, c->bandwidth_hz, c->symbol_rate, |
CrazyCat | e395e57 | 2014-08-16 18:33:14 -0300 | [diff] [blame] | 173 | c->inversion, c->stream_id); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 174 | |
| 175 | if (!s->active) { |
| 176 | ret = -EAGAIN; |
| 177 | goto err; |
| 178 | } |
| 179 | |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 180 | switch (c->delivery_system) { |
| 181 | case SYS_DVBT: |
| 182 | delivery_system = 0x20; |
| 183 | break; |
Antti Palosaari | c790885 | 2014-04-12 01:58:32 -0300 | [diff] [blame] | 184 | case SYS_DVBC_ANNEX_A: |
| 185 | delivery_system = 0x30; |
| 186 | break; |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 187 | case SYS_DVBT2: |
| 188 | delivery_system = 0x70; |
| 189 | break; |
| 190 | default: |
| 191 | ret = -EINVAL; |
| 192 | goto err; |
| 193 | } |
| 194 | |
Antti Palosaari | c790885 | 2014-04-12 01:58:32 -0300 | [diff] [blame] | 195 | if (c->bandwidth_hz <= 5000000) |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 196 | bandwidth = 0x05; |
Antti Palosaari | c790885 | 2014-04-12 01:58:32 -0300 | [diff] [blame] | 197 | else if (c->bandwidth_hz <= 6000000) |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 198 | bandwidth = 0x06; |
Antti Palosaari | c790885 | 2014-04-12 01:58:32 -0300 | [diff] [blame] | 199 | else if (c->bandwidth_hz <= 7000000) |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 200 | bandwidth = 0x07; |
Antti Palosaari | c790885 | 2014-04-12 01:58:32 -0300 | [diff] [blame] | 201 | else if (c->bandwidth_hz <= 8000000) |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 202 | bandwidth = 0x08; |
Antti Palosaari | c790885 | 2014-04-12 01:58:32 -0300 | [diff] [blame] | 203 | else if (c->bandwidth_hz <= 9000000) |
| 204 | bandwidth = 0x09; |
| 205 | else if (c->bandwidth_hz <= 10000000) |
| 206 | bandwidth = 0x0a; |
| 207 | else |
| 208 | bandwidth = 0x0f; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 209 | |
| 210 | /* program tuner */ |
| 211 | if (fe->ops.tuner_ops.set_params) { |
| 212 | ret = fe->ops.tuner_ops.set_params(fe); |
| 213 | if (ret) |
| 214 | goto err; |
| 215 | } |
| 216 | |
| 217 | memcpy(cmd.args, "\x88\x02\x02\x02\x02", 5); |
| 218 | cmd.wlen = 5; |
| 219 | cmd.rlen = 5; |
| 220 | ret = si2168_cmd_execute(s, &cmd); |
| 221 | if (ret) |
| 222 | goto err; |
| 223 | |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 224 | /* that has no big effect */ |
| 225 | if (c->delivery_system == SYS_DVBT) |
| 226 | memcpy(cmd.args, "\x89\x21\x06\x11\xff\x98", 6); |
Antti Palosaari | c790885 | 2014-04-12 01:58:32 -0300 | [diff] [blame] | 227 | else if (c->delivery_system == SYS_DVBC_ANNEX_A) |
| 228 | memcpy(cmd.args, "\x89\x21\x06\x11\x89\xf0", 6); |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 229 | else if (c->delivery_system == SYS_DVBT2) |
| 230 | memcpy(cmd.args, "\x89\x21\x06\x11\x89\x20", 6); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 231 | cmd.wlen = 6; |
| 232 | cmd.rlen = 3; |
| 233 | ret = si2168_cmd_execute(s, &cmd); |
| 234 | if (ret) |
| 235 | goto err; |
| 236 | |
CrazyCat | e395e57 | 2014-08-16 18:33:14 -0300 | [diff] [blame] | 237 | if (c->delivery_system == SYS_DVBT2) { |
| 238 | /* select PLP */ |
| 239 | cmd.args[0] = 0x52; |
| 240 | cmd.args[1] = c->stream_id & 0xff; |
| 241 | cmd.args[2] = c->stream_id == NO_STREAM_ID_FILTER ? 0 : 1; |
| 242 | cmd.wlen = 3; |
| 243 | cmd.rlen = 1; |
| 244 | ret = si2168_cmd_execute(s, &cmd); |
| 245 | if (ret) |
| 246 | goto err; |
| 247 | } |
| 248 | |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 249 | memcpy(cmd.args, "\x51\x03", 2); |
| 250 | cmd.wlen = 2; |
| 251 | cmd.rlen = 12; |
| 252 | ret = si2168_cmd_execute(s, &cmd); |
| 253 | if (ret) |
| 254 | goto err; |
| 255 | |
| 256 | memcpy(cmd.args, "\x12\x08\x04", 3); |
| 257 | cmd.wlen = 3; |
| 258 | cmd.rlen = 3; |
| 259 | ret = si2168_cmd_execute(s, &cmd); |
| 260 | if (ret) |
| 261 | goto err; |
| 262 | |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 263 | memcpy(cmd.args, "\x14\x00\x0c\x10\x12\x00", 6); |
| 264 | cmd.wlen = 6; |
Antti Palosaari | 1d518c2 | 2014-07-11 10:40:29 -0300 | [diff] [blame] | 265 | cmd.rlen = 4; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 266 | ret = si2168_cmd_execute(s, &cmd); |
| 267 | if (ret) |
| 268 | goto err; |
| 269 | |
| 270 | memcpy(cmd.args, "\x14\x00\x06\x10\x24\x00", 6); |
| 271 | cmd.wlen = 6; |
Antti Palosaari | 1d518c2 | 2014-07-11 10:40:29 -0300 | [diff] [blame] | 272 | cmd.rlen = 4; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 273 | ret = si2168_cmd_execute(s, &cmd); |
| 274 | if (ret) |
| 275 | goto err; |
| 276 | |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 277 | memcpy(cmd.args, "\x14\x00\x07\x10\x00\x24", 6); |
| 278 | cmd.wlen = 6; |
Antti Palosaari | 1d518c2 | 2014-07-11 10:40:29 -0300 | [diff] [blame] | 279 | cmd.rlen = 4; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 280 | ret = si2168_cmd_execute(s, &cmd); |
| 281 | if (ret) |
| 282 | goto err; |
| 283 | |
| 284 | memcpy(cmd.args, "\x14\x00\x0a\x10\x00\x00", 6); |
Antti Palosaari | bffab93 | 2014-04-11 20:35:27 -0300 | [diff] [blame] | 285 | cmd.args[4] = delivery_system | bandwidth; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 286 | cmd.wlen = 6; |
Antti Palosaari | 1d518c2 | 2014-07-11 10:40:29 -0300 | [diff] [blame] | 287 | cmd.rlen = 4; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 288 | ret = si2168_cmd_execute(s, &cmd); |
| 289 | if (ret) |
| 290 | goto err; |
| 291 | |
Luis Alves | 32bf881 | 2014-07-17 14:31:28 -0300 | [diff] [blame] | 292 | /* set DVB-C symbol rate */ |
| 293 | if (c->delivery_system == SYS_DVBC_ANNEX_A) { |
| 294 | memcpy(cmd.args, "\x14\x00\x02\x11", 4); |
| 295 | cmd.args[4] = (c->symbol_rate / 1000) & 0xff; |
| 296 | cmd.args[5] = ((c->symbol_rate / 1000) >> 8) & 0xff; |
| 297 | cmd.wlen = 6; |
| 298 | cmd.rlen = 4; |
| 299 | ret = si2168_cmd_execute(s, &cmd); |
| 300 | if (ret) |
| 301 | goto err; |
| 302 | } |
| 303 | |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 304 | memcpy(cmd.args, "\x14\x00\x0f\x10\x10\x00", 6); |
| 305 | cmd.wlen = 6; |
Antti Palosaari | 1d518c2 | 2014-07-11 10:40:29 -0300 | [diff] [blame] | 306 | cmd.rlen = 4; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 307 | ret = si2168_cmd_execute(s, &cmd); |
| 308 | if (ret) |
| 309 | goto err; |
| 310 | |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 311 | memcpy(cmd.args, "\x14\x00\x09\x10\xe3\x18", 6); |
| 312 | cmd.wlen = 6; |
Antti Palosaari | 1d518c2 | 2014-07-11 10:40:29 -0300 | [diff] [blame] | 313 | cmd.rlen = 4; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 314 | ret = si2168_cmd_execute(s, &cmd); |
| 315 | if (ret) |
| 316 | goto err; |
| 317 | |
| 318 | memcpy(cmd.args, "\x14\x00\x08\x10\xd7\x15", 6); |
| 319 | cmd.wlen = 6; |
Antti Palosaari | 1d518c2 | 2014-07-11 10:40:29 -0300 | [diff] [blame] | 320 | cmd.rlen = 4; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 321 | ret = si2168_cmd_execute(s, &cmd); |
| 322 | if (ret) |
| 323 | goto err; |
| 324 | |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 325 | memcpy(cmd.args, "\x14\x00\x01\x12\x00\x00", 6); |
| 326 | cmd.wlen = 6; |
Antti Palosaari | 1d518c2 | 2014-07-11 10:40:29 -0300 | [diff] [blame] | 327 | cmd.rlen = 4; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 328 | ret = si2168_cmd_execute(s, &cmd); |
| 329 | if (ret) |
| 330 | goto err; |
| 331 | |
Olli Salonen | 4391177 | 2014-07-17 15:43:27 -0300 | [diff] [blame] | 332 | memcpy(cmd.args, "\x14\x00\x01\x03\x0c\x00", 6); |
| 333 | cmd.wlen = 6; |
| 334 | cmd.rlen = 4; |
| 335 | ret = si2168_cmd_execute(s, &cmd); |
| 336 | if (ret) |
| 337 | goto err; |
| 338 | |
Antti Palosaari | 888680f | 2014-07-09 19:36:58 -0300 | [diff] [blame] | 339 | memcpy(cmd.args, "\x85", 1); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 340 | cmd.wlen = 1; |
| 341 | cmd.rlen = 1; |
| 342 | ret = si2168_cmd_execute(s, &cmd); |
| 343 | if (ret) |
| 344 | goto err; |
| 345 | |
| 346 | s->delivery_system = c->delivery_system; |
| 347 | |
| 348 | return 0; |
| 349 | err: |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 350 | dev_dbg(&s->client->dev, "failed=%d\n", ret); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 351 | return ret; |
| 352 | } |
| 353 | |
| 354 | static int si2168_init(struct dvb_frontend *fe) |
| 355 | { |
| 356 | struct si2168 *s = fe->demodulator_priv; |
| 357 | int ret, len, remaining; |
| 358 | const struct firmware *fw = NULL; |
Olli Salonen | c9cb082 | 2014-07-13 10:52:18 -0300 | [diff] [blame] | 359 | u8 *fw_file; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 360 | const unsigned int i2c_wr_max = 8; |
| 361 | struct si2168_cmd cmd; |
Antti Palosaari | b6b6fd6 | 2014-07-13 19:22:19 -0300 | [diff] [blame] | 362 | unsigned int chip_id; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 363 | |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 364 | dev_dbg(&s->client->dev, "\n"); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 365 | |
Olli Salonen | 8e41722 | 2014-08-25 15:07:04 -0300 | [diff] [blame] | 366 | /* initialize */ |
Antti Palosaari | 888680f | 2014-07-09 19:36:58 -0300 | [diff] [blame] | 367 | memcpy(cmd.args, "\xc0\x12\x00\x0c\x00\x0d\x16\x00\x00\x00\x00\x00\x00", 13); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 368 | cmd.wlen = 13; |
| 369 | cmd.rlen = 0; |
| 370 | ret = si2168_cmd_execute(s, &cmd); |
| 371 | if (ret) |
| 372 | goto err; |
| 373 | |
Olli Salonen | 8e41722 | 2014-08-25 15:07:04 -0300 | [diff] [blame] | 374 | if (s->fw_loaded) { |
| 375 | /* resume */ |
| 376 | memcpy(cmd.args, "\xc0\x06\x08\x0f\x00\x20\x21\x01", 8); |
| 377 | cmd.wlen = 8; |
| 378 | cmd.rlen = 1; |
| 379 | ret = si2168_cmd_execute(s, &cmd); |
| 380 | if (ret) |
| 381 | goto err; |
| 382 | |
| 383 | memcpy(cmd.args, "\x85", 1); |
| 384 | cmd.wlen = 1; |
| 385 | cmd.rlen = 1; |
| 386 | ret = si2168_cmd_execute(s, &cmd); |
| 387 | if (ret) |
| 388 | goto err; |
| 389 | |
| 390 | goto warm; |
| 391 | } |
| 392 | |
| 393 | /* power up */ |
Antti Palosaari | 888680f | 2014-07-09 19:36:58 -0300 | [diff] [blame] | 394 | memcpy(cmd.args, "\xc0\x06\x01\x0f\x00\x20\x20\x01", 8); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 395 | cmd.wlen = 8; |
| 396 | cmd.rlen = 1; |
| 397 | ret = si2168_cmd_execute(s, &cmd); |
| 398 | if (ret) |
| 399 | goto err; |
| 400 | |
Olli Salonen | c9cb082 | 2014-07-13 10:52:18 -0300 | [diff] [blame] | 401 | /* query chip revision */ |
Antti Palosaari | 888680f | 2014-07-09 19:36:58 -0300 | [diff] [blame] | 402 | memcpy(cmd.args, "\x02", 1); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 403 | cmd.wlen = 1; |
| 404 | cmd.rlen = 13; |
| 405 | ret = si2168_cmd_execute(s, &cmd); |
| 406 | if (ret) |
| 407 | goto err; |
| 408 | |
Antti Palosaari | b6b6fd6 | 2014-07-13 19:22:19 -0300 | [diff] [blame] | 409 | chip_id = cmd.args[1] << 24 | cmd.args[2] << 16 | cmd.args[3] << 8 | |
| 410 | cmd.args[4] << 0; |
| 411 | |
Luis Alves | 635a90c | 2014-07-17 19:43:37 -0300 | [diff] [blame] | 412 | #define SI2168_A20 ('A' << 24 | 68 << 16 | '2' << 8 | '0' << 0) |
Antti Palosaari | b6b6fd6 | 2014-07-13 19:22:19 -0300 | [diff] [blame] | 413 | #define SI2168_A30 ('A' << 24 | 68 << 16 | '3' << 8 | '0' << 0) |
| 414 | #define SI2168_B40 ('B' << 24 | 68 << 16 | '4' << 8 | '0' << 0) |
| 415 | |
| 416 | switch (chip_id) { |
Luis Alves | 635a90c | 2014-07-17 19:43:37 -0300 | [diff] [blame] | 417 | case SI2168_A20: |
| 418 | fw_file = SI2168_A20_FIRMWARE; |
| 419 | break; |
Antti Palosaari | b6b6fd6 | 2014-07-13 19:22:19 -0300 | [diff] [blame] | 420 | case SI2168_A30: |
Olli Salonen | c9cb082 | 2014-07-13 10:52:18 -0300 | [diff] [blame] | 421 | fw_file = SI2168_A30_FIRMWARE; |
Antti Palosaari | b6b6fd6 | 2014-07-13 19:22:19 -0300 | [diff] [blame] | 422 | break; |
| 423 | case SI2168_B40: |
| 424 | fw_file = SI2168_B40_FIRMWARE; |
| 425 | break; |
| 426 | default: |
Olli Salonen | c9cb082 | 2014-07-13 10:52:18 -0300 | [diff] [blame] | 427 | dev_err(&s->client->dev, |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 428 | "unknown chip version Si21%d-%c%c%c\n", |
| 429 | cmd.args[2], cmd.args[1], |
Antti Palosaari | b6b6fd6 | 2014-07-13 19:22:19 -0300 | [diff] [blame] | 430 | cmd.args[3], cmd.args[4]); |
Olli Salonen | c9cb082 | 2014-07-13 10:52:18 -0300 | [diff] [blame] | 431 | ret = -EINVAL; |
| 432 | goto err; |
| 433 | } |
| 434 | |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 435 | /* cold state - try to download firmware */ |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 436 | dev_info(&s->client->dev, "found a '%s' in cold state\n", |
| 437 | si2168_ops.info.name); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 438 | |
| 439 | /* request the firmware, this will block and timeout */ |
| 440 | ret = request_firmware(&fw, fw_file, &s->client->dev); |
| 441 | if (ret) { |
Antti Palosaari | b6b6fd6 | 2014-07-13 19:22:19 -0300 | [diff] [blame] | 442 | /* fallback mechanism to handle old name for Si2168 B40 fw */ |
| 443 | if (chip_id == SI2168_B40) { |
Olli Salonen | c9cb082 | 2014-07-13 10:52:18 -0300 | [diff] [blame] | 444 | fw_file = SI2168_B40_FIRMWARE_FALLBACK; |
| 445 | ret = request_firmware(&fw, fw_file, &s->client->dev); |
| 446 | } |
Antti Palosaari | b6b6fd6 | 2014-07-13 19:22:19 -0300 | [diff] [blame] | 447 | |
| 448 | if (ret == 0) { |
| 449 | dev_notice(&s->client->dev, |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 450 | "please install firmware file '%s'\n", |
| 451 | SI2168_B40_FIRMWARE); |
Antti Palosaari | b6b6fd6 | 2014-07-13 19:22:19 -0300 | [diff] [blame] | 452 | } else { |
| 453 | dev_err(&s->client->dev, |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 454 | "firmware file '%s' not found\n", |
| 455 | fw_file); |
Olli Salonen | c9cb082 | 2014-07-13 10:52:18 -0300 | [diff] [blame] | 456 | goto err; |
| 457 | } |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 458 | } |
| 459 | |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 460 | dev_info(&s->client->dev, "downloading firmware from file '%s'\n", |
| 461 | fw_file); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 462 | |
| 463 | for (remaining = fw->size; remaining > 0; remaining -= i2c_wr_max) { |
| 464 | len = remaining; |
| 465 | if (len > i2c_wr_max) |
| 466 | len = i2c_wr_max; |
| 467 | |
| 468 | memcpy(cmd.args, &fw->data[fw->size - remaining], len); |
| 469 | cmd.wlen = len; |
| 470 | cmd.rlen = 1; |
| 471 | ret = si2168_cmd_execute(s, &cmd); |
| 472 | if (ret) { |
| 473 | dev_err(&s->client->dev, |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 474 | "firmware download failed=%d\n", |
| 475 | ret); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 476 | goto err; |
| 477 | } |
| 478 | } |
| 479 | |
| 480 | release_firmware(fw); |
| 481 | fw = NULL; |
| 482 | |
Antti Palosaari | 888680f | 2014-07-09 19:36:58 -0300 | [diff] [blame] | 483 | memcpy(cmd.args, "\x01\x01", 2); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 484 | cmd.wlen = 2; |
| 485 | cmd.rlen = 1; |
| 486 | ret = si2168_cmd_execute(s, &cmd); |
| 487 | if (ret) |
| 488 | goto err; |
| 489 | |
Olli Salonen | 389ce39 | 2014-08-11 16:58:10 -0300 | [diff] [blame] | 490 | /* set ts mode */ |
| 491 | memcpy(cmd.args, "\x14\x00\x01\x10\x10\x00", 6); |
| 492 | cmd.args[4] |= s->ts_mode; |
| 493 | cmd.wlen = 6; |
| 494 | cmd.rlen = 4; |
| 495 | ret = si2168_cmd_execute(s, &cmd); |
| 496 | if (ret) |
| 497 | goto err; |
| 498 | |
Olli Salonen | 8e41722 | 2014-08-25 15:07:04 -0300 | [diff] [blame] | 499 | s->fw_loaded = true; |
| 500 | |
Olli Salonen | 8e41722 | 2014-08-25 15:07:04 -0300 | [diff] [blame] | 501 | dev_info(&s->client->dev, "found a '%s' in warm state\n", |
| 502 | si2168_ops.info.name); |
Antti Palosaari | 45c3cbb | 2014-11-03 18:28:39 -0300 | [diff] [blame] | 503 | warm: |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 504 | s->active = true; |
| 505 | |
| 506 | return 0; |
| 507 | err: |
| 508 | if (fw) |
| 509 | release_firmware(fw); |
| 510 | |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 511 | dev_dbg(&s->client->dev, "failed=%d\n", ret); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 512 | return ret; |
| 513 | } |
| 514 | |
| 515 | static int si2168_sleep(struct dvb_frontend *fe) |
| 516 | { |
| 517 | struct si2168 *s = fe->demodulator_priv; |
Antti Palosaari | 4de0ed7 | 2014-07-09 18:45:31 -0300 | [diff] [blame] | 518 | int ret; |
| 519 | struct si2168_cmd cmd; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 520 | |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 521 | dev_dbg(&s->client->dev, "\n"); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 522 | |
| 523 | s->active = false; |
| 524 | |
Antti Palosaari | 4de0ed7 | 2014-07-09 18:45:31 -0300 | [diff] [blame] | 525 | memcpy(cmd.args, "\x13", 1); |
| 526 | cmd.wlen = 1; |
| 527 | cmd.rlen = 0; |
| 528 | ret = si2168_cmd_execute(s, &cmd); |
| 529 | if (ret) |
| 530 | goto err; |
| 531 | |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 532 | return 0; |
Antti Palosaari | 4de0ed7 | 2014-07-09 18:45:31 -0300 | [diff] [blame] | 533 | err: |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 534 | dev_dbg(&s->client->dev, "failed=%d\n", ret); |
Antti Palosaari | 4de0ed7 | 2014-07-09 18:45:31 -0300 | [diff] [blame] | 535 | return ret; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 536 | } |
| 537 | |
| 538 | static int si2168_get_tune_settings(struct dvb_frontend *fe, |
| 539 | struct dvb_frontend_tune_settings *s) |
| 540 | { |
| 541 | s->min_delay_ms = 900; |
| 542 | |
| 543 | return 0; |
| 544 | } |
| 545 | |
| 546 | /* |
| 547 | * I2C gate logic |
| 548 | * We must use unlocked i2c_transfer() here because I2C lock is already taken |
| 549 | * by tuner driver. |
| 550 | */ |
| 551 | static int si2168_select(struct i2c_adapter *adap, void *mux_priv, u32 chan) |
| 552 | { |
| 553 | struct si2168 *s = mux_priv; |
| 554 | int ret; |
| 555 | struct i2c_msg gate_open_msg = { |
| 556 | .addr = s->client->addr, |
| 557 | .flags = 0, |
| 558 | .len = 3, |
| 559 | .buf = "\xc0\x0d\x01", |
| 560 | }; |
| 561 | |
| 562 | mutex_lock(&s->i2c_mutex); |
| 563 | |
| 564 | /* open tuner I2C gate */ |
| 565 | ret = __i2c_transfer(s->client->adapter, &gate_open_msg, 1); |
| 566 | if (ret != 1) { |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 567 | dev_warn(&s->client->dev, "i2c write failed=%d\n", ret); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 568 | if (ret >= 0) |
| 569 | ret = -EREMOTEIO; |
| 570 | } else { |
| 571 | ret = 0; |
| 572 | } |
| 573 | |
| 574 | return ret; |
| 575 | } |
| 576 | |
| 577 | static int si2168_deselect(struct i2c_adapter *adap, void *mux_priv, u32 chan) |
| 578 | { |
| 579 | struct si2168 *s = mux_priv; |
| 580 | int ret; |
| 581 | struct i2c_msg gate_close_msg = { |
| 582 | .addr = s->client->addr, |
| 583 | .flags = 0, |
| 584 | .len = 3, |
| 585 | .buf = "\xc0\x0d\x00", |
| 586 | }; |
| 587 | |
| 588 | /* close tuner I2C gate */ |
| 589 | ret = __i2c_transfer(s->client->adapter, &gate_close_msg, 1); |
| 590 | if (ret != 1) { |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 591 | dev_warn(&s->client->dev, "i2c write failed=%d\n", ret); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 592 | if (ret >= 0) |
| 593 | ret = -EREMOTEIO; |
| 594 | } else { |
| 595 | ret = 0; |
| 596 | } |
| 597 | |
| 598 | mutex_unlock(&s->i2c_mutex); |
| 599 | |
| 600 | return ret; |
| 601 | } |
| 602 | |
| 603 | static const struct dvb_frontend_ops si2168_ops = { |
Antti Palosaari | c790885 | 2014-04-12 01:58:32 -0300 | [diff] [blame] | 604 | .delsys = {SYS_DVBT, SYS_DVBT2, SYS_DVBC_ANNEX_A}, |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 605 | .info = { |
| 606 | .name = "Silicon Labs Si2168", |
| 607 | .caps = FE_CAN_FEC_1_2 | |
| 608 | FE_CAN_FEC_2_3 | |
| 609 | FE_CAN_FEC_3_4 | |
| 610 | FE_CAN_FEC_5_6 | |
| 611 | FE_CAN_FEC_7_8 | |
| 612 | FE_CAN_FEC_AUTO | |
| 613 | FE_CAN_QPSK | |
| 614 | FE_CAN_QAM_16 | |
| 615 | FE_CAN_QAM_32 | |
| 616 | FE_CAN_QAM_64 | |
| 617 | FE_CAN_QAM_128 | |
| 618 | FE_CAN_QAM_256 | |
| 619 | FE_CAN_QAM_AUTO | |
| 620 | FE_CAN_TRANSMISSION_MODE_AUTO | |
| 621 | FE_CAN_GUARD_INTERVAL_AUTO | |
| 622 | FE_CAN_HIERARCHY_AUTO | |
| 623 | FE_CAN_MUTE_TS | |
Olli Salonen | 327eeb3 | 2014-09-23 13:53:09 -0300 | [diff] [blame] | 624 | FE_CAN_2G_MODULATION | |
| 625 | FE_CAN_MULTISTREAM |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 626 | }, |
| 627 | |
| 628 | .get_tune_settings = si2168_get_tune_settings, |
| 629 | |
| 630 | .init = si2168_init, |
| 631 | .sleep = si2168_sleep, |
| 632 | |
| 633 | .set_frontend = si2168_set_frontend, |
| 634 | |
| 635 | .read_status = si2168_read_status, |
| 636 | }; |
| 637 | |
| 638 | static int si2168_probe(struct i2c_client *client, |
| 639 | const struct i2c_device_id *id) |
| 640 | { |
| 641 | struct si2168_config *config = client->dev.platform_data; |
| 642 | struct si2168 *s; |
| 643 | int ret; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 644 | |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 645 | dev_dbg(&client->dev, "\n"); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 646 | |
| 647 | s = kzalloc(sizeof(struct si2168), GFP_KERNEL); |
| 648 | if (!s) { |
| 649 | ret = -ENOMEM; |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 650 | dev_err(&client->dev, "kzalloc() failed\n"); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 651 | goto err; |
| 652 | } |
| 653 | |
| 654 | s->client = client; |
| 655 | mutex_init(&s->i2c_mutex); |
| 656 | |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 657 | /* create mux i2c adapter for tuner */ |
| 658 | s->adapter = i2c_add_mux_adapter(client->adapter, &client->dev, s, |
| 659 | 0, 0, 0, si2168_select, si2168_deselect); |
Luis Alves | 4d6efc7 | 2014-07-17 16:38:08 -0300 | [diff] [blame] | 660 | if (s->adapter == NULL) { |
| 661 | ret = -ENODEV; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 662 | goto err; |
Luis Alves | 4d6efc7 | 2014-07-17 16:38:08 -0300 | [diff] [blame] | 663 | } |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 664 | |
| 665 | /* create dvb_frontend */ |
| 666 | memcpy(&s->fe.ops, &si2168_ops, sizeof(struct dvb_frontend_ops)); |
| 667 | s->fe.demodulator_priv = s; |
| 668 | |
| 669 | *config->i2c_adapter = s->adapter; |
| 670 | *config->fe = &s->fe; |
Olli Salonen | 389ce39 | 2014-08-11 16:58:10 -0300 | [diff] [blame] | 671 | s->ts_mode = config->ts_mode; |
Olli Salonen | 8e41722 | 2014-08-25 15:07:04 -0300 | [diff] [blame] | 672 | s->fw_loaded = false; |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 673 | |
| 674 | i2c_set_clientdata(client, s); |
| 675 | |
| 676 | dev_info(&s->client->dev, |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 677 | "Silicon Labs Si2168 successfully attached\n"); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 678 | return 0; |
| 679 | err: |
| 680 | kfree(s); |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 681 | dev_dbg(&client->dev, "failed=%d\n", ret); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 682 | return ret; |
| 683 | } |
| 684 | |
| 685 | static int si2168_remove(struct i2c_client *client) |
| 686 | { |
| 687 | struct si2168 *s = i2c_get_clientdata(client); |
| 688 | |
Olli Salonen | 37b4e43 | 2014-08-05 08:54:08 -0300 | [diff] [blame] | 689 | dev_dbg(&client->dev, "\n"); |
Antti Palosaari | 845f350 | 2014-04-10 22:00:50 -0300 | [diff] [blame] | 690 | |
| 691 | i2c_del_mux_adapter(s->adapter); |
| 692 | |
| 693 | s->fe.ops.release = NULL; |
| 694 | s->fe.demodulator_priv = NULL; |
| 695 | |
| 696 | kfree(s); |
| 697 | |
| 698 | return 0; |
| 699 | } |
| 700 | |
| 701 | static const struct i2c_device_id si2168_id[] = { |
| 702 | {"si2168", 0}, |
| 703 | {} |
| 704 | }; |
| 705 | MODULE_DEVICE_TABLE(i2c, si2168_id); |
| 706 | |
| 707 | static struct i2c_driver si2168_driver = { |
| 708 | .driver = { |
| 709 | .owner = THIS_MODULE, |
| 710 | .name = "si2168", |
| 711 | }, |
| 712 | .probe = si2168_probe, |
| 713 | .remove = si2168_remove, |
| 714 | .id_table = si2168_id, |
| 715 | }; |
| 716 | |
| 717 | module_i2c_driver(si2168_driver); |
| 718 | |
| 719 | MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>"); |
| 720 | MODULE_DESCRIPTION("Silicon Labs Si2168 DVB-T/T2/C demodulator driver"); |
| 721 | MODULE_LICENSE("GPL"); |
Luis Alves | 635a90c | 2014-07-17 19:43:37 -0300 | [diff] [blame] | 722 | MODULE_FIRMWARE(SI2168_A20_FIRMWARE); |
Antti Palosaari | 668aa63 | 2014-07-13 16:09:03 -0300 | [diff] [blame] | 723 | MODULE_FIRMWARE(SI2168_A30_FIRMWARE); |
Olli Salonen | c9cb082 | 2014-07-13 10:52:18 -0300 | [diff] [blame] | 724 | MODULE_FIRMWARE(SI2168_B40_FIRMWARE); |