lkml.org 
[lkml]   [2022]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: pi433: allow max bit rate of 300kps
On Tue, Mar 15, 2022 at 07:08:20PM +0100, Nam Cao wrote:
> diff --git a/drivers/staging/pi433/TODO b/drivers/staging/pi433/TODO
> index 5cf3fd99d521..8530bbe61d70 100644
> --- a/drivers/staging/pi433/TODO
> +++ b/drivers/staging/pi433/TODO
> @@ -1,5 +1,3 @@
> * currently the code introduces new IOCTLs. I'm afraid this is a bad idea.
> -> Replace this with another interface, hints are welcome!
> * Some missing data (marked with ###) needs to be added in the documentation
> -* Change (struct pi433_tx_cfg)->bit_rate to be a u32 so that we can support
> - bit rates up to 300kbps per the spec.
> diff --git a/drivers/staging/pi433/pi433_if.h b/drivers/staging/pi433/pi433_if.h
> index 25ee0b77a32c..c958dcfa9f96 100644
> --- a/drivers/staging/pi433/pi433_if.h
> +++ b/drivers/staging/pi433/pi433_if.h
> @@ -51,7 +51,7 @@ enum option_on_off {
> #define PI433_TX_CFG_IOCTL_NR 0
> struct pi433_tx_cfg {
> __u32 frequency;
> - __u16 bit_rate;
> + __u32 bit_rate;
> __u32 dev_frequency;
> enum modulation modulation;
> enum mod_shaping mod_shaping;
> @@ -99,7 +99,7 @@ struct pi433_tx_cfg {
> #define PI433_RX_CFG_IOCTL_NR 1
> struct pi433_rx_cfg {
> __u32 frequency;
> - __u16 bit_rate;
> + __u32 bit_rate;
> __u32 dev_frequency;
>
> enum modulation modulation;

You cannot change this because it is part of the UAPI.

Also this API is rubbish. Instead you should create sysfs files to
set the bit_rate.

regards,
dan carpenter

\
 
 \ /
  Last update: 2022-03-15 19:17    [W:0.050 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site