From: Dan Carpenter <dan.carpenter@oracle.com>
To: Nam Cao <cvn249@gmail.com>
Cc: gregkh@linuxfoundation.org,
paulo.miguel.almeida.rodenas@gmail.com,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
realwakka@gmail.com
Subject: Re: [PATCH] staging: pi433: allow max bit rate of 300kps
Date: Tue, 15 Mar 2022 21:14:27 +0300 [thread overview]
Message-ID: <20220315181427.GS3293@kadam> (raw)
In-Reply-To: <20220315180820.7393-1-cvn249@gmail.com>
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
prev parent reply other threads:[~2022-03-15 18:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-15 18:08 [PATCH] staging: pi433: allow max bit rate of 300kps Nam Cao
2022-03-15 18:14 ` Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220315181427.GS3293@kadam \
--to=dan.carpenter@oracle.com \
--cc=cvn249@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=paulo.miguel.almeida.rodenas@gmail.com \
--cc=realwakka@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.