[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YGcTC+iUNWEtRXb+@kroah.com>
Date: Fri, 2 Apr 2021 14:50:19 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Loic Poulain <loic.poulain@...aro.org>
Cc: Jakub Kicinski <kuba@...nel.org>,
David Miller <davem@...emloft.net>,
Network Development <netdev@...r.kernel.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Aleksander Morgado <aleksander@...ksander.es>
Subject: Re: [PATCH net-next v6 1/2] net: Add a WWAN subsystem
On Wed, Mar 31, 2021 at 05:30:50PM +0200, Loic Poulain wrote:
> > As it is, the code you have here just implements the misc device layer,
> > but with a new major number? why???
>
> Right, Instead of creating yet another specific character driver for
> WWAN (like usb wdm_class), the goal would be to have at least the WWAN
> control ports being exposed the same way via this WWAN class and cdev.
> Then extend the framework with additional features (e.g. ports ioctls,
> network interface attaching). I agree that for now, it's similar to
> what misc already doing.
>
> From this discussion, I see two options:
> - Move fops implementation to WWAN core.
> - Simply get rid of this generic WWAN layer and just rely on misc for
> exposing the MHI WWAN control ports.
You can use misc, but how many of these are you going to want to have?
You still need a set of fops and handling of the device node in a common
place to ensure that all individual drivers that want to implement a
wwan protocol do it all identically. You can not rely on the individual
drivers to do this, that's exactly what you are trying to prevent here.
So split this up by wwan type and handle that in the "core" you are
creating properly, and then have your hardware driver tie into that.
Just like all other common class api interfaces, nothing new here...
thanks,
greg k-h
Powered by blists - more mailing lists