From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3435C433ED for ; Fri, 2 Apr 2021 12:50:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85D0061106 for ; Fri, 2 Apr 2021 12:50:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235285AbhDBMuY (ORCPT ); Fri, 2 Apr 2021 08:50:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:55240 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234448AbhDBMuX (ORCPT ); Fri, 2 Apr 2021 08:50:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D4E9D6112F; Fri, 2 Apr 2021 12:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617367822; bh=2+BhoKtezNY/UCp9UYfsS2JcottO+J8/RbhvSq3TYUw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WxA5LZi8F+4xciWdwX6M6nUr1+sDP8sFu7T/cPuZgIvNC416rQKtNOQ77tKeQmzWW EFeYbdi5nGGfMaso8GMTW/xocBSP49MFflVP07Tlzb2JvkkbrJhZmY74eSQVUG4fcV /itjI8q8fWXgkBhTCIaOXWjO7gTtdOt8Jg2AXtAA= Date: Fri, 2 Apr 2021 14:50:19 +0200 From: Greg KH To: Loic Poulain Cc: Jakub Kicinski , David Miller , Network Development , linux-arm-msm , Bjorn Andersson , Manivannan Sadhasivam , Aleksander Morgado Subject: Re: [PATCH net-next v6 1/2] net: Add a WWAN subsystem Message-ID: References: <1617187150-13727-1-git-send-email-loic.poulain@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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