Re: [PATCH 2/2] mfd: si476x: Do not use binary constants
Hi Geert, On Wed, May 08, 2013 at 10:23:42PM +0200, Geert Uytterhoeven wrote: > Gcc < 4.3 doesn't understand binary constanrs (0b*): > > drivers/mfd/si476x-cmd.c:153:22: error: invalid suffix "b1" on integer > constant > drivers/mfd/si476x-cmd.c:775:20: error: invalid suffix "b1000" on integer > constant > drivers/mfd/si476x-cmd.c:776:20: error: invalid suffix "b0100" on integer > constant > drivers/mfd/si476x-cmd.c:777:21: error: invalid suffix "b0010" on integer > constant > drivers/mfd/si476x-cmd.c:778:21: error: invalid suffix "b0001" on integer > constant > drivers/mfd/si476x-cmd.c:780:17: error: invalid suffix "b1000" on integer > constant > drivers/mfd/si476x-cmd.c:781:22: error: invalid suffix "b0010" on integer > constant > ... > > Hence use hexadecimal constants (0x*) instead. > > Signed-off-by: Geert Uytterhoeven > Cc: Samuel Ortiz > --- > drivers/mfd/si476x-cmd.c | 122 > +++--- > 1 files changed, 61 insertions(+), 61 deletions(-) Applied to mfd-fixes, thanks. Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/2] mfd: si476x: Do not use binary constants
Hi Geert, On Wed, May 08, 2013 at 10:23:42PM +0200, Geert Uytterhoeven wrote: Gcc 4.3 doesn't understand binary constanrs (0b*): drivers/mfd/si476x-cmd.c:153:22: error: invalid suffix b1 on integer constant drivers/mfd/si476x-cmd.c:775:20: error: invalid suffix b1000 on integer constant drivers/mfd/si476x-cmd.c:776:20: error: invalid suffix b0100 on integer constant drivers/mfd/si476x-cmd.c:777:21: error: invalid suffix b0010 on integer constant drivers/mfd/si476x-cmd.c:778:21: error: invalid suffix b0001 on integer constant drivers/mfd/si476x-cmd.c:780:17: error: invalid suffix b1000 on integer constant drivers/mfd/si476x-cmd.c:781:22: error: invalid suffix b0010 on integer constant ... Hence use hexadecimal constants (0x*) instead. Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org Cc: Samuel Ortiz sa...@linux.intel.com --- drivers/mfd/si476x-cmd.c | 122 +++--- 1 files changed, 61 insertions(+), 61 deletions(-) Applied to mfd-fixes, thanks. Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/2] mfd: si476x: Do not use binary constants
On Mon, 2013-05-13 at 07:29 -0700, Andrey Smirnov wrote: > On Wed, May 8, 2013 at 1:23 PM, Geert Uytterhoeven > wrote: > > Gcc < 4.3 doesn't understand binary constanrs (0b*): [] > > Hence use hexadecimal constants (0x*) instead. [] > I really begin to regret my decision to use those constants in place > instead of defining a corresponding symbol in a header file. Because > now that those binary constants are replaced the code looks a little > bit more cryptic. Currently I am doing some additional work on the > driver(adding the support of a different chip) and I'll try to make > patches to address the issue. [] > > diff --git a/drivers/mfd/si476x-cmd.c b/drivers/mfd/si476x-cmd.c [] > > @@ -772,16 +772,16 @@ int si476x_core_cmd_am_rsq_status(struct si476x_core > > *core, [] > > + report->snrhint = 0x08 & resp[1]; > > + report->snrlint = 0x04 & resp[1]; > > + report->rssihint= 0x02 & resp[1]; > > + report->rssilint= 0x01 & resp[1]; You might also want to change all the u8 report variables to bool. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/2] mfd: si476x: Do not use binary constants
On Wed, May 8, 2013 at 1:23 PM, Geert Uytterhoeven wrote: > Gcc < 4.3 doesn't understand binary constanrs (0b*): > > drivers/mfd/si476x-cmd.c:153:22: error: invalid suffix "b1" on integer > constant > drivers/mfd/si476x-cmd.c:775:20: error: invalid suffix "b1000" on integer > constant > drivers/mfd/si476x-cmd.c:776:20: error: invalid suffix "b0100" on integer > constant > drivers/mfd/si476x-cmd.c:777:21: error: invalid suffix "b0010" on integer > constant > drivers/mfd/si476x-cmd.c:778:21: error: invalid suffix "b0001" on integer > constant > drivers/mfd/si476x-cmd.c:780:17: error: invalid suffix "b1000" on integer > constant > drivers/mfd/si476x-cmd.c:781:22: error: invalid suffix "b0010" on integer > constant > ... > > Hence use hexadecimal constants (0x*) instead. > > Signed-off-by: Geert Uytterhoeven > Cc: Samuel Ortiz Acked-by: Andrey Smirnov I really begin to regret my decision to use those constants in place instead of defining a corresponding symbol in a header file. Because now that those binary constants are replaced the code looks a little bit more cryptic. Currently I am doing some additional work on the driver(adding the support of a different chip) and I'll try to make patches to address the issue. > --- > drivers/mfd/si476x-cmd.c | 122 > +++--- > 1 files changed, 61 insertions(+), 61 deletions(-) > > diff --git a/drivers/mfd/si476x-cmd.c b/drivers/mfd/si476x-cmd.c > index de48b4e..f12f016 100644 > --- a/drivers/mfd/si476x-cmd.c > +++ b/drivers/mfd/si476x-cmd.c > @@ -150,7 +150,7 @@ enum si476x_acf_status_report_bits { > SI476X_ACF_SOFTMUTE_INT = (1 << 0), > > SI476X_ACF_SMUTE= (1 << 0), > - SI476X_ACF_SMATTN = 0b1, > + SI476X_ACF_SMATTN = 0x1f, > SI476X_ACF_PILOT= (1 << 7), > SI476X_ACF_STBLEND = ~SI476X_ACF_PILOT, > }; > @@ -772,16 +772,16 @@ int si476x_core_cmd_am_rsq_status(struct si476x_core > *core, > if (!report) > return err; > > - report->snrhint = 0b1000 & resp[1]; > - report->snrlint = 0b0100 & resp[1]; > - report->rssihint= 0b0010 & resp[1]; > - report->rssilint= 0b0001 & resp[1]; > + report->snrhint = 0x08 & resp[1]; > + report->snrlint = 0x04 & resp[1]; > + report->rssihint= 0x02 & resp[1]; > + report->rssilint= 0x01 & resp[1]; > > - report->bltf= 0b1000 & resp[2]; > - report->snr_ready = 0b0010 & resp[2]; > - report->rssiready = 0b1000 & resp[2]; > - report->afcrl = 0b0010 & resp[2]; > - report->valid = 0b0001 & resp[2]; > + report->bltf= 0x80 & resp[2]; > + report->snr_ready = 0x20 & resp[2]; > + report->rssiready = 0x08 & resp[2]; > + report->afcrl = 0x02 & resp[2]; > + report->valid = 0x01 & resp[2]; > > report->readfreq= be16_to_cpup((__be16 *)(resp + 3)); > report->freqoff = resp[5]; > @@ -931,26 +931,26 @@ int si476x_core_cmd_fm_rds_status(struct si476x_core > *core, > if (err < 0 || report == NULL) > return err; > > - report->rdstpptyint = 0b0001 & resp[1]; > - report->rdspiint= 0b1000 & resp[1]; > - report->rdssyncint = 0b0010 & resp[1]; > - report->rdsfifoint = 0b0001 & resp[1]; > + report->rdstpptyint = 0x10 & resp[1]; > + report->rdspiint= 0x08 & resp[1]; > + report->rdssyncint = 0x02 & resp[1]; > + report->rdsfifoint = 0x01 & resp[1]; > > - report->tpptyvalid = 0b0001 & resp[2]; > - report->pivalid = 0b1000 & resp[2]; > - report->rdssync = 0b0010 & resp[2]; > - report->rdsfifolost = 0b0001 & resp[2]; > + report->tpptyvalid = 0x10 & resp[2]; > + report->pivalid = 0x08 & resp[2]; > + report->rdssync = 0x02 & resp[2]; > + report->rdsfifolost = 0x01 & resp[2]; > > - report->tp = 0b0010 & resp[3]; > - report->pty = 0b0001 & resp[3]; > + report->tp = 0x20 & resp[3]; > + report->pty = 0x1f & resp[3]; > > report->pi = be16_to_cpup((__be16 *)(resp + 4)); > report->rdsfifoused = resp[6]; > > - report->ble[V4L2_RDS_BLOCK_A] = 0b1100 & resp[7]; > - report->ble[V4L2_RDS_BLOCK_B] = 0b0011 & resp[7]; > - report->ble[V4L2_RDS_BLOCK_C] = 0b1100 & resp[7]; > - report->ble[V4L2_RDS_BLOCK_D] = 0b0011 & resp[7]; > + report->ble[V4L2_RDS_BLOCK_A] = 0xc0 & resp[7]; > + report->ble[V4L2_RDS_BLOCK_B] = 0x30 & resp[7]; > + report->ble[V4L2_RDS_BLOCK_C]
Re: [PATCH 2/2] mfd: si476x: Do not use binary constants
On Wed, May 8, 2013 at 1:23 PM, Geert Uytterhoeven ge...@linux-m68k.org wrote: Gcc 4.3 doesn't understand binary constanrs (0b*): drivers/mfd/si476x-cmd.c:153:22: error: invalid suffix b1 on integer constant drivers/mfd/si476x-cmd.c:775:20: error: invalid suffix b1000 on integer constant drivers/mfd/si476x-cmd.c:776:20: error: invalid suffix b0100 on integer constant drivers/mfd/si476x-cmd.c:777:21: error: invalid suffix b0010 on integer constant drivers/mfd/si476x-cmd.c:778:21: error: invalid suffix b0001 on integer constant drivers/mfd/si476x-cmd.c:780:17: error: invalid suffix b1000 on integer constant drivers/mfd/si476x-cmd.c:781:22: error: invalid suffix b0010 on integer constant ... Hence use hexadecimal constants (0x*) instead. Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org Cc: Samuel Ortiz sa...@linux.intel.com Acked-by: Andrey Smirnov andrew.smir...@gmail.com I really begin to regret my decision to use those constants in place instead of defining a corresponding symbol in a header file. Because now that those binary constants are replaced the code looks a little bit more cryptic. Currently I am doing some additional work on the driver(adding the support of a different chip) and I'll try to make patches to address the issue. --- drivers/mfd/si476x-cmd.c | 122 +++--- 1 files changed, 61 insertions(+), 61 deletions(-) diff --git a/drivers/mfd/si476x-cmd.c b/drivers/mfd/si476x-cmd.c index de48b4e..f12f016 100644 --- a/drivers/mfd/si476x-cmd.c +++ b/drivers/mfd/si476x-cmd.c @@ -150,7 +150,7 @@ enum si476x_acf_status_report_bits { SI476X_ACF_SOFTMUTE_INT = (1 0), SI476X_ACF_SMUTE= (1 0), - SI476X_ACF_SMATTN = 0b1, + SI476X_ACF_SMATTN = 0x1f, SI476X_ACF_PILOT= (1 7), SI476X_ACF_STBLEND = ~SI476X_ACF_PILOT, }; @@ -772,16 +772,16 @@ int si476x_core_cmd_am_rsq_status(struct si476x_core *core, if (!report) return err; - report-snrhint = 0b1000 resp[1]; - report-snrlint = 0b0100 resp[1]; - report-rssihint= 0b0010 resp[1]; - report-rssilint= 0b0001 resp[1]; + report-snrhint = 0x08 resp[1]; + report-snrlint = 0x04 resp[1]; + report-rssihint= 0x02 resp[1]; + report-rssilint= 0x01 resp[1]; - report-bltf= 0b1000 resp[2]; - report-snr_ready = 0b0010 resp[2]; - report-rssiready = 0b1000 resp[2]; - report-afcrl = 0b0010 resp[2]; - report-valid = 0b0001 resp[2]; + report-bltf= 0x80 resp[2]; + report-snr_ready = 0x20 resp[2]; + report-rssiready = 0x08 resp[2]; + report-afcrl = 0x02 resp[2]; + report-valid = 0x01 resp[2]; report-readfreq= be16_to_cpup((__be16 *)(resp + 3)); report-freqoff = resp[5]; @@ -931,26 +931,26 @@ int si476x_core_cmd_fm_rds_status(struct si476x_core *core, if (err 0 || report == NULL) return err; - report-rdstpptyint = 0b0001 resp[1]; - report-rdspiint= 0b1000 resp[1]; - report-rdssyncint = 0b0010 resp[1]; - report-rdsfifoint = 0b0001 resp[1]; + report-rdstpptyint = 0x10 resp[1]; + report-rdspiint= 0x08 resp[1]; + report-rdssyncint = 0x02 resp[1]; + report-rdsfifoint = 0x01 resp[1]; - report-tpptyvalid = 0b0001 resp[2]; - report-pivalid = 0b1000 resp[2]; - report-rdssync = 0b0010 resp[2]; - report-rdsfifolost = 0b0001 resp[2]; + report-tpptyvalid = 0x10 resp[2]; + report-pivalid = 0x08 resp[2]; + report-rdssync = 0x02 resp[2]; + report-rdsfifolost = 0x01 resp[2]; - report-tp = 0b0010 resp[3]; - report-pty = 0b0001 resp[3]; + report-tp = 0x20 resp[3]; + report-pty = 0x1f resp[3]; report-pi = be16_to_cpup((__be16 *)(resp + 4)); report-rdsfifoused = resp[6]; - report-ble[V4L2_RDS_BLOCK_A] = 0b1100 resp[7]; - report-ble[V4L2_RDS_BLOCK_B] = 0b0011 resp[7]; - report-ble[V4L2_RDS_BLOCK_C] = 0b1100 resp[7]; - report-ble[V4L2_RDS_BLOCK_D] = 0b0011 resp[7]; + report-ble[V4L2_RDS_BLOCK_A] = 0xc0 resp[7]; + report-ble[V4L2_RDS_BLOCK_B] = 0x30 resp[7]; + report-ble[V4L2_RDS_BLOCK_C] = 0x0c resp[7]; + report-ble[V4L2_RDS_BLOCK_D] = 0x03 resp[7]; report-rds[V4L2_RDS_BLOCK_A].block =
Re: [PATCH 2/2] mfd: si476x: Do not use binary constants
On Mon, 2013-05-13 at 07:29 -0700, Andrey Smirnov wrote: On Wed, May 8, 2013 at 1:23 PM, Geert Uytterhoeven ge...@linux-m68k.org wrote: Gcc 4.3 doesn't understand binary constanrs (0b*): [] Hence use hexadecimal constants (0x*) instead. [] I really begin to regret my decision to use those constants in place instead of defining a corresponding symbol in a header file. Because now that those binary constants are replaced the code looks a little bit more cryptic. Currently I am doing some additional work on the driver(adding the support of a different chip) and I'll try to make patches to address the issue. [] diff --git a/drivers/mfd/si476x-cmd.c b/drivers/mfd/si476x-cmd.c [] @@ -772,16 +772,16 @@ int si476x_core_cmd_am_rsq_status(struct si476x_core *core, [] + report-snrhint = 0x08 resp[1]; + report-snrlint = 0x04 resp[1]; + report-rssihint= 0x02 resp[1]; + report-rssilint= 0x01 resp[1]; You might also want to change all the u8 report variables to bool. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/2] mfd: si476x: Do not use binary constants
Gcc < 4.3 doesn't understand binary constanrs (0b*): drivers/mfd/si476x-cmd.c:153:22: error: invalid suffix "b1" on integer constant drivers/mfd/si476x-cmd.c:775:20: error: invalid suffix "b1000" on integer constant drivers/mfd/si476x-cmd.c:776:20: error: invalid suffix "b0100" on integer constant drivers/mfd/si476x-cmd.c:777:21: error: invalid suffix "b0010" on integer constant drivers/mfd/si476x-cmd.c:778:21: error: invalid suffix "b0001" on integer constant drivers/mfd/si476x-cmd.c:780:17: error: invalid suffix "b1000" on integer constant drivers/mfd/si476x-cmd.c:781:22: error: invalid suffix "b0010" on integer constant ... Hence use hexadecimal constants (0x*) instead. Signed-off-by: Geert Uytterhoeven Cc: Samuel Ortiz --- drivers/mfd/si476x-cmd.c | 122 +++--- 1 files changed, 61 insertions(+), 61 deletions(-) diff --git a/drivers/mfd/si476x-cmd.c b/drivers/mfd/si476x-cmd.c index de48b4e..f12f016 100644 --- a/drivers/mfd/si476x-cmd.c +++ b/drivers/mfd/si476x-cmd.c @@ -150,7 +150,7 @@ enum si476x_acf_status_report_bits { SI476X_ACF_SOFTMUTE_INT = (1 << 0), SI476X_ACF_SMUTE= (1 << 0), - SI476X_ACF_SMATTN = 0b1, + SI476X_ACF_SMATTN = 0x1f, SI476X_ACF_PILOT= (1 << 7), SI476X_ACF_STBLEND = ~SI476X_ACF_PILOT, }; @@ -772,16 +772,16 @@ int si476x_core_cmd_am_rsq_status(struct si476x_core *core, if (!report) return err; - report->snrhint = 0b1000 & resp[1]; - report->snrlint = 0b0100 & resp[1]; - report->rssihint= 0b0010 & resp[1]; - report->rssilint= 0b0001 & resp[1]; + report->snrhint = 0x08 & resp[1]; + report->snrlint = 0x04 & resp[1]; + report->rssihint= 0x02 & resp[1]; + report->rssilint= 0x01 & resp[1]; - report->bltf= 0b1000 & resp[2]; - report->snr_ready = 0b0010 & resp[2]; - report->rssiready = 0b1000 & resp[2]; - report->afcrl = 0b0010 & resp[2]; - report->valid = 0b0001 & resp[2]; + report->bltf= 0x80 & resp[2]; + report->snr_ready = 0x20 & resp[2]; + report->rssiready = 0x08 & resp[2]; + report->afcrl = 0x02 & resp[2]; + report->valid = 0x01 & resp[2]; report->readfreq= be16_to_cpup((__be16 *)(resp + 3)); report->freqoff = resp[5]; @@ -931,26 +931,26 @@ int si476x_core_cmd_fm_rds_status(struct si476x_core *core, if (err < 0 || report == NULL) return err; - report->rdstpptyint = 0b0001 & resp[1]; - report->rdspiint= 0b1000 & resp[1]; - report->rdssyncint = 0b0010 & resp[1]; - report->rdsfifoint = 0b0001 & resp[1]; + report->rdstpptyint = 0x10 & resp[1]; + report->rdspiint= 0x08 & resp[1]; + report->rdssyncint = 0x02 & resp[1]; + report->rdsfifoint = 0x01 & resp[1]; - report->tpptyvalid = 0b0001 & resp[2]; - report->pivalid = 0b1000 & resp[2]; - report->rdssync = 0b0010 & resp[2]; - report->rdsfifolost = 0b0001 & resp[2]; + report->tpptyvalid = 0x10 & resp[2]; + report->pivalid = 0x08 & resp[2]; + report->rdssync = 0x02 & resp[2]; + report->rdsfifolost = 0x01 & resp[2]; - report->tp = 0b0010 & resp[3]; - report->pty = 0b0001 & resp[3]; + report->tp = 0x20 & resp[3]; + report->pty = 0x1f & resp[3]; report->pi = be16_to_cpup((__be16 *)(resp + 4)); report->rdsfifoused = resp[6]; - report->ble[V4L2_RDS_BLOCK_A] = 0b1100 & resp[7]; - report->ble[V4L2_RDS_BLOCK_B] = 0b0011 & resp[7]; - report->ble[V4L2_RDS_BLOCK_C] = 0b1100 & resp[7]; - report->ble[V4L2_RDS_BLOCK_D] = 0b0011 & resp[7]; + report->ble[V4L2_RDS_BLOCK_A] = 0xc0 & resp[7]; + report->ble[V4L2_RDS_BLOCK_B] = 0x30 & resp[7]; + report->ble[V4L2_RDS_BLOCK_C] = 0x0c & resp[7]; + report->ble[V4L2_RDS_BLOCK_D] = 0x03 & resp[7]; report->rds[V4L2_RDS_BLOCK_A].block = V4L2_RDS_BLOCK_A; report->rds[V4L2_RDS_BLOCK_A].msb = resp[8]; @@ -1005,7 +1005,7 @@ int si476x_core_cmd_fm_phase_diversity(struct si476x_core *core, { u8 resp[CMD_FM_PHASE_DIVERSITY_NRESP]; const u8 args[CMD_FM_PHASE_DIVERSITY_NARGS] = { - mode & 0b111, + mode & 0x07, }; return si476x_core_send_command(core, CMD_FM_PHASE_DIVERSITY, @@ -1162,7 +1162,7 @@ static int si476x_core_cmd_am_tune_freq_a20(struct si476x_core *core, const int
[PATCH 2/2] mfd: si476x: Do not use binary constants
Gcc 4.3 doesn't understand binary constanrs (0b*): drivers/mfd/si476x-cmd.c:153:22: error: invalid suffix b1 on integer constant drivers/mfd/si476x-cmd.c:775:20: error: invalid suffix b1000 on integer constant drivers/mfd/si476x-cmd.c:776:20: error: invalid suffix b0100 on integer constant drivers/mfd/si476x-cmd.c:777:21: error: invalid suffix b0010 on integer constant drivers/mfd/si476x-cmd.c:778:21: error: invalid suffix b0001 on integer constant drivers/mfd/si476x-cmd.c:780:17: error: invalid suffix b1000 on integer constant drivers/mfd/si476x-cmd.c:781:22: error: invalid suffix b0010 on integer constant ... Hence use hexadecimal constants (0x*) instead. Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org Cc: Samuel Ortiz sa...@linux.intel.com --- drivers/mfd/si476x-cmd.c | 122 +++--- 1 files changed, 61 insertions(+), 61 deletions(-) diff --git a/drivers/mfd/si476x-cmd.c b/drivers/mfd/si476x-cmd.c index de48b4e..f12f016 100644 --- a/drivers/mfd/si476x-cmd.c +++ b/drivers/mfd/si476x-cmd.c @@ -150,7 +150,7 @@ enum si476x_acf_status_report_bits { SI476X_ACF_SOFTMUTE_INT = (1 0), SI476X_ACF_SMUTE= (1 0), - SI476X_ACF_SMATTN = 0b1, + SI476X_ACF_SMATTN = 0x1f, SI476X_ACF_PILOT= (1 7), SI476X_ACF_STBLEND = ~SI476X_ACF_PILOT, }; @@ -772,16 +772,16 @@ int si476x_core_cmd_am_rsq_status(struct si476x_core *core, if (!report) return err; - report-snrhint = 0b1000 resp[1]; - report-snrlint = 0b0100 resp[1]; - report-rssihint= 0b0010 resp[1]; - report-rssilint= 0b0001 resp[1]; + report-snrhint = 0x08 resp[1]; + report-snrlint = 0x04 resp[1]; + report-rssihint= 0x02 resp[1]; + report-rssilint= 0x01 resp[1]; - report-bltf= 0b1000 resp[2]; - report-snr_ready = 0b0010 resp[2]; - report-rssiready = 0b1000 resp[2]; - report-afcrl = 0b0010 resp[2]; - report-valid = 0b0001 resp[2]; + report-bltf= 0x80 resp[2]; + report-snr_ready = 0x20 resp[2]; + report-rssiready = 0x08 resp[2]; + report-afcrl = 0x02 resp[2]; + report-valid = 0x01 resp[2]; report-readfreq= be16_to_cpup((__be16 *)(resp + 3)); report-freqoff = resp[5]; @@ -931,26 +931,26 @@ int si476x_core_cmd_fm_rds_status(struct si476x_core *core, if (err 0 || report == NULL) return err; - report-rdstpptyint = 0b0001 resp[1]; - report-rdspiint= 0b1000 resp[1]; - report-rdssyncint = 0b0010 resp[1]; - report-rdsfifoint = 0b0001 resp[1]; + report-rdstpptyint = 0x10 resp[1]; + report-rdspiint= 0x08 resp[1]; + report-rdssyncint = 0x02 resp[1]; + report-rdsfifoint = 0x01 resp[1]; - report-tpptyvalid = 0b0001 resp[2]; - report-pivalid = 0b1000 resp[2]; - report-rdssync = 0b0010 resp[2]; - report-rdsfifolost = 0b0001 resp[2]; + report-tpptyvalid = 0x10 resp[2]; + report-pivalid = 0x08 resp[2]; + report-rdssync = 0x02 resp[2]; + report-rdsfifolost = 0x01 resp[2]; - report-tp = 0b0010 resp[3]; - report-pty = 0b0001 resp[3]; + report-tp = 0x20 resp[3]; + report-pty = 0x1f resp[3]; report-pi = be16_to_cpup((__be16 *)(resp + 4)); report-rdsfifoused = resp[6]; - report-ble[V4L2_RDS_BLOCK_A] = 0b1100 resp[7]; - report-ble[V4L2_RDS_BLOCK_B] = 0b0011 resp[7]; - report-ble[V4L2_RDS_BLOCK_C] = 0b1100 resp[7]; - report-ble[V4L2_RDS_BLOCK_D] = 0b0011 resp[7]; + report-ble[V4L2_RDS_BLOCK_A] = 0xc0 resp[7]; + report-ble[V4L2_RDS_BLOCK_B] = 0x30 resp[7]; + report-ble[V4L2_RDS_BLOCK_C] = 0x0c resp[7]; + report-ble[V4L2_RDS_BLOCK_D] = 0x03 resp[7]; report-rds[V4L2_RDS_BLOCK_A].block = V4L2_RDS_BLOCK_A; report-rds[V4L2_RDS_BLOCK_A].msb = resp[8]; @@ -1005,7 +1005,7 @@ int si476x_core_cmd_fm_phase_diversity(struct si476x_core *core, { u8 resp[CMD_FM_PHASE_DIVERSITY_NRESP]; const u8 args[CMD_FM_PHASE_DIVERSITY_NARGS] = { - mode 0b111, + mode 0x07, }; return si476x_core_send_command(core, CMD_FM_PHASE_DIVERSITY, @@ -1162,7 +1162,7 @@ static int si476x_core_cmd_am_tune_freq_a20(struct si476x_core *core, const int am_freq = tuneargs-freq; u8 resp[CMD_AM_TUNE_FREQ_NRESP];