LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Min Li <min.li.xe@renesas.com>
Cc: "arnd@arndb.de" <arnd@arndb.de>,
	"derek.kiernan@xilinx.com" <derek.kiernan@xilinx.com>,
	"dragan.cvetic@xilinx.com" <dragan.cvetic@xilinx.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"lee.jones@linaro.or" <lee.jones@linaro.or>
Subject: Re: [PATCH misc v2 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support
Date: Thu, 16 Sep 2021 19:22:43 +0200	[thread overview]
Message-ID: <YUN9Y7+R/+DbRgby@kroah.com> (raw)
In-Reply-To: <OS3PR01MB6593C988FB68699B58609D4ABADC9@OS3PR01MB6593.jpnprd01.prod.outlook.com>

On Thu, Sep 16, 2021 at 05:01:10PM +0000, Min Li wrote:
> 
> 
> > -----Original Message-----
> > From: Greg KH <gregkh@linuxfoundation.org>
> > Sent: September 16, 2021 12:05 PM
> > To: Min Li <min.li.xe@renesas.com>
> > Cc: arnd@arndb.de; derek.kiernan@xilinx.com; dragan.cvetic@xilinx.com;
> > linux-kernel@vger.kernel.org; lee.jones@linaro.or
> > Subject: Re: [PATCH misc v2 2/2] misc: Add Renesas Synchronization
> > Management Unit (SMU) support
> > 
> > On Thu, Sep 16, 2021 at 03:54:52PM +0000, Min Li wrote:
> > > >
> > > > Please put that link in the changelog comment and in the .c code as
> > > > well so that people know where to find it.
> > > >
> > > > > >
> > > > > > Why is this new api not a standard one?
> > > > > >
> > > > >
> > > > > There is no actual standard for the GNSS assisted partial timing
> > > > > support (APTS) In terms of Linux kernel API
> > > >
> > > > Then make one!  :)
> > >
> > > Yes it is on our roadmap to do that for next release
> > 
> > Please do it for this kernel api, otherwise you have to support this for the
> > next 20+ years as-is :(
> > 
> 
> In that case, I would have to get back to you in a few months. If you are rejecting this
> change due to this reason. Please tell me explicitly so that I can copy paste to my manager
> and that would be it. Thanks 

Please come up with a unified api that will work with all devices of
this type, and not a one-off ioctl with random structures in it that are
directly tied to the hardware.

> > > > Why not just do this all from userspace then?  You can have spi/i2c
> > > > userspace code, right?  Why does this have to be a kernel driver?
> > > >
> > > We used to do everything in userspace. But since PHC (ptp hardware
> > > clock) came along, we decided to move the driver part to kernel. Please
> > take a look at drivers/ptp/ptp_clockmatrix.c for reference.
> > > Recently, we have some functions like APTS that doesn't belong to PTP
> > > or anything else so we have to split those functions to RSMU misc driver
> > and i2c/spi bus accesses to RSMU MFD driver.
> > 
> > I still do not understand why this has to be a kernel driver, sorry.
> > What exactly forces it to be that way?
> > 
> That is our management decision since everyone is trying to move their driver to Linux kernel
> to contribute so that we don't have to release the driver to each customer separately. The customer
> can just grab the driver from linux

Don't use the kernel as your distribution method for things that should
not belong in the kernel.  There is no need for creating and maintain
kernel modules for drivers that do not need to be drivers at all.  That
feels like you would be doing extra work here.  Writing a simple
userspace library for this that works for all kernel versions would be
much easier.

thanks,

greg k-h

  reply	other threads:[~2021-09-16 17:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 18:47 [PATCH misc v2 1/2] mfd: rsmu: Resolve naming conflict between idt8a340_reg.h and idt82p33_reg.h min.li.xe
2021-09-15 18:47 ` [PATCH misc v2 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support min.li.xe
2021-09-16  5:25   ` Greg KH
2021-09-16 15:33     ` Min Li
2021-09-16 15:39       ` Greg KH
2021-09-16 15:54         ` Min Li
2021-09-16 16:05           ` Greg KH
2021-09-16 17:01             ` Min Li
2021-09-16 17:22               ` Greg KH [this message]
2021-09-16 11:31   ` kernel test robot
2021-09-16  5:23 ` [PATCH misc v2 1/2] mfd: rsmu: Resolve naming conflict between idt8a340_reg.h and idt82p33_reg.h Greg KH
2021-09-16  5:24 ` Greg KH
2021-09-16 14:49   ` Min Li
  -- strict thread matches above, loose matches on Subject: below --
2021-09-16 16:11 min.li.xe
2021-09-16 16:11 ` [PATCH misc v2 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support min.li.xe
2021-09-16 15:41 [PATCH misc v2 1/2] mfd: rsmu: Resolve naming conflict between idt8a340_reg.h and idt82p33_reg.h min.li.xe
2021-09-16 15:41 ` [PATCH misc v2 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support min.li.xe
2021-09-15 18:11 [PATCH misc v2 1/2] mfd: rsmu: Resolve naming conflict between idt8a340_reg.h and idt82p33_reg.h min.li.xe
2021-09-15 18:11 ` [PATCH misc v2 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support min.li.xe

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=YUN9Y7+R/+DbRgby@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=derek.kiernan@xilinx.com \
    --cc=dragan.cvetic@xilinx.com \
    --cc=lee.jones@linaro.or \
    --cc=linux-kernel@vger.kernel.org \
    --cc=min.li.xe@renesas.com \
    --subject='Re: [PATCH misc v2 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support' \
    /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

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).