hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/mfd/si476x-cmd.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * drivers/mfd/si476x-cmd.c -- Subroutines implementing command
34 * protocol of si476x series of chips
....@@ -6,16 +7,6 @@
67 * Copyright (C) 2013 Andrey Smirnov
78 *
89 * 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
- *
1910 */
2011
2112 #include <linux/module.h>
....@@ -250,13 +241,13 @@
250241 /**
251242 * si476x_core_send_command() - sends a command to si476x and waits its
252243 * response
253
- * @core: si476x_device structure for the device we are
244
+ * @core: si476x_device structure for the device we are
254245 * communicating with
255246 * @command: command id
256247 * @args: command arguments we are sending
257248 * @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
260251 * @usecs: amount of time to wait before reading the response (in
261252 * usecs)
262253 *
....@@ -505,7 +496,7 @@
505496 * enable 1MOhm pulldown
506497 * SI476X_DFS_DAUDIO - set the pin to be a part of digital
507498 * audio interface
508
- * @dout - DOUT pin function configuration:
499
+ * @dout: - DOUT pin function configuration:
509500 * SI476X_DOUT_NOOP - do not modify the behaviour
510501 * SI476X_DOUT_TRISTATE - put the pin in tristate condition,
511502 * enable 1MOhm pulldown
....@@ -513,7 +504,7 @@
513504 * port 1
514505 * SI476X_DOUT_I2S_INPUT - set this pin to be digital in on I2S
515506 * port 1
516
- * @xout - XOUT pin function configuration:
507
+ * @xout: - XOUT pin function configuration:
517508 * SI476X_XOUT_NOOP - do not modify the behaviour
518509 * SI476X_XOUT_TRISTATE - put the pin in tristate condition,
519510 * enable 1MOhm pulldown
....@@ -549,25 +540,25 @@
549540
550541 /**
551542 * 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:
554545 * SI476X_IQCLK_NOOP - do not modify the behaviour
555546 * SI476X_IQCLK_TRISTATE - put the pin in tristate condition,
556547 * enable 1MOhm pulldown
557548 * SI476X_IQCLK_IQ - set pin to be a part of I/Q interace
558549 * in master mode
559
- * @iqfs - IQFS pin function configuration:
550
+ * @iqfs: - IQFS pin function configuration:
560551 * SI476X_IQFS_NOOP - do not modify the behaviour
561552 * SI476X_IQFS_TRISTATE - put the pin in tristate condition,
562553 * enable 1MOhm pulldown
563554 * SI476X_IQFS_IQ - set pin to be a part of I/Q interace
564555 * in master mode
565
- * @iout - IOUT pin function configuration:
556
+ * @iout: - IOUT pin function configuration:
566557 * SI476X_IOUT_NOOP - do not modify the behaviour
567558 * SI476X_IOUT_TRISTATE - put the pin in tristate condition,
568559 * enable 1MOhm pulldown
569560 * SI476X_IOUT_OUTPUT - set pin to be I out
570
- * @qout - QOUT pin function configuration:
561
+ * @qout: - QOUT pin function configuration:
571562 * SI476X_QOUT_NOOP - do not modify the behaviour
572563 * SI476X_QOUT_TRISTATE - put the pin in tristate condition,
573564 * enable 1MOhm pulldown
....@@ -599,29 +590,29 @@
599590 /**
600591 * si476x_cmd_ic_link_gpo_ctl_pin_cfg - send
601592 * '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:
604595 * SI476X_ICIN_NOOP - do not modify the behaviour
605596 * SI476X_ICIN_TRISTATE - put the pin in tristate condition,
606597 * enable 1MOhm pulldown
607598 * SI476X_ICIN_GPO1_HIGH - set pin to be an output, drive it high
608599 * SI476X_ICIN_GPO1_LOW - set pin to be an output, drive it low
609600 * 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:
611602 * SI476X_ICIP_NOOP - do not modify the behaviour
612603 * SI476X_ICIP_TRISTATE - put the pin in tristate condition,
613604 * enable 1MOhm pulldown
614605 * SI476X_ICIP_GPO1_HIGH - set pin to be an output, drive it high
615606 * SI476X_ICIP_GPO1_LOW - set pin to be an output, drive it low
616607 * 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:
618609 * SI476X_ICON_NOOP - do not modify the behaviour
619610 * SI476X_ICON_TRISTATE - put the pin in tristate condition,
620611 * enable 1MOhm pulldown
621612 * SI476X_ICON_I2S - set the pin to be a part of audio
622613 * interface in slave mode (DCLK)
623614 * 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:
625616 * SI476X_ICOP_NOOP - do not modify the behaviour
626617 * SI476X_ICOP_TRISTATE - put the pin in tristate condition,
627618 * enable 1MOhm pulldown
....@@ -656,8 +647,8 @@
656647 /**
657648 * si476x_cmd_ana_audio_pin_cfg - send 'ANA_AUDIO_PIN_CFG' to the
658649 * 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:
661652 * SI476X_LROUT_NOOP - do not modify the behaviour
662653 * SI476X_LROUT_TRISTATE - put the pin in tristate condition,
663654 * enable 1MOhm pulldown
....@@ -684,15 +675,15 @@
684675
685676 /**
686677 * 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:
689680 * SI476X_INTB_NOOP - do not modify the behaviour
690681 * SI476X_INTB_TRISTATE - put the pin in tristate condition,
691682 * enable 1MOhm pulldown
692683 * SI476X_INTB_DAUDIO - set pin to be a part of digital
693684 * audio interface in slave mode
694685 * SI476X_INTB_IRQ - set pin to be an interrupt request line
695
- * @a1 - A1 pin function configuration:
686
+ * @a1: - A1 pin function configuration:
696687 * SI476X_A1_NOOP - do not modify the behaviour
697688 * SI476X_A1_TRISTATE - put the pin in tristate condition,
698689 * enable 1MOhm pulldown
....@@ -737,14 +728,10 @@
737728 /**
738729 * si476x_cmd_am_rsq_status - send 'AM_RSQ_STATUS' command to the
739730 * 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
748735 * (if NULL then the output of the command is ignored)
749736 *
750737 * Function returns 0 on success and negative error code on failure
....@@ -871,9 +858,9 @@
871858 /**
872859 * si476x_cmd_fm_seek_start - send 'FM_SEEK_START' command to the
873860 * 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
877864 *
878865 * This function begins search for a valid station. The station is
879866 * considered valid when 'FM_VALID_SNR_THRESHOLD' and
....@@ -899,12 +886,14 @@
899886 /**
900887 * si476x_cmd_fm_rds_status - send 'FM_RDS_STATUS' command to the
901888 * 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,
904891 * RDSFIFOUSED is not decremented and data in all the
905892 * 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)
908897 *
909898 * Function returns 0 on success and negative error code on failure
910899 */
....@@ -1045,9 +1034,9 @@
10451034 /**
10461035 * si476x_cmd_am_seek_start - send 'FM_SEEK_START' command to the
10471036 * 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
10511040 *
10521041 * This function begins search for a valid station. The station is
10531042 * considered valid when 'FM_VALID_SNR_THRESHOLD' and