| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * drivers/mfd/si476x-cmd.c -- Subroutines implementing command |
|---|
| 3 | 4 | * protocol of si476x series of chips |
|---|
| .. | .. |
|---|
| 6 | 7 | * Copyright (C) 2013 Andrey Smirnov |
|---|
| 7 | 8 | * |
|---|
| 8 | 9 | * Author: Andrey Smirnov <andrew.smirnov@gmail.com> |
|---|
| 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 as published by |
|---|
| 12 | | - * the Free Software Foundation; version 2 of the License. |
|---|
| 13 | | - * |
|---|
| 14 | | - * This program is distributed in the hope that it will be useful, but |
|---|
| 15 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 17 | | - * General Public License for more details. |
|---|
| 18 | | - * |
|---|
| 19 | 10 | */ |
|---|
| 20 | 11 | |
|---|
| 21 | 12 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 250 | 241 | /** |
|---|
| 251 | 242 | * si476x_core_send_command() - sends a command to si476x and waits its |
|---|
| 252 | 243 | * response |
|---|
| 253 | | - * @core: si476x_device structure for the device we are |
|---|
| 244 | + * @core: si476x_device structure for the device we are |
|---|
| 254 | 245 | * communicating with |
|---|
| 255 | 246 | * @command: command id |
|---|
| 256 | 247 | * @args: command arguments we are sending |
|---|
| 257 | 248 | * @argn: actual size of @args |
|---|
| 258 | | - * @response: buffer to place the expected response from the device |
|---|
| 259 | | - * @respn: actual size of @response |
|---|
| 249 | + * @resp: buffer to place the expected response from the device |
|---|
| 250 | + * @respn: actual size of @resp |
|---|
| 260 | 251 | * @usecs: amount of time to wait before reading the response (in |
|---|
| 261 | 252 | * usecs) |
|---|
| 262 | 253 | * |
|---|
| .. | .. |
|---|
| 505 | 496 | * enable 1MOhm pulldown |
|---|
| 506 | 497 | * SI476X_DFS_DAUDIO - set the pin to be a part of digital |
|---|
| 507 | 498 | * audio interface |
|---|
| 508 | | - * @dout - DOUT pin function configuration: |
|---|
| 499 | + * @dout: - DOUT pin function configuration: |
|---|
| 509 | 500 | * SI476X_DOUT_NOOP - do not modify the behaviour |
|---|
| 510 | 501 | * SI476X_DOUT_TRISTATE - put the pin in tristate condition, |
|---|
| 511 | 502 | * enable 1MOhm pulldown |
|---|
| .. | .. |
|---|
| 513 | 504 | * port 1 |
|---|
| 514 | 505 | * SI476X_DOUT_I2S_INPUT - set this pin to be digital in on I2S |
|---|
| 515 | 506 | * port 1 |
|---|
| 516 | | - * @xout - XOUT pin function configuration: |
|---|
| 507 | + * @xout: - XOUT pin function configuration: |
|---|
| 517 | 508 | * SI476X_XOUT_NOOP - do not modify the behaviour |
|---|
| 518 | 509 | * SI476X_XOUT_TRISTATE - put the pin in tristate condition, |
|---|
| 519 | 510 | * enable 1MOhm pulldown |
|---|
| .. | .. |
|---|
| 549 | 540 | |
|---|
| 550 | 541 | /** |
|---|
| 551 | 542 | * si476x_cmd_zif_pin_cfg - send 'ZIF_PIN_CFG_COMMAND' |
|---|
| 552 | | - * @core - device to send the command to |
|---|
| 553 | | - * @iqclk - IQCL pin function configuration: |
|---|
| 543 | + * @core: - device to send the command to |
|---|
| 544 | + * @iqclk: - IQCL pin function configuration: |
|---|
| 554 | 545 | * SI476X_IQCLK_NOOP - do not modify the behaviour |
|---|
| 555 | 546 | * SI476X_IQCLK_TRISTATE - put the pin in tristate condition, |
|---|
| 556 | 547 | * enable 1MOhm pulldown |
|---|
| 557 | 548 | * SI476X_IQCLK_IQ - set pin to be a part of I/Q interace |
|---|
| 558 | 549 | * in master mode |
|---|
| 559 | | - * @iqfs - IQFS pin function configuration: |
|---|
| 550 | + * @iqfs: - IQFS pin function configuration: |
|---|
| 560 | 551 | * SI476X_IQFS_NOOP - do not modify the behaviour |
|---|
| 561 | 552 | * SI476X_IQFS_TRISTATE - put the pin in tristate condition, |
|---|
| 562 | 553 | * enable 1MOhm pulldown |
|---|
| 563 | 554 | * SI476X_IQFS_IQ - set pin to be a part of I/Q interace |
|---|
| 564 | 555 | * in master mode |
|---|
| 565 | | - * @iout - IOUT pin function configuration: |
|---|
| 556 | + * @iout: - IOUT pin function configuration: |
|---|
| 566 | 557 | * SI476X_IOUT_NOOP - do not modify the behaviour |
|---|
| 567 | 558 | * SI476X_IOUT_TRISTATE - put the pin in tristate condition, |
|---|
| 568 | 559 | * enable 1MOhm pulldown |
|---|
| 569 | 560 | * SI476X_IOUT_OUTPUT - set pin to be I out |
|---|
| 570 | | - * @qout - QOUT pin function configuration: |
|---|
| 561 | + * @qout: - QOUT pin function configuration: |
|---|
| 571 | 562 | * SI476X_QOUT_NOOP - do not modify the behaviour |
|---|
| 572 | 563 | * SI476X_QOUT_TRISTATE - put the pin in tristate condition, |
|---|
| 573 | 564 | * enable 1MOhm pulldown |
|---|
| .. | .. |
|---|
| 599 | 590 | /** |
|---|
| 600 | 591 | * si476x_cmd_ic_link_gpo_ctl_pin_cfg - send |
|---|
| 601 | 592 | * 'IC_LINK_GPIO_CTL_PIN_CFG' comand to the device |
|---|
| 602 | | - * @core - device to send the command to |
|---|
| 603 | | - * @icin - ICIN pin function configuration: |
|---|
| 593 | + * @core: - device to send the command to |
|---|
| 594 | + * @icin: - ICIN pin function configuration: |
|---|
| 604 | 595 | * SI476X_ICIN_NOOP - do not modify the behaviour |
|---|
| 605 | 596 | * SI476X_ICIN_TRISTATE - put the pin in tristate condition, |
|---|
| 606 | 597 | * enable 1MOhm pulldown |
|---|
| 607 | 598 | * SI476X_ICIN_GPO1_HIGH - set pin to be an output, drive it high |
|---|
| 608 | 599 | * SI476X_ICIN_GPO1_LOW - set pin to be an output, drive it low |
|---|
| 609 | 600 | * SI476X_ICIN_IC_LINK - set the pin to be a part of Inter-Chip link |
|---|
| 610 | | - * @icip - ICIP pin function configuration: |
|---|
| 601 | + * @icip: - ICIP pin function configuration: |
|---|
| 611 | 602 | * SI476X_ICIP_NOOP - do not modify the behaviour |
|---|
| 612 | 603 | * SI476X_ICIP_TRISTATE - put the pin in tristate condition, |
|---|
| 613 | 604 | * enable 1MOhm pulldown |
|---|
| 614 | 605 | * SI476X_ICIP_GPO1_HIGH - set pin to be an output, drive it high |
|---|
| 615 | 606 | * SI476X_ICIP_GPO1_LOW - set pin to be an output, drive it low |
|---|
| 616 | 607 | * SI476X_ICIP_IC_LINK - set the pin to be a part of Inter-Chip link |
|---|
| 617 | | - * @icon - ICON pin function configuration: |
|---|
| 608 | + * @icon: - ICON pin function configuration: |
|---|
| 618 | 609 | * SI476X_ICON_NOOP - do not modify the behaviour |
|---|
| 619 | 610 | * SI476X_ICON_TRISTATE - put the pin in tristate condition, |
|---|
| 620 | 611 | * enable 1MOhm pulldown |
|---|
| 621 | 612 | * SI476X_ICON_I2S - set the pin to be a part of audio |
|---|
| 622 | 613 | * interface in slave mode (DCLK) |
|---|
| 623 | 614 | * SI476X_ICON_IC_LINK - set the pin to be a part of Inter-Chip link |
|---|
| 624 | | - * @icop - ICOP pin function configuration: |
|---|
| 615 | + * @icop: - ICOP pin function configuration: |
|---|
| 625 | 616 | * SI476X_ICOP_NOOP - do not modify the behaviour |
|---|
| 626 | 617 | * SI476X_ICOP_TRISTATE - put the pin in tristate condition, |
|---|
| 627 | 618 | * enable 1MOhm pulldown |
|---|
| .. | .. |
|---|
| 656 | 647 | /** |
|---|
| 657 | 648 | * si476x_cmd_ana_audio_pin_cfg - send 'ANA_AUDIO_PIN_CFG' to the |
|---|
| 658 | 649 | * device |
|---|
| 659 | | - * @core - device to send the command to |
|---|
| 660 | | - * @lrout - LROUT pin function configuration: |
|---|
| 650 | + * @core: - device to send the command to |
|---|
| 651 | + * @lrout: - LROUT pin function configuration: |
|---|
| 661 | 652 | * SI476X_LROUT_NOOP - do not modify the behaviour |
|---|
| 662 | 653 | * SI476X_LROUT_TRISTATE - put the pin in tristate condition, |
|---|
| 663 | 654 | * enable 1MOhm pulldown |
|---|
| .. | .. |
|---|
| 684 | 675 | |
|---|
| 685 | 676 | /** |
|---|
| 686 | 677 | * si476x_cmd_intb_pin_cfg - send 'INTB_PIN_CFG' command to the device |
|---|
| 687 | | - * @core - device to send the command to |
|---|
| 688 | | - * @intb - INTB pin function configuration: |
|---|
| 678 | + * @core: - device to send the command to |
|---|
| 679 | + * @intb: - INTB pin function configuration: |
|---|
| 689 | 680 | * SI476X_INTB_NOOP - do not modify the behaviour |
|---|
| 690 | 681 | * SI476X_INTB_TRISTATE - put the pin in tristate condition, |
|---|
| 691 | 682 | * enable 1MOhm pulldown |
|---|
| 692 | 683 | * SI476X_INTB_DAUDIO - set pin to be a part of digital |
|---|
| 693 | 684 | * audio interface in slave mode |
|---|
| 694 | 685 | * SI476X_INTB_IRQ - set pin to be an interrupt request line |
|---|
| 695 | | - * @a1 - A1 pin function configuration: |
|---|
| 686 | + * @a1: - A1 pin function configuration: |
|---|
| 696 | 687 | * SI476X_A1_NOOP - do not modify the behaviour |
|---|
| 697 | 688 | * SI476X_A1_TRISTATE - put the pin in tristate condition, |
|---|
| 698 | 689 | * enable 1MOhm pulldown |
|---|
| .. | .. |
|---|
| 737 | 728 | /** |
|---|
| 738 | 729 | * si476x_cmd_am_rsq_status - send 'AM_RSQ_STATUS' command to the |
|---|
| 739 | 730 | * device |
|---|
| 740 | | - * @core - device to send the command to |
|---|
| 741 | | - * @rsqack - if set command clears RSQINT, SNRINT, SNRLINT, RSSIHINT, |
|---|
| 742 | | - * RSSSILINT, BLENDINT, MULTHINT and MULTLINT |
|---|
| 743 | | - * @attune - when set the values in the status report are the values |
|---|
| 744 | | - * that were calculated at tune |
|---|
| 745 | | - * @cancel - abort ongoing seek/tune opertation |
|---|
| 746 | | - * @stcack - clear the STCINT bin in status register |
|---|
| 747 | | - * @report - all signal quality information retured by the command |
|---|
| 731 | + * @core: - device to send the command to |
|---|
| 732 | + * @rsqargs: - pointer to a structure containing a group of sub-args |
|---|
| 733 | + * relevant to sending the RSQ status command |
|---|
| 734 | + * @report: - all signal quality information retured by the command |
|---|
| 748 | 735 | * (if NULL then the output of the command is ignored) |
|---|
| 749 | 736 | * |
|---|
| 750 | 737 | * Function returns 0 on success and negative error code on failure |
|---|
| .. | .. |
|---|
| 871 | 858 | /** |
|---|
| 872 | 859 | * si476x_cmd_fm_seek_start - send 'FM_SEEK_START' command to the |
|---|
| 873 | 860 | * device |
|---|
| 874 | | - * @core - device to send the command to |
|---|
| 875 | | - * @seekup - if set the direction of the search is 'up' |
|---|
| 876 | | - * @wrap - if set seek wraps when hitting band limit |
|---|
| 861 | + * @core: - device to send the command to |
|---|
| 862 | + * @seekup: - if set the direction of the search is 'up' |
|---|
| 863 | + * @wrap: - if set seek wraps when hitting band limit |
|---|
| 877 | 864 | * |
|---|
| 878 | 865 | * This function begins search for a valid station. The station is |
|---|
| 879 | 866 | * considered valid when 'FM_VALID_SNR_THRESHOLD' and |
|---|
| .. | .. |
|---|
| 899 | 886 | /** |
|---|
| 900 | 887 | * si476x_cmd_fm_rds_status - send 'FM_RDS_STATUS' command to the |
|---|
| 901 | 888 | * device |
|---|
| 902 | | - * @core - device to send the command to |
|---|
| 903 | | - * @status_only - if set the data is not removed from RDSFIFO, |
|---|
| 889 | + * @core: - device to send the command to |
|---|
| 890 | + * @status_only: - if set the data is not removed from RDSFIFO, |
|---|
| 904 | 891 | * RDSFIFOUSED is not decremented and data in all the |
|---|
| 905 | 892 | * rest RDS data contains the last valid info received |
|---|
| 906 | | - * @mtfifo if set the command clears RDS receive FIFO |
|---|
| 907 | | - * @intack if set the command clards the RDSINT bit. |
|---|
| 893 | + * @mtfifo: if set the command clears RDS receive FIFO |
|---|
| 894 | + * @intack: if set the command clards the RDSINT bit. |
|---|
| 895 | + * @report: - all signal quality information retured by the command |
|---|
| 896 | + * (if NULL then the output of the command is ignored) |
|---|
| 908 | 897 | * |
|---|
| 909 | 898 | * Function returns 0 on success and negative error code on failure |
|---|
| 910 | 899 | */ |
|---|
| .. | .. |
|---|
| 1045 | 1034 | /** |
|---|
| 1046 | 1035 | * si476x_cmd_am_seek_start - send 'FM_SEEK_START' command to the |
|---|
| 1047 | 1036 | * device |
|---|
| 1048 | | - * @core - device to send the command to |
|---|
| 1049 | | - * @seekup - if set the direction of the search is 'up' |
|---|
| 1050 | | - * @wrap - if set seek wraps when hitting band limit |
|---|
| 1037 | + * @core: - device to send the command to |
|---|
| 1038 | + * @seekup: - if set the direction of the search is 'up' |
|---|
| 1039 | + * @wrap: - if set seek wraps when hitting band limit |
|---|
| 1051 | 1040 | * |
|---|
| 1052 | 1041 | * This function begins search for a valid station. The station is |
|---|
| 1053 | 1042 | * considered valid when 'FM_VALID_SNR_THRESHOLD' and |
|---|