Re: [PATCH misc v2 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support

From: Greg KH
Date: Thu Sep 16 2021 - 13:52:03 EST


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 :(

> > 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?

thanks,

greg k-h