Re: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-16 Thread Greg KH
On Tue, Feb 16, 2021 at 07:50:49PM +, Min Li wrote: > > > > Yes, that line. > > > > The documentation should tell you how to do that, as per my patch bot: > > > > - This looks like a new version of a previously submitted patch, but you > > did not list below the --- line any changes from

RE: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-16 Thread Min Li
> > Yes, that line. > > The documentation should tell you how to do that, as per my patch bot: > > - This looks like a new version of a previously submitted patch, but you > did not list below the --- line any changes from the previous version. > Please read the section entitled "The

Re: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-13 Thread Greg KH
On Fri, Feb 12, 2021 at 07:06:17PM +, Min Li wrote: > > > > On Fri, Feb 12, 2021 at 03:44:52PM +, Min Li wrote: > > > > > > > > > > -set combomode > > > > > -get dpll's state > > > > > -get dpll's ffo > > > > > > > > > > This driver must work with Renesas MFD driver to access SMU > > > >

RE: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-12 Thread Min Li
> > On Fri, Feb 12, 2021 at 03:44:52PM +, Min Li wrote: > > > > > > > > -set combomode > > > > -get dpll's state > > > > -get dpll's ffo > > > > > > > > This driver must work with Renesas MFD driver to access SMU > > > > through I2C/SPI. > > > > > > > > Changes since v1: > > > > -Provide more

Re: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-12 Thread Greg KH
On Fri, Feb 12, 2021 at 04:02:14PM +, Min Li wrote: > > > > xilinx_sdfec.c has: > > > > static int xsdfec_dev_open(struct inode *iptr, struct file *fptr) > > { > > return 0; > > } > > > > Which isn't even needed at all, but it is NOT trying to keep people from > >

RE: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-12 Thread Min Li
> > > > If I come up with an rsmu.rst under Documentation/driver-api, is that > something you are looking for? > > No, all sysfs files need to be documented in Documentation/ABI/ > > thanks, > > greg k-h Hi Greg I decided to follow Arnd's suggestion and drop the extra sysfs attributes

RE: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-12 Thread Min Li
> > xilinx_sdfec.c has: > > static int xsdfec_dev_open(struct inode *iptr, struct file *fptr) > { > return 0; > } > > Which isn't even needed at all, but it is NOT trying to keep people from > calling open multiple times. > > As for why the above logic does not

Re: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-12 Thread Greg KH
On Fri, Feb 12, 2021 at 03:44:52PM +, Min Li wrote: > > > > > > -set combomode > > > -get dpll's state > > > -get dpll's ffo > > > > > > This driver must work with Renesas MFD driver to access SMU through > > > I2C/SPI. > > > > > > Changes since v1: > > > -Provide more background for purpose

Re: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-12 Thread Greg KH
On Fri, Feb 12, 2021 at 03:39:03PM +, Min Li wrote: > > > + > > > + /* Only one open per device at a time */ > > > + if (!atomic_dec_and_test(>open_count)) { > > > + atomic_inc(>open_count); > > > + return -EBUSY; > > > > This does not do what you think it does, and does not

RE: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-12 Thread Min Li
> > > > -set combomode > > -get dpll's state > > -get dpll's ffo > > > > This driver must work with Renesas MFD driver to access SMU through > > I2C/SPI. > > > > Changes since v1: > > -Provide more background for purpose of the change. > > -Provide compat_ioctl support > > -Fix ioctl cmd

RE: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-12 Thread Min Li
> > + > > + /* Only one open per device at a time */ > > + if (!atomic_dec_and_test(>open_count)) { > > + atomic_inc(>open_count); > > + return -EBUSY; > > This does not do what you think it does, and does not prevent multiple > applications from talking to your device at

Re: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-11 Thread Greg KH
On Thu, Feb 11, 2021 at 08:16:15PM -0500, min.li...@renesas.com wrote: > From: Min Li > > This driver supports 1588 related functions of ClockMatrix(TM) > and 82P33xxx families of timing and synchronization devices. > > The driver is developed to be only used by Renesas PTP Clock > Manager for

Re: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-11 Thread Greg KH
On Thu, Feb 11, 2021 at 08:16:15PM -0500, min.li...@renesas.com wrote: > +static int > +rsmu_open(struct inode *iptr, struct file *fptr) > +{ > + struct rsmu_cdev *rsmu; > + > + rsmu = container_of(iptr->i_cdev, struct rsmu_cdev, rsmu_cdev); > + if (!rsmu) > + return