Dear Arnd: > -----Original Message----- > From: Arnd Bergmann <arnd@xxxxxxxx> > Sent: Monday, December 6, 2021 4:04 PM > To: Tony Huang 黃懷厚 <tony.huang@xxxxxxxxxxx> > Cc: Arnd Bergmann <arnd@xxxxxxxx>; Tony Huang > <tonyhuang.sunplus@xxxxxxxxx>; Derek Kiernan <derek.kiernan@xxxxxxxxxx>; > Dragan Cvetic <dragan.cvetic@xxxxxxxxxx>; gregkh > <gregkh@xxxxxxxxxxxxxxxxxxx>; Linux Kernel Mailing List > <linux-kernel@xxxxxxxxxxxxxxx>; Rob Herring <robh+dt@xxxxxxxxxx>; DTML > <devicetree@xxxxxxxxxxxxxxx>; Wells Lu 呂芳騰 <wells.lu@xxxxxxxxxxx> > Subject: Re: [PATCH v2 2/2] misc: Add iop driver for Sunplus SP7021 > > On Mon, Dec 6, 2021 at 4:42 AM Tony Huang 黃懷厚 > <tony.huang@xxxxxxxxxxx> wrote: > > > Subject: Re: [PATCH v2 2/2] misc: Add iop driver for Sunplus SP7021 > > > On Fri, Dec 3, 2021 at 4:48 AM Tony Huang > <tonyhuang.sunplus@xxxxxxxxx> wrote: > > > > + > > > > +static const struct file_operations sp_iop_fops = { > > > > + .owner = THIS_MODULE, > > > > + .open = sp_iop_open, > > > > + .read = sp_iop_read, > > > > + .write = sp_iop_write, > > > > + .release = sp_iop_release, > > > > +}; > > > > > > This does nothing because all the callbacks are empty. You removed > > > the inappropriate user space interfaces as I asked you to, but if > > > there is no way for either kernel or user space to interact with the > > > hardware, I don't see a point in merging the driver until you add a new > interface that is usable. > > > > > > > I will modify sp_iop_read() to monitor IOP mailbox data. > > Why is this a useful interface to have? If this is only for debugging, a tracepoint > may be more useful than a full character device. > Yes, it is for debugging. > > > Something looks wrong here, maybe reread the documentation for > > > runtime power management to find a way of putting the device into > > > low-power mode when it is unused. > > > > > > > When the poweroff command is executed, the run > > sp_iop_platform_driver_poweroff(void) > > function will enter the standby mode. The power off will be executed. > > In the system, IOP can continue to work when other modules in the > > system enter standby / power down modes to monitor whether the system > wakes up through RTC. > > Ok, in that case you can probably just remove the empty callback functions. > > Arnd