i2c: microchip: pci1xxxx: Add driver for I2C host controller in multifunction endpoint of pci1xxxx switch
Subsystems (2)
PATCH v5 1/1 i2c: microchip: pci1xxxx: Add driver for I2C host controller in multifunction endpoint of pci1xxxx switch
Microchip pci1xxxx is an unmanaged PCIe3.1a Switch for Consumer, Industrial and Automotive applications. This switch has multiple downstream ports. In one of the Switch's Downstream port, there is a multifunction endpoint for peripherals which includes an I2C host controller. The I2C function in the endpoint operates at 100KHz, 400KHz and 1 MHz and has buffer depth of 128 bytes.
This patch provides the I2C controller driver for the I2C function of the switch.
---
V4 -> V5:
1. Removed autoprobe
---
V3 -> V4:
1. Removed typecasting for fields of min_t
2. Replaced TRUE with true
---
V2 -> V3:
1. Replaced SIMPLE_DEV_PM_OPS with DEFINE_SIMPLE_DEV_PM_OPS
2. Used devm_add_action API to avoid mixing devm and non-devm APIs
---
RFC -> V2:
1. Removed pci_free_irq_vectors API in code since pcim_enable_device is used
2. Added pci1xxxx_i2c_shutdown API in failure case of pci_alloc_irq_vectors and devm_request_irq
3. Used devm variant of i2c_add_adapter
4. Resolved name collision and fixed styling issues in comments
---
--- MAINTAINERS | 8 + drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-mchp-pci1xxxx.c | 1210 ++++++++++++++++++++++++ 4 files changed, 1229 insertions(+) create mode 100644 drivers/i2c/busses/i2c-mchp-pci1xxxx.c
MAINTAINERS +8 -0
@@ -13110,6 +13110,14 @@ S: Supported F: Documentation/devicetree/bindings/mtd/atmel-nand.txt F: drivers/mtd/nand/raw/atmel/* +MICROCHIP PCI1XXXX I2C DRIVER +M: Tharun Kumar P <[email protected]> +M: Kumaravel Thiagarajan <[email protected]> +M: Microchip Linux Driver Support <[email protected]> +L: [email protected] +S: Maintained +F: drivers/i2c/busses/i2c-mchp-pci1xxxx.c + MICROCHIP PWM DRIVER M: Claudiu Beznea <[email protected]> L: [email protected] (moderated for non-subscribers)
drivers/i2c/busses/Kconfig +10 -0
@@ -1244,6 +1244,16 @@ config I2C_PARPORT This support is also available as a module. If so, the module will be called i2c-parport. +config I2C_PCI1XXXX + tristate "PCI1XXXX I2C Host Adapter" + depends on PCI + help + If you say yes to this option, support will be included for + Microchip PCI1XXXX's I2C interface. + + This driver can also be built as a module. If so, the module will + be called i2c-mchp-pci1xxxx. + config I2C_ROBOTFUZZ_OSIF tristate "RobotFuzz Open Source InterFace USB adapter" depends on USB
drivers/i2c/busses/Makefile +1 -0
@@ -131,6 +131,7 @@ obj-$(CONFIG_I2C_DIOLAN_U2C) += i2c-diolan-u2c.o obj-$(CONFIG_I2C_DLN2) += i2c-dln2.o obj-$(CONFIG_I2C_CP2615) += i2c-cp2615.o obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o +obj-$(CONFIG_I2C_PCI1XXXX) += i2c-mchp-pci1xxxx.o obj-$(CONFIG_I2C_ROBOTFUZZ_OSIF) += i2c-robotfuzz-osif.o obj-$(CONFIG_I2C_TAOS_EVM) += i2c-taos-evm.o obj-$(CONFIG_I2C_TINY_USB) += i2c-tiny-usb.o
drivers/i2c/busses/i2c-mchp-pci1xxxx.c new file +1210 -0
1,210 lines not on this page · raw message
Signature · 1 line
2.25.1
Quoted 32 lines · Tharun Kumar P
Microchip pci1xxxx is an unmanaged PCIe3.1a Switch for Consumer, Industrial and Automotive applications. This switch has multiple downstream ports. In one of the Switch's Downstream port, there is a multifunction endpoint for peripherals which includes an I2C host controller. The I2C function in the endpoint operates at 100KHz, 400KHz and 1 MHz and has buffer depth of 128 bytes.
This patch provides the I2C controller driver for the I2C function of the switch.---
V4 -> V5:
1. Removed autoprobe
---
V3 -> V4:
1. Removed typecasting for fields ofmin_t
2. Replaced TRUE with true
---
V2 -> V3:
1. ReplacedSIMPLE_DEV_PM_OPSwithDEFINE_SIMPLE_DEV_PM_OPS
2. Useddevm_add_actionAPI to avoid mixing devm and non-devm APIs
---
RFC -> V2:
1. Removedpci_free_irq_vectorsAPI in code sincepcim_enable_deviceis used
2. Addedpci1xxxx_i2c_shutdownAPI in failure case ofpci_alloc_irq_vectorsanddevm_request_irq
3. Used devm variant ofi2c_add_adapter
4. Resolved name collision and fixed styling issues in comments
---
Quoted 1 line
Signed-off-by Tharun Kumar P <[email protected]>
There is no SoB tag in your message. Homework: to understand what went wrong and fix in v6. Without SoB tag this may not be considered at all.
Also, if somebody gave you a tag (reviewers/maintainers) in the previous versions, it's your as a contributor responsibility to bear those tags with new versions in case there were no drastic functional changes. Otherwise there is no point to review your changes.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 7 lines · Andy Shevchenko
There is no SoB tag in your message. Homework: to understand what went wrong and fix in v6. Without SoB tag this may not be considered at all.
Also, if somebody gave you a tag (reviewers/maintainers) in the previous versions, it's your as a contributor responsibility to bear those tags with new versions in case there were no drastic functional changes. Otherwise there is no point to review your changes.
Okay Andy. I will address these issues in the upcoming version of the patch.
Thanks,
Tharun Kumar P