| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * FM Driver for Connectivity chip of Texas Instruments. |
|---|
| 3 | 4 | * FM Common module header file |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * Copyright (C) 2011 Texas Instruments |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 8 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 9 | | - * published by the Free Software Foundation. |
|---|
| 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 | 7 | */ |
|---|
| 17 | 8 | |
|---|
| 18 | 9 | #ifndef _FMDRV_COMMON_H |
|---|
| .. | .. |
|---|
| 168 | 159 | #define FM_DISABLE 0 |
|---|
| 169 | 160 | |
|---|
| 170 | 161 | /* FLAG_GET register bits */ |
|---|
| 171 | | -#define FM_FR_EVENT (1 << 0) |
|---|
| 172 | | -#define FM_BL_EVENT (1 << 1) |
|---|
| 173 | | -#define FM_RDS_EVENT (1 << 2) |
|---|
| 174 | | -#define FM_BBLK_EVENT (1 << 3) |
|---|
| 175 | | -#define FM_LSYNC_EVENT (1 << 4) |
|---|
| 176 | | -#define FM_LEV_EVENT (1 << 5) |
|---|
| 177 | | -#define FM_IFFR_EVENT (1 << 6) |
|---|
| 178 | | -#define FM_PI_EVENT (1 << 7) |
|---|
| 179 | | -#define FM_PD_EVENT (1 << 8) |
|---|
| 180 | | -#define FM_STIC_EVENT (1 << 9) |
|---|
| 181 | | -#define FM_MAL_EVENT (1 << 10) |
|---|
| 182 | | -#define FM_POW_ENB_EVENT (1 << 11) |
|---|
| 162 | +#define FM_FR_EVENT BIT(0) |
|---|
| 163 | +#define FM_BL_EVENT BIT(1) |
|---|
| 164 | +#define FM_RDS_EVENT BIT(2) |
|---|
| 165 | +#define FM_BBLK_EVENT BIT(3) |
|---|
| 166 | +#define FM_LSYNC_EVENT BIT(4) |
|---|
| 167 | +#define FM_LEV_EVENT BIT(5) |
|---|
| 168 | +#define FM_IFFR_EVENT BIT(6) |
|---|
| 169 | +#define FM_PI_EVENT BIT(7) |
|---|
| 170 | +#define FM_PD_EVENT BIT(8) |
|---|
| 171 | +#define FM_STIC_EVENT BIT(9) |
|---|
| 172 | +#define FM_MAL_EVENT BIT(10) |
|---|
| 173 | +#define FM_POW_ENB_EVENT BIT(11) |
|---|
| 183 | 174 | |
|---|
| 184 | 175 | /* |
|---|
| 185 | 176 | * Firmware files of FM. ASIC ID and ASIC version will be appened to this, |
|---|
| .. | .. |
|---|
| 277 | 268 | * Represents an RDS group type & version. |
|---|
| 278 | 269 | * There are 15 groups, each group has 2 versions: A and B. |
|---|
| 279 | 270 | */ |
|---|
| 280 | | -#define FM_RDS_GROUP_TYPE_MASK_0A ((unsigned long)1<<0) |
|---|
| 281 | | -#define FM_RDS_GROUP_TYPE_MASK_0B ((unsigned long)1<<1) |
|---|
| 282 | | -#define FM_RDS_GROUP_TYPE_MASK_1A ((unsigned long)1<<2) |
|---|
| 283 | | -#define FM_RDS_GROUP_TYPE_MASK_1B ((unsigned long)1<<3) |
|---|
| 284 | | -#define FM_RDS_GROUP_TYPE_MASK_2A ((unsigned long)1<<4) |
|---|
| 285 | | -#define FM_RDS_GROUP_TYPE_MASK_2B ((unsigned long)1<<5) |
|---|
| 286 | | -#define FM_RDS_GROUP_TYPE_MASK_3A ((unsigned long)1<<6) |
|---|
| 287 | | -#define FM_RDS_GROUP_TYPE_MASK_3B ((unsigned long)1<<7) |
|---|
| 288 | | -#define FM_RDS_GROUP_TYPE_MASK_4A ((unsigned long)1<<8) |
|---|
| 289 | | -#define FM_RDS_GROUP_TYPE_MASK_4B ((unsigned long)1<<9) |
|---|
| 290 | | -#define FM_RDS_GROUP_TYPE_MASK_5A ((unsigned long)1<<10) |
|---|
| 291 | | -#define FM_RDS_GROUP_TYPE_MASK_5B ((unsigned long)1<<11) |
|---|
| 292 | | -#define FM_RDS_GROUP_TYPE_MASK_6A ((unsigned long)1<<12) |
|---|
| 293 | | -#define FM_RDS_GROUP_TYPE_MASK_6B ((unsigned long)1<<13) |
|---|
| 294 | | -#define FM_RDS_GROUP_TYPE_MASK_7A ((unsigned long)1<<14) |
|---|
| 295 | | -#define FM_RDS_GROUP_TYPE_MASK_7B ((unsigned long)1<<15) |
|---|
| 296 | | -#define FM_RDS_GROUP_TYPE_MASK_8A ((unsigned long)1<<16) |
|---|
| 297 | | -#define FM_RDS_GROUP_TYPE_MASK_8B ((unsigned long)1<<17) |
|---|
| 298 | | -#define FM_RDS_GROUP_TYPE_MASK_9A ((unsigned long)1<<18) |
|---|
| 299 | | -#define FM_RDS_GROUP_TYPE_MASK_9B ((unsigned long)1<<19) |
|---|
| 300 | | -#define FM_RDS_GROUP_TYPE_MASK_10A ((unsigned long)1<<20) |
|---|
| 301 | | -#define FM_RDS_GROUP_TYPE_MASK_10B ((unsigned long)1<<21) |
|---|
| 302 | | -#define FM_RDS_GROUP_TYPE_MASK_11A ((unsigned long)1<<22) |
|---|
| 303 | | -#define FM_RDS_GROUP_TYPE_MASK_11B ((unsigned long)1<<23) |
|---|
| 304 | | -#define FM_RDS_GROUP_TYPE_MASK_12A ((unsigned long)1<<24) |
|---|
| 305 | | -#define FM_RDS_GROUP_TYPE_MASK_12B ((unsigned long)1<<25) |
|---|
| 306 | | -#define FM_RDS_GROUP_TYPE_MASK_13A ((unsigned long)1<<26) |
|---|
| 307 | | -#define FM_RDS_GROUP_TYPE_MASK_13B ((unsigned long)1<<27) |
|---|
| 308 | | -#define FM_RDS_GROUP_TYPE_MASK_14A ((unsigned long)1<<28) |
|---|
| 309 | | -#define FM_RDS_GROUP_TYPE_MASK_14B ((unsigned long)1<<29) |
|---|
| 310 | | -#define FM_RDS_GROUP_TYPE_MASK_15A ((unsigned long)1<<30) |
|---|
| 311 | | -#define FM_RDS_GROUP_TYPE_MASK_15B ((unsigned long)1<<31) |
|---|
| 271 | +#define FM_RDS_GROUP_TYPE_MASK_0A BIT(0) |
|---|
| 272 | +#define FM_RDS_GROUP_TYPE_MASK_0B BIT(1) |
|---|
| 273 | +#define FM_RDS_GROUP_TYPE_MASK_1A BIT(2) |
|---|
| 274 | +#define FM_RDS_GROUP_TYPE_MASK_1B BIT(3) |
|---|
| 275 | +#define FM_RDS_GROUP_TYPE_MASK_2A BIT(4) |
|---|
| 276 | +#define FM_RDS_GROUP_TYPE_MASK_2B BIT(5) |
|---|
| 277 | +#define FM_RDS_GROUP_TYPE_MASK_3A BIT(6) |
|---|
| 278 | +#define FM_RDS_GROUP_TYPE_MASK_3B BIT(7) |
|---|
| 279 | +#define FM_RDS_GROUP_TYPE_MASK_4A BIT(8) |
|---|
| 280 | +#define FM_RDS_GROUP_TYPE_MASK_4B BIT(9) |
|---|
| 281 | +#define FM_RDS_GROUP_TYPE_MASK_5A BIT(10) |
|---|
| 282 | +#define FM_RDS_GROUP_TYPE_MASK_5B BIT(11) |
|---|
| 283 | +#define FM_RDS_GROUP_TYPE_MASK_6A BIT(12) |
|---|
| 284 | +#define FM_RDS_GROUP_TYPE_MASK_6B BIT(13) |
|---|
| 285 | +#define FM_RDS_GROUP_TYPE_MASK_7A BIT(14) |
|---|
| 286 | +#define FM_RDS_GROUP_TYPE_MASK_7B BIT(15) |
|---|
| 287 | +#define FM_RDS_GROUP_TYPE_MASK_8A BIT(16) |
|---|
| 288 | +#define FM_RDS_GROUP_TYPE_MASK_8B BIT(17) |
|---|
| 289 | +#define FM_RDS_GROUP_TYPE_MASK_9A BIT(18) |
|---|
| 290 | +#define FM_RDS_GROUP_TYPE_MASK_9B BIT(19) |
|---|
| 291 | +#define FM_RDS_GROUP_TYPE_MASK_10A BIT(20) |
|---|
| 292 | +#define FM_RDS_GROUP_TYPE_MASK_10B BIT(21) |
|---|
| 293 | +#define FM_RDS_GROUP_TYPE_MASK_11A BIT(22) |
|---|
| 294 | +#define FM_RDS_GROUP_TYPE_MASK_11B BIT(23) |
|---|
| 295 | +#define FM_RDS_GROUP_TYPE_MASK_12A BIT(24) |
|---|
| 296 | +#define FM_RDS_GROUP_TYPE_MASK_12B BIT(25) |
|---|
| 297 | +#define FM_RDS_GROUP_TYPE_MASK_13A BIT(26) |
|---|
| 298 | +#define FM_RDS_GROUP_TYPE_MASK_13B BIT(27) |
|---|
| 299 | +#define FM_RDS_GROUP_TYPE_MASK_14A BIT(28) |
|---|
| 300 | +#define FM_RDS_GROUP_TYPE_MASK_14B BIT(29) |
|---|
| 301 | +#define FM_RDS_GROUP_TYPE_MASK_15A BIT(30) |
|---|
| 302 | +#define FM_RDS_GROUP_TYPE_MASK_15B BIT(31) |
|---|
| 312 | 303 | |
|---|
| 313 | 304 | /* RX Alternate Frequency info */ |
|---|
| 314 | 305 | #define FM_RDS_MIN_AF 1 |
|---|