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

From: Greg KH
Date: Fri Apr 09 2021 - 02:44:08 EST


On Thu, Apr 08, 2021 at 06:59:19PM +0000, Min Li wrote:
> >
> > But what does that have to do with the misc device?
> >
>
> Hi Greg, MFD driver is the start of everything. Once MFD driver is loading, it will spawn 2 devices,
> one is for phc driver, which is under /driver/ptp and the other one is for this misc driver.
> Both PHC and misc drivers are operating on the same device.
> They are both calling exported functions from mfd drivers to access the device through i2c/spi
> and the register definitions are located in include/Linux/mfd/idt8a340_reg.h or idt82p33_reg.h
> depending on which device was found by mfd driver through device tree node.

I don't think it's a good idea to have the same defines with different
values in different files, that's just a problem waiting to happen...

good luck!

greg k-h