Re: [PATCH v8 char-misc-next 4/5] misc: microchip: pci1xxxx: Load auxiliary driver for OTP/EEPROM auxiliary device

From: VaibhaavRam.TL
Date: Thu Mar 30 2023 - 01:30:08 EST


On Wed, 2023-03-29 at 12:02 +0200, Greg KH wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> On Tue, Mar 28, 2023 at 08:10:07PM +0530, Vaibhaav Ram T.L wrote:
> > From: Kumaravel Thiagarajan <kumaravel.thiagarajan@xxxxxxxxxxxxx>
> >
> > This patch contains driver to perform ioremap for the OTP/EEPROM
> > auxiliary device.
>
> What does this mean?  What will it do?  Why is this needed?
In PCI1XXXX, same PCIe function is used for gpio handling as well as
the OTP/EEPROM programming.

Hence, we are loading auxiliary bus driver for the PCIe function and
spawning two separate auxiliary devices for each purpose.

Auxiliary device for OTP/EEPROM includes OTP and EEPROM as separate bin
attributes in its device's attribute_group and maps them into sysfs.

But these bin attributes can be accessed only when the memory resource
of the auxiliary device is mapped into the virtual space of the kernel
which is done by this auxiliary device driver.
>
> thanks,
>
> greg k-h