Linux Serial subsystem development
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Neeraj sanjay kale <neeraj.sanjaykale@nxp.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>,
	"marcel@holtmann.org" <marcel@holtmann.org>,
	"johan.hedberg@gmail.com" <johan.hedberg@gmail.com>,
	"luiz.dentz@gmail.com" <luiz.dentz@gmail.com>,
	"jirislaby@kernel.org" <jirislaby@kernel.org>,
	"alok.a.tiwari@oracle.com" <alok.a.tiwari@oracle.com>,
	"hdanton@sina.com" <hdanton@sina.com>,
	"ilpo.jarvinen@linux.intel.com" <ilpo.jarvinen@linux.intel.com>,
	"leon@kernel.org" <leon@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	Amitkumar Karwar <amitkumar.karwar@nxp.com>,
	Rohit Fule <rohit.fule@nxp.com>, Sherry Sun <sherry.sun@nxp.com>
Subject: Re: [PATCH v5] Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets
Date: Thu, 23 Feb 2023 15:02:35 +0100	[thread overview]
Message-ID: <Y/dx+y8enikEP9iu@kroah.com> (raw)
In-Reply-To: <AM9PR04MB8603BD23BC407407316E928AE7AB9@AM9PR04MB8603.eurprd04.prod.outlook.com>

On Thu, Feb 23, 2023 at 01:57:58PM +0000, Neeraj sanjay kale wrote:
> Hi Greg,
> 
> Thank you for your feedback.
> 
> > 
> > > +
> > > +static int init_baudrate = 115200;
> > 
> > and neither will this, as you need to support multiple devices in the system,
> > your driver should never be only able to work with one device.
> > Please make these device-specific things, not the same for the whole driver.
> > 
> 
> I am using this init_baudrate as a module parameter
> static int init_baudrate = 115200;
> module_param(init_baudrate, int, 0444);
> MODULE_PARM_DESC(init_baudrate, "host baudrate after FW download: default=115200");

Ah, totally missed that.

That is not ok, sorry, this is not the 1990's, we do not use module
parameters for drivers as that obviously does not work at all for when
you have multiple devices controlled by that driver.  Please make this
all dynamic and "just work" properly for all devices.

> We need this parameter configurable since different chip module vendors using the same NXP chipset, configure these chips differently.

Then you are pushing the configuration to userspace for someone else to
put on their boot command line?  that's crazy, please never do that.

> For example, module vendor A distributes his modules based on NXP 88w8987 chips with a different configuration compared to module vendor B (based on NXP 88w8987), and the init_baudrate is one of the important distinctions between them.

Then put that logic in DT where it belongs.

> If we are able to keep this init_baudrate configurable, while compiling btnxpuart.ko as module, we will be able to support such baudrate variations.

Again, no, that's not how tty or serial devices work.

thanks,

greg k-h

  reply	other threads:[~2023-02-23 14:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23 10:36 [PATCH v5 0/3] Add support for NXP bluetooth chipsets Neeraj Sanjay Kale
2023-02-23 10:36 ` [PATCH v5 1/3] serdev: Add method to assert break signal over tty UART port Neeraj Sanjay Kale
2023-02-23 10:36 ` [PATCH v5 2/3] dt-bindings: net: Bluetooth: Add NXP bluetooth support Neeraj Sanjay Kale
2023-02-24 11:20   ` Krzysztof Kozlowski
2023-02-23 10:36 ` [PATCH v5] Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets Neeraj Sanjay Kale
2023-02-23 10:48   ` Greg KH
2023-02-23 13:57     ` Neeraj sanjay kale
2023-02-23 14:02       ` Greg KH [this message]
2023-02-23 14:06         ` Neeraj sanjay kale
2023-02-23 11:32   ` Sherry Sun
2023-03-01 15:51     ` Neeraj sanjay kale

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=Y/dx+y8enikEP9iu@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alok.a.tiwari@oracle.com \
    --cc=amitkumar.karwar@nxp.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=hdanton@sina.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jirislaby@kernel.org \
    --cc=johan.hedberg@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=neeraj.sanjaykale@nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=rohit.fule@nxp.com \
    --cc=sherry.sun@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox