staging: pi433: fix CamelCase for syncValues
PATCH 1/8 staging: pi433: fix CamelCase for syncValues
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <syncValues>
--- drivers/staging/pi433/rf69.c | 18 +++++++++--------- drivers/staging/pi433/rf69.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-)
drivers/staging/pi433/rf69.c +9 -9
@@ -645,18 +645,18 @@ int rf69_set_sync_size(struct spi_device *spi, u8 syncSize)return rf69_read_mod_write (spi,REG_SYNC_CONFIG ,MASK_SYNC_CONFIG_SYNC_SIZE , (syncSize <<3 )); } -int rf69_set_sync_values (struct spi_device *spi,u8 syncValues[8 ]) +int rf69_set_sync_values (struct spi_device *spi,u8 sync_values[8 ]) {int retval =0 ; - retval +=rf69_write_reg (spi,REG_SYNCVALUE1 , syncValues[0 ]); - retval +=rf69_write_reg (spi,REG_SYNCVALUE2 , syncValues[1 ]); - retval +=rf69_write_reg (spi,REG_SYNCVALUE3 , syncValues[2 ]); - retval +=rf69_write_reg (spi,REG_SYNCVALUE4 , syncValues[3 ]); - retval +=rf69_write_reg (spi,REG_SYNCVALUE5 , syncValues[4 ]); - retval +=rf69_write_reg (spi,REG_SYNCVALUE6 , syncValues[5 ]); - retval +=rf69_write_reg (spi,REG_SYNCVALUE7 , syncValues[6 ]); - retval +=rf69_write_reg (spi,REG_SYNCVALUE8 , syncValues[7 ]); + retval +=rf69_write_reg (spi,REG_SYNCVALUE1 , sync_values[0 ]); + retval +=rf69_write_reg (spi,REG_SYNCVALUE2 , sync_values[1 ]); + retval +=rf69_write_reg (spi,REG_SYNCVALUE3 , sync_values[2 ]); + retval +=rf69_write_reg (spi,REG_SYNCVALUE4 , sync_values[3 ]); + retval +=rf69_write_reg (spi,REG_SYNCVALUE5 , sync_values[4 ]); + retval +=rf69_write_reg (spi,REG_SYNCVALUE6 , sync_values[5 ]); + retval +=rf69_write_reg (spi,REG_SYNCVALUE7 , sync_values[6 ]); + retval +=rf69_write_reg (spi,REG_SYNCVALUE8 , sync_values[7 ]);return retval; }
drivers/staging/pi433/rf69.h +1 -1
@@ -49,7 +49,7 @@ int rf69_enable_sync(struct spi_device *spi);int rf69_disable_sync (struct spi_device *spi);int rf69_set_fifo_fill_condition (struct spi_device *spi,enum fifo_fill_condition fifo_fill_condition);int rf69_set_sync_size (struct spi_device *spi,u8 sync_size); -int rf69_set_sync_values (struct spi_device *spi,u8 syncValues[8 ]); +int rf69_set_sync_values (struct spi_device *spi,u8 sync_values[8 ]);int rf69_set_packet_format (struct spi_device *spi,enum packetFormat packetFormat);int rf69_enable_crc (struct spi_device *spi);int rf69_disable_crc (struct spi_device *spi);
Signature · 6 lines
2.15.1 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 2/8 staging: pi433: fix CamelCase for powerLevel
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <powerLevel>
--- drivers/staging/pi433/rf69.c | 8 ++++---- drivers/staging/pi433/rf69.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/pi433/rf69.c +4 -4
@@ -330,19 +330,19 @@ int rf69_disable_amplifier(struct spi_device *spi, u8 amplifier_mask)return rf69_clear_bit (spi,REG_PALEVEL , amplifier_mask); } -int rf69_set_output_power_level (struct spi_device *spi,u8 powerLevel) +int rf69_set_output_power_level (struct spi_device *spi,u8 power_level) {// TODO: Dependency to PA0,1,2 setting - powerLevel +=18 ; + power_level +=18 ;// check input value -if (powerLevel >0x1f ) { +if (power_level >0x1f ) {dev_dbg (&spi->dev,"set: illegal input param" );return -EINVAL ; }// write value -return rf69_read_mod_write (spi,REG_PALEVEL ,MASK_PALEVEL_OUTPUT_POWER , powerLevel); +return rf69_read_mod_write (spi,REG_PALEVEL ,MASK_PALEVEL_OUTPUT_POWER , power_level); }int rf69_set_pa_ramp (struct spi_device *spi,enum paRamp paRamp)
drivers/staging/pi433/rf69.h +1 -1
@@ -34,7 +34,7 @@ int rf69_set_deviation(struct spi_device *spi, u32 deviation);int rf69_set_frequency (struct spi_device *spi,u32 frequency);int rf69_enable_amplifier (struct spi_device *spi,u8 amplifier_mask);int rf69_disable_amplifier (struct spi_device *spi,u8 amplifier_mask); -int rf69_set_output_power_level (struct spi_device *spi,u8 powerLevel); +int rf69_set_output_power_level (struct spi_device *spi,u8 power_level);int rf69_set_pa_ramp (struct spi_device *spi,enum paRamp paRamp);int rf69_set_antenna_impedance (struct spi_device *spi,enum antennaImpedance antennaImpedance);int rf69_set_lna_gain (struct spi_device *spi,enum lnaGain lnaGain);
Signature · 6 lines
2.15.1 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 3/8 staging: pi433: fix CamelCase for antennaImpedance
In reply to Valentin VidicFixes checkpatch warnings:
CHECK: Avoid CamelCase: <antennaImpedance>
--- drivers/staging/pi433/Documentation/pi433.txt | 2 +- drivers/staging/pi433/pi433_if.h | 2 +- drivers/staging/pi433/rf69.c | 4 ++-- drivers/staging/pi433/rf69.h | 2 +- drivers/staging/pi433/rf69_enum.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/pi433/Documentation/pi433.txt +1 -1
@@ -192,7 +192,7 @@ rf params: step_4_0db - increase in 4 db steps step_5_0db - increase in 5 db steps step_6_0db - increase in 6 db steps - antennaImpedance + antenna_impedance sets the electrical adoption of the antenna fiftyOhm - for antennas with an impedance of 50Ohm twohundretOhm - for antennas with an impedance of 200Ohm
drivers/staging/pi433/pi433_if.h +1 -1
@@ -116,7 +116,7 @@ struct pi433_rx_cfg {__u8 rssi_threshold;enum thresholdDecrement threshold_decrement; -enum antennaImpedance antenna_impedance; +enum antenna_impedance antenna_impedance;enum lnaGain lna_gain;enum mantisse bw_mantisse;/* normal: 0x50 */ __u8 bw_exponent;/* during AFC: 0x8b */
drivers/staging/pi433/rf69.c +2 -2
@@ -386,9 +386,9 @@ int rf69_set_pa_ramp(struct spi_device *spi, enum paRamp paRamp) } } -int rf69_set_antenna_impedance (struct spi_device *spi,enum antennaImpedance antennaImpedance) +int rf69_set_antenna_impedance (struct spi_device *spi,enum antenna_impedance antenna_impedance) { -switch (antennaImpedance) { +switch (antenna_impedance) {case fiftyOhm:return rf69_clear_bit (spi,REG_LNA ,MASK_LNA_ZIN );case twohundretOhm:
drivers/staging/pi433/rf69.h +1 -1
@@ -36,7 +36,7 @@ int rf69_enable_amplifier(struct spi_device *spi, u8 amplifier_mask);int rf69_disable_amplifier (struct spi_device *spi,u8 amplifier_mask);int rf69_set_output_power_level (struct spi_device *spi,u8 power_level);int rf69_set_pa_ramp (struct spi_device *spi,enum paRamp paRamp); -int rf69_set_antenna_impedance (struct spi_device *spi,enum antennaImpedance antennaImpedance); +int rf69_set_antenna_impedance (struct spi_device *spi,enum antenna_impedance antenna_impedance);int rf69_set_lna_gain (struct spi_device *spi,enum lnaGain lnaGain);int rf69_set_bandwidth (struct spi_device *spi,enum mantisse mantisse,u8 exponent);int rf69_set_bandwidth_during_afc (struct spi_device *spi,enum mantisse mantisse,u8 exponent);
drivers/staging/pi433/rf69_enum.h +1 -1
@@ -60,7 +60,7 @@ enum paRamp { ramp10 }; -enum antennaImpedance { +enum antenna_impedance { fiftyOhm, twohundretOhm };
Signature · 6 lines
2.15.1 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 4/8 staging: pi433: fix CamelCase for Ohm identifiers
In reply to Valentin VidicFixes checkpatch warnings:
CHECK: Avoid CamelCase: <fiftyOhm>
CHECK: Avoid CamelCase: <twohundretOhm>
--- drivers/staging/pi433/Documentation/pi433.txt | 4 ++-- drivers/staging/pi433/pi433_if.c | 2 +- drivers/staging/pi433/rf69.c | 4 ++-- drivers/staging/pi433/rf69_enum.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-)
drivers/staging/pi433/Documentation/pi433.txt +2 -2
@@ -194,8 +194,8 @@ rf params: step_6_0db - increase in 6 db steps antenna_impedance sets the electrical adoption of the antenna - fiftyOhm - for antennas with an impedance of 50Ohm - twohundretOhm - for antennas with an impedance of 200Ohm + fifty_ohm - for antennas with an impedance of 50Ohm + two_hundred_ohm - for antennas with an impedance of 200Ohm lnaGain sets the gain of the low noise amp automatic - lna gain is determined by an agc
drivers/staging/pi433/pi433_if.c +1 -1
@@ -1183,7 +1183,7 @@ static int pi433_probe(struct spi_device *spi) retval =rf69_set_output_power_level (spi,13 );if (retval <0 ) goto minor_failed; - retval =rf69_set_antenna_impedance (spi, fiftyOhm); + retval =rf69_set_antenna_impedance (spi, fifty_ohm);if (retval <0 ) goto minor_failed;
drivers/staging/pi433/rf69.c +2 -2
@@ -389,9 +389,9 @@ int rf69_set_pa_ramp(struct spi_device *spi, enum paRamp paRamp)int rf69_set_antenna_impedance (struct spi_device *spi,enum antenna_impedance antenna_impedance) {switch (antenna_impedance) { -case fiftyOhm: +case fifty_ohm:return rf69_clear_bit (spi,REG_LNA ,MASK_LNA_ZIN ); -case twohundretOhm: +case two_hundred_ohm:return rf69_set_bit (spi,REG_LNA ,MASK_LNA_ZIN );default :dev_dbg (&spi->dev,"set: illegal input param" );
drivers/staging/pi433/rf69_enum.h +2 -2
@@ -61,8 +61,8 @@ enum paRamp { };enum antenna_impedance { - fiftyOhm, - twohundretOhm + fifty_ohm, + two_hundred_ohm };enum lnaGain {
Signature · 6 lines
2.15.1 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 5/8 staging: pi433: fix CamelCase for currentValue
In reply to Valentin VidicLocal variable storing the value for modulation register so replace with modulation_reg.
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <currentValue>
--- drivers/staging/pi433/rf69.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/pi433/rf69.c +3 -3
@@ -151,11 +151,11 @@ int rf69_set_modulation(struct spi_device *spi, enum modulation modulation)static enum modulation rf69_get_modulation (struct spi_device *spi) { -u8 currentValue; +u8 modulation_reg; - currentValue =rf69_read_reg (spi,REG_DATAMODUL ); + modulation_reg =rf69_read_reg (spi,REG_DATAMODUL ); -switch (currentValue &MASK_DATAMODUL_MODULATION_TYPE ) { +switch (modulation_reg &MASK_DATAMODUL_MODULATION_TYPE ) {case DATAMODUL_MODULATION_TYPE_OOK :return OOK ;case DATAMODUL_MODULATION_TYPE_FSK :
Signature · 6 lines
2.15.1 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 6/8 staging: pi433: fix CamelCase for newValue
In reply to Valentin VidicLocal variable storing the new value for bandwidth register so replace with bandwidth.
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <newValue>
--- drivers/staging/pi433/rf69.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/pi433/rf69.c +8 -8
@@ -425,7 +425,7 @@ int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain)static int rf69_set_bandwidth_intern (struct spi_device *spi,u8 reg,enum mantisse mantisse,u8 exponent) { -u8 newValue; +u8 bandwidth;// check value for mantisse and exponent if (exponent >7 ) {
@@ -441,29 +441,29 @@ static int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg, }// read old value - newValue =rf69_read_reg (spi, reg); + bandwidth =rf69_read_reg (spi, reg);// "delete" mantisse and exponent = just keep the DCC setting - newValue = newValue &MASK_BW_DCC_FREQ ; + bandwidth = bandwidth &MASK_BW_DCC_FREQ ;// add new mantisse switch (mantisse) {case mantisse16: - newValue = newValue |BW_MANT_16 ; + bandwidth = bandwidth |BW_MANT_16 ;break ;case mantisse20: - newValue = newValue |BW_MANT_20 ; + bandwidth = bandwidth |BW_MANT_20 ;break ;case mantisse24: - newValue = newValue |BW_MANT_24 ; + bandwidth = bandwidth |BW_MANT_24 ;break ; }// add new exponent - newValue = newValue | exponent; + bandwidth = bandwidth | exponent;// write back -return rf69_write_reg (spi, reg, newValue); +return rf69_write_reg (spi, reg, bandwidth); }int rf69_set_bandwidth (struct spi_device *spi,enum mantisse mantisse,u8 exponent)
Signature · 1 line
2.15.1
PATCH 7/8 staging: pi433: fix CamelCase for regValue
In reply to Valentin VidicLocal variable storing the new value for dio register so replace with dio_value. Update regaddr to dio_addr to match.
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <regValue>
--- drivers/staging/pi433/rf69.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/staging/pi433/rf69.c +12 -12
@@ -505,27 +505,27 @@ int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value) {u8 mask;u8 shift; -u8 regaddr; -u8 regValue; +u8 dio_addr; +u8 dio_value;switch (DIONumber) {case 0 : - mask =MASK_DIO0 ; shift =SHIFT_DIO0 ; regaddr =REG_DIOMAPPING1 ; + mask =MASK_DIO0 ; shift =SHIFT_DIO0 ; dio_addr =REG_DIOMAPPING1 ;break ;case 1 : - mask =MASK_DIO1 ; shift =SHIFT_DIO1 ; regaddr =REG_DIOMAPPING1 ; + mask =MASK_DIO1 ; shift =SHIFT_DIO1 ; dio_addr =REG_DIOMAPPING1 ;break ;case 2 : - mask =MASK_DIO2 ; shift =SHIFT_DIO2 ; regaddr =REG_DIOMAPPING1 ; + mask =MASK_DIO2 ; shift =SHIFT_DIO2 ; dio_addr =REG_DIOMAPPING1 ;break ;case 3 : - mask =MASK_DIO3 ; shift =SHIFT_DIO3 ; regaddr =REG_DIOMAPPING1 ; + mask =MASK_DIO3 ; shift =SHIFT_DIO3 ; dio_addr =REG_DIOMAPPING1 ;break ;case 4 : - mask =MASK_DIO4 ; shift =SHIFT_DIO4 ; regaddr =REG_DIOMAPPING2 ; + mask =MASK_DIO4 ; shift =SHIFT_DIO4 ; dio_addr =REG_DIOMAPPING2 ;break ;case 5 : - mask =MASK_DIO5 ; shift =SHIFT_DIO5 ; regaddr =REG_DIOMAPPING2 ; + mask =MASK_DIO5 ; shift =SHIFT_DIO5 ; dio_addr =REG_DIOMAPPING2 ;break ;default :dev_dbg (&spi->dev,"set: illegal input param" );
@@ -533,13 +533,13 @@ int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value) }// read reg - regValue =rf69_read_reg (spi, regaddr); + dio_value =rf69_read_reg (spi, dio_addr);// delete old value - regValue = regValue & ~mask; + dio_value = dio_value & ~mask;// add new value - regValue = regValue | value << shift; + dio_value = dio_value | value << shift;// write back -return rf69_write_reg (spi, regaddr, regValue); +return rf69_write_reg (spi, dio_addr, dio_value); }bool rf69_get_flag (struct spi_device *spi,enum flag flag)
Signature · 6 lines
2.15.1 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 8/8 staging: pi433: fix CamelCase for DIONumber
In reply to Valentin VidicFixes checkpatch warnings:
CHECK: Avoid CamelCase: <DIONumber>
--- drivers/staging/pi433/rf69.c | 4 ++-- drivers/staging/pi433/rf69.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/pi433/rf69.c +2 -2
@@ -501,14 +501,14 @@ int rf69_set_ook_threshold_dec(struct spi_device *spi, enum thresholdDecrement t } } -int rf69_set_dio_mapping (struct spi_device *spi,u8 DIONumber,u8 value) +int rf69_set_dio_mapping (struct spi_device *spi,u8 dio_number,u8 value) {u8 mask;u8 shift;u8 dio_addr;u8 dio_value; -switch (DIONumber) { +switch (dio_number) {case 0 : mask =MASK_DIO0 ; shift =SHIFT_DIO0 ; dio_addr =REG_DIOMAPPING1 ;break ;
drivers/staging/pi433/rf69.h +1 -1
@@ -41,7 +41,7 @@ int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain);int rf69_set_bandwidth (struct spi_device *spi,enum mantisse mantisse,u8 exponent);int rf69_set_bandwidth_during_afc (struct spi_device *spi,enum mantisse mantisse,u8 exponent);int rf69_set_ook_threshold_dec (struct spi_device *spi,enum thresholdDecrement thresholdDecrement); -int rf69_set_dio_mapping (struct spi_device *spi,u8 DIONumber,u8 value); +int rf69_set_dio_mapping (struct spi_device *spi,u8 dio_number,u8 value);bool rf69_get_flag (struct spi_device *spi,enum flag flag);int rf69_set_rssi_threshold (struct spi_device *spi,u8 threshold);int rf69_set_preamble_length (struct spi_device *spi,u16 preambleLength);
Signature · 6 lines
2.15.1 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel