devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Manjunatha Venkatesh <manjunatha.venkatesh@nxp.com>
Cc: linux-kernel@vger.kernel.org, will@kernel.org, axboe@kernel.dk,
	robh+dt@kernel.org, mb@lightnvm.io,
	ckeepax@opensource.cirrus.com, arnd@arndb.d, mst@redhat.com,
	javier@javigon.com, mikelley@microsoft.com, jasowang@redhat.com,
	sunilmut@microsoft.com, bjorn.andersson@linaro.org,
	krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org,
	ashish.deshpande@nxp.com, rvmanjumce@gmail.com
Subject: Re: [PATCH v5 2/2] misc: nxp-sr1xx: UWB driver support for sr1xx series chip
Date: Wed, 14 Sep 2022 16:53:40 +0200	[thread overview]
Message-ID: <YyHq9OOKBLP2GEcc@kroah.com> (raw)
In-Reply-To: <20220914142944.576482-3-manjunatha.venkatesh@nxp.com>

On Wed, Sep 14, 2022 at 07:59:44PM +0530, Manjunatha Venkatesh wrote:
> --- a/drivers/misc/Kconfig
> +++ b/drivers/misc/Kconfig
> @@ -471,6 +471,17 @@ config HISI_HIKEY_USB
>  	  switching between the dual-role USB-C port and the USB-A host ports
>  	  using only one USB controller.
> 
> +config NXP_UWB
> +    tristate "NXP UCI(Uwb Command Interface) protocol driver support"
> +    depends on SPI
> +    help
> +      This option enables the UWB driver for NXP sr1xx device.
> +      Such device supports UCI packet structure, FiRa compliant.
> +
> +      Say Y here to compile support for nxp-sr1xx into the kernel or
> +      say M to compile it as a module. The module will be called
> +      nxp-sr1xx.ko

No tabs?

> +
>  config OPEN_DICE
>  	tristate "Open Profile for DICE driver"
>  	depends on OF_RESERVED_MEM
> diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
> index 2be8542616dd..ee8ca32c66f6 100644
> --- a/drivers/misc/Makefile
> +++ b/drivers/misc/Makefile
> @@ -60,4 +60,5 @@ obj-$(CONFIG_XILINX_SDFEC)	+= xilinx_sdfec.o
>  obj-$(CONFIG_HISI_HIKEY_USB)	+= hisi_hikey_usb.o
>  obj-$(CONFIG_HI6421V600_IRQ)	+= hi6421v600-irq.o
>  obj-$(CONFIG_OPEN_DICE)		+= open-dice.o
>  obj-$(CONFIG_VCPU_STALL_DETECTOR)	+= vcpu_stall_detector.o
> +obj-$(CONFIG_NXP_UWB) 		+= nxp-sr1xx.o
> diff --git a/drivers/misc/nxp-sr1xx.c b/drivers/misc/nxp-sr1xx.c
> new file mode 100644
> index 000000000000..6ca9a2b54b86
> --- /dev/null
> +++ b/drivers/misc/nxp-sr1xx.c
> @@ -0,0 +1,794 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)

Please no.  If you really want to dual-license your Linux kernel code,
that's fine, but I will insist that you get a signed-off-by from your
corporate lawyer so that I know that they agree with this and are
willing to handle all of the complex issues that this entails as it will
require work on their side over time.

If that's not worth bothering your lawyers over, please just stick with
GPL as the only license.


> +/*
> + * Copyright 2018-2022 NXP.
> + *
> + * SPI driver for UWB SR1xx
> + * Author: Manjunatha Venkatesh <manjunatha.venkatesh@nxp.com>
> + */
> +
> +#include <linux/miscdevice.h>
> +#include <linux/module.h>
> +#include <linux/delay.h>
> +#include <linux/interrupt.h>
> +#include <linux/of_gpio.h>
> +#include <linux/spi/spi.h>
> +#include <linux/uaccess.h>
> +
> +#define SR1XX_MAGIC 0xEA
> +#define SR1XX_SET_PWR _IOW(SR1XX_MAGIC, 0x01, long)
> +#define SR1XX_SET_FWD _IOW(SR1XX_MAGIC, 0x02, long)

You can't stick ioctl command definitions in a .c file that userspace
never sees.  How are your userspace tools supposed to know what the
ioctl is and how it is defined?

How was this ever tested and where is your userspace code that interacts
with this code?

thanks,

greg k-h

  reply	other threads:[~2022-09-14 14:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14 14:29 [PATCH v5 0/2] Uwb: Nxp: Driver for SR1XX SOCs Patch Series Manjunatha Venkatesh
2022-09-14 14:29 ` [PATCH v5 1/2] dt-bindings: uwb: Device tree information for Nxp SR1XX SOCs Manjunatha Venkatesh
2022-09-14 14:36   ` Arnd Bergmann
2022-10-07 11:39     ` [EXT] " Manjunatha Venkatesh
2022-10-07 12:30       ` Krzysztof Kozlowski
2022-09-16 19:26   ` Rob Herring
2022-09-14 14:29 ` [PATCH v5 2/2] misc: nxp-sr1xx: UWB driver support for sr1xx series chip Manjunatha Venkatesh
2022-09-14 14:53   ` Greg KH [this message]
2022-11-30  3:40     ` [EXT] " Manjunatha Venkatesh
2022-11-30  7:27       ` Greg KH
2022-12-20 14:09         ` Manjunatha Venkatesh
2022-12-20 14:30           ` Greg KH
2022-12-20 14:43             ` Manjunatha Venkatesh
2022-09-14 14:55   ` Greg KH
2022-10-07 14:19     ` [EXT] " Manjunatha Venkatesh
2022-09-14 15:09   ` Arnd Bergmann
     [not found]     ` <cd397721-f549-5c65-2c65-35b09c3ea7f9@nxp.com>
2022-10-07 14:11       ` [EXT] " Arnd Bergmann
2022-11-30  3:55         ` Manjunatha Venkatesh
2022-10-07 14:57       ` Greg Kroah-Hartman
2022-11-30  4:09         ` Manjunatha Venkatesh
2022-11-30  7:23           ` Greg Kroah-Hartman
2022-12-20 14:33             ` Manjunatha Venkatesh
2022-12-20 14:51               ` Greg Kroah-Hartman

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=YyHq9OOKBLP2GEcc@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.d \
    --cc=ashish.deshpande@nxp.com \
    --cc=axboe@kernel.dk \
    --cc=bjorn.andersson@linaro.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jasowang@redhat.com \
    --cc=javier@javigon.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manjunatha.venkatesh@nxp.com \
    --cc=mb@lightnvm.io \
    --cc=mikelley@microsoft.com \
    --cc=mst@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=rvmanjumce@gmail.com \
    --cc=sunilmut@microsoft.com \
    --cc=will@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).