All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI
@ 2022-01-05 14:19 Andy Shevchenko
  2022-01-05 14:19 ` [PATCH v3 2/5] i2c: nvidia-gpu: Switch to use i2c_new_ccgx_ucsi() Andy Shevchenko
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Andy Shevchenko @ 2022-01-05 14:19 UTC (permalink / raw)
  To: Wolfram Sang, Andy Shevchenko, linux-kernel, linux-i2c
  Cc: Jarkko Nikula, Mika Westerberg, Ajay Gupta, Shah, Nehal-bakulchandra

Introduce a common module to provide an API to instantiate UCSI device
for Cypress CCGx Type-C controller. Individual bus drivers need to select
this one on demand.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v3: added MODULE_LICENSE(GPL); (Nehal-bakulchandra)
 drivers/i2c/busses/Kconfig         |  7 +++++++
 drivers/i2c/busses/Makefile        |  3 +++
 drivers/i2c/busses/i2c-ccgx-ucsi.c | 30 ++++++++++++++++++++++++++++++
 drivers/i2c/busses/i2c-ccgx-ucsi.h | 11 +++++++++++
 4 files changed, 51 insertions(+)
 create mode 100644 drivers/i2c/busses/i2c-ccgx-ucsi.c
 create mode 100644 drivers/i2c/busses/i2c-ccgx-ucsi.h

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 42da31c1ab70..08e24e396e37 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -9,6 +9,13 @@ menu "I2C Hardware Bus support"
 comment "PC SMBus host controller drivers"
 	depends on PCI
 
+config I2C_CCGX_UCSI
+	tristate
+	help
+	  A common module to provide an API to instantiate UCSI device
+	  for Cypress CCGx Type-C controller. Individual bus drivers
+	  need to select this one on demand.
+
 config I2C_ALI1535
 	tristate "ALI 1535"
 	depends on PCI
diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
index 1d00dce77098..79405cb5d600 100644
--- a/drivers/i2c/busses/Makefile
+++ b/drivers/i2c/busses/Makefile
@@ -6,6 +6,9 @@
 # ACPI drivers
 obj-$(CONFIG_I2C_SCMI)		+= i2c-scmi.o
 
+# Auxiliary I2C/SMBus modules
+obj-$(CONFIG_I2C_CCGX_UCSI)	+= i2c-ccgx-ucsi.o
+
 # PC SMBus host controller drivers
 obj-$(CONFIG_I2C_ALI1535)	+= i2c-ali1535.o
 obj-$(CONFIG_I2C_ALI1563)	+= i2c-ali1563.o
diff --git a/drivers/i2c/busses/i2c-ccgx-ucsi.c b/drivers/i2c/busses/i2c-ccgx-ucsi.c
new file mode 100644
index 000000000000..092dc92dea9f
--- /dev/null
+++ b/drivers/i2c/busses/i2c-ccgx-ucsi.c
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Instantiate UCSI device for Cypress CCGx Type-C controller.
+ * Derived from i2c-designware-pcidrv.c and i2c-nvidia-gpu.c.
+ */
+
+#include <linux/i2c.h>
+#include <linux/export.h>
+#include <linux/module.h>
+#include <linux/string.h>
+
+#include "i2c-ccgx-ucsi.h"
+
+struct software_node;
+
+struct i2c_client *i2c_new_ccgx_ucsi(struct i2c_adapter *adapter, int irq,
+				     const struct software_node *swnode)
+{
+	struct i2c_board_info info = {};
+
+	strscpy(info.type, "ccgx-ucsi", sizeof(info.type));
+	info.addr = 0x08;
+	info.irq = irq;
+	info.swnode = swnode;
+
+	return i2c_new_client_device(adapter, &info);
+}
+EXPORT_SYMBOL_GPL(i2c_new_ccgx_ucsi);
+
+MODULE_LICENSE("GPL");
diff --git a/drivers/i2c/busses/i2c-ccgx-ucsi.h b/drivers/i2c/busses/i2c-ccgx-ucsi.h
new file mode 100644
index 000000000000..739ac7a4b117
--- /dev/null
+++ b/drivers/i2c/busses/i2c-ccgx-ucsi.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+#ifndef __I2C_CCGX_UCSI_H_
+#define __I2C_CCGX_UCSI_H_
+
+struct i2c_adapter;
+struct i2c_client;
+struct software_node;
+
+struct i2c_client *i2c_new_ccgx_ucsi(struct i2c_adapter *adapter, int irq,
+				     const struct software_node *swnode);
+#endif /* __I2C_CCGX_UCSI_H_ */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v3 2/5] i2c: nvidia-gpu: Switch to use i2c_new_ccgx_ucsi()
  2022-01-05 14:19 [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI Andy Shevchenko
@ 2022-01-05 14:19 ` Andy Shevchenko
  2022-02-15  9:08   ` Wolfram Sang
  2022-01-05 14:19 ` [PATCH v3 3/5] i2c: nvidia-gpu: Use temporary variable for struct device Andy Shevchenko
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 19+ messages in thread
From: Andy Shevchenko @ 2022-01-05 14:19 UTC (permalink / raw)
  To: Wolfram Sang, Andy Shevchenko, linux-kernel, linux-i2c
  Cc: Jarkko Nikula, Mika Westerberg, Ajay Gupta, Shah, Nehal-bakulchandra

Instead of open coded variant switch to use i2c_new_ccgx_ucsi().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v3: no changes
 drivers/i2c/busses/Kconfig          |  1 +
 drivers/i2c/busses/i2c-nvidia-gpu.c | 26 ++++++--------------------
 2 files changed, 7 insertions(+), 20 deletions(-)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 08e24e396e37..0c9b089d1456 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -252,6 +252,7 @@ config I2C_NFORCE2_S4985
 config I2C_NVIDIA_GPU
 	tristate "NVIDIA GPU I2C controller"
 	depends on PCI
+	select I2C_CCGX_UCSI
 	help
 	  If you say yes to this option, support will be included for the
 	  NVIDIA GPU I2C controller which is used to communicate with the GPU's
diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
index b5055a3cbd93..8117c3674209 100644
--- a/drivers/i2c/busses/i2c-nvidia-gpu.c
+++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
@@ -17,6 +17,8 @@
 
 #include <asm/unaligned.h>
 
+#include "i2c-ccgx-ucsi.h"
+
 /* I2C definitions */
 #define I2C_MST_CNTL				0x00
 #define I2C_MST_CNTL_GEN_START			BIT(0)
@@ -266,23 +268,6 @@ static const struct software_node ccgx_node = {
 	.properties = ccgx_props,
 };
 
-static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq)
-{
-	i2cd->gpu_ccgx_ucsi = devm_kzalloc(i2cd->dev,
-					   sizeof(*i2cd->gpu_ccgx_ucsi),
-					   GFP_KERNEL);
-	if (!i2cd->gpu_ccgx_ucsi)
-		return -ENOMEM;
-
-	strlcpy(i2cd->gpu_ccgx_ucsi->type, "ccgx-ucsi",
-		sizeof(i2cd->gpu_ccgx_ucsi->type));
-	i2cd->gpu_ccgx_ucsi->addr = 0x8;
-	i2cd->gpu_ccgx_ucsi->irq = irq;
-	i2cd->gpu_ccgx_ucsi->swnode = &ccgx_node;
-	i2cd->ccgx_client = i2c_new_client_device(&i2cd->adapter, i2cd->gpu_ccgx_ucsi);
-	return PTR_ERR_OR_ZERO(i2cd->ccgx_client);
-}
-
 static int gpu_i2c_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	struct gpu_i2c_dev *i2cd;
@@ -328,9 +313,10 @@ static int gpu_i2c_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	if (status < 0)
 		goto free_irq_vectors;
 
-	status = gpu_populate_client(i2cd, pdev->irq);
-	if (status < 0) {
-		dev_err(&pdev->dev, "gpu_populate_client failed %d\n", status);
+	i2cd->ccgx_client = i2c_new_ccgx_ucsi(&i2cd->adapter, pdev->irq, &ccgx_node);
+	if (IS_ERR(i2cd->ccgx_client)) {
+		status = dev_err_probe(&pdev->dev, PTR_ERR(i2cd->ccgx_client),
+				       "register UCSI failed\n");
 		goto del_adapter;
 	}
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v3 3/5] i2c: nvidia-gpu: Use temporary variable for struct device
  2022-01-05 14:19 [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI Andy Shevchenko
  2022-01-05 14:19 ` [PATCH v3 2/5] i2c: nvidia-gpu: Switch to use i2c_new_ccgx_ucsi() Andy Shevchenko
@ 2022-01-05 14:19 ` Andy Shevchenko
  2022-02-15  9:08   ` Wolfram Sang
  2022-01-05 14:19 ` [PATCH v3 4/5] i2c: nvidia-gpu: Convert to use dev_err_probe() Andy Shevchenko
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 19+ messages in thread
From: Andy Shevchenko @ 2022-01-05 14:19 UTC (permalink / raw)
  To: Wolfram Sang, Andy Shevchenko, linux-kernel, linux-i2c
  Cc: Jarkko Nikula, Mika Westerberg, Ajay Gupta, Shah, Nehal-bakulchandra

Use temporary variable for struct device to make code neater.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v3: no changes
 drivers/i2c/busses/i2c-nvidia-gpu.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
index 8117c3674209..a82be377146e 100644
--- a/drivers/i2c/busses/i2c-nvidia-gpu.c
+++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
@@ -270,19 +270,20 @@ static const struct software_node ccgx_node = {
 
 static int gpu_i2c_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 {
+	struct device *dev = &pdev->dev;
 	struct gpu_i2c_dev *i2cd;
 	int status;
 
-	i2cd = devm_kzalloc(&pdev->dev, sizeof(*i2cd), GFP_KERNEL);
+	i2cd = devm_kzalloc(dev, sizeof(*i2cd), GFP_KERNEL);
 	if (!i2cd)
 		return -ENOMEM;
 
-	i2cd->dev = &pdev->dev;
-	dev_set_drvdata(&pdev->dev, i2cd);
+	i2cd->dev = dev;
+	dev_set_drvdata(dev, i2cd);
 
 	status = pcim_enable_device(pdev);
 	if (status < 0) {
-		dev_err(&pdev->dev, "pcim_enable_device failed %d\n", status);
+		dev_err(dev, "pcim_enable_device failed %d\n", status);
 		return status;
 	}
 
@@ -290,13 +291,13 @@ static int gpu_i2c_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	i2cd->regs = pcim_iomap(pdev, 0, 0);
 	if (!i2cd->regs) {
-		dev_err(&pdev->dev, "pcim_iomap failed\n");
+		dev_err(dev, "pcim_iomap failed\n");
 		return -ENOMEM;
 	}
 
 	status = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI);
 	if (status < 0) {
-		dev_err(&pdev->dev, "pci_alloc_irq_vectors err %d\n", status);
+		dev_err(dev, "pci_alloc_irq_vectors err %d\n", status);
 		return status;
 	}
 
@@ -308,22 +309,21 @@ static int gpu_i2c_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		sizeof(i2cd->adapter.name));
 	i2cd->adapter.algo = &gpu_i2c_algorithm;
 	i2cd->adapter.quirks = &gpu_i2c_quirks;
-	i2cd->adapter.dev.parent = &pdev->dev;
+	i2cd->adapter.dev.parent = dev;
 	status = i2c_add_adapter(&i2cd->adapter);
 	if (status < 0)
 		goto free_irq_vectors;
 
 	i2cd->ccgx_client = i2c_new_ccgx_ucsi(&i2cd->adapter, pdev->irq, &ccgx_node);
 	if (IS_ERR(i2cd->ccgx_client)) {
-		status = dev_err_probe(&pdev->dev, PTR_ERR(i2cd->ccgx_client),
-				       "register UCSI failed\n");
+		status = dev_err_probe(dev, PTR_ERR(i2cd->ccgx_client), "register UCSI failed\n");
 		goto del_adapter;
 	}
 
-	pm_runtime_set_autosuspend_delay(&pdev->dev, 3000);
-	pm_runtime_use_autosuspend(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
-	pm_runtime_allow(&pdev->dev);
+	pm_runtime_set_autosuspend_delay(dev, 3000);
+	pm_runtime_use_autosuspend(dev);
+	pm_runtime_put_autosuspend(dev);
+	pm_runtime_allow(dev);
 
 	return 0;
 
@@ -336,7 +336,7 @@ static int gpu_i2c_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 static void gpu_i2c_remove(struct pci_dev *pdev)
 {
-	struct gpu_i2c_dev *i2cd = dev_get_drvdata(&pdev->dev);
+	struct gpu_i2c_dev *i2cd = pci_get_drvdata(pdev);
 
 	pm_runtime_get_noresume(i2cd->dev);
 	i2c_del_adapter(&i2cd->adapter);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v3 4/5] i2c: nvidia-gpu: Convert to use dev_err_probe()
  2022-01-05 14:19 [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI Andy Shevchenko
  2022-01-05 14:19 ` [PATCH v3 2/5] i2c: nvidia-gpu: Switch to use i2c_new_ccgx_ucsi() Andy Shevchenko
  2022-01-05 14:19 ` [PATCH v3 3/5] i2c: nvidia-gpu: Use temporary variable for struct device Andy Shevchenko
@ 2022-01-05 14:19 ` Andy Shevchenko
  2022-02-15  9:08   ` Wolfram Sang
  2022-01-05 14:19 ` [PATCH v3 5/5] i2c: designware-pci: Switch to use i2c_new_ccgx_ucsi() Andy Shevchenko
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 19+ messages in thread
From: Andy Shevchenko @ 2022-01-05 14:19 UTC (permalink / raw)
  To: Wolfram Sang, Andy Shevchenko, linux-kernel, linux-i2c
  Cc: Jarkko Nikula, Mika Westerberg, Ajay Gupta, Shah, Nehal-bakulchandra

It's fine to call dev_err_probe() in ->probe() when error code is known.
Convert the driver to use dev_err_probe().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v3: no changes
 drivers/i2c/busses/i2c-nvidia-gpu.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
index a82be377146e..6920c1b9a126 100644
--- a/drivers/i2c/busses/i2c-nvidia-gpu.c
+++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
@@ -282,24 +282,18 @@ static int gpu_i2c_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	dev_set_drvdata(dev, i2cd);
 
 	status = pcim_enable_device(pdev);
-	if (status < 0) {
-		dev_err(dev, "pcim_enable_device failed %d\n", status);
-		return status;
-	}
+	if (status < 0)
+		return dev_err_probe(dev, status, "pcim_enable_device failed\n");
 
 	pci_set_master(pdev);
 
 	i2cd->regs = pcim_iomap(pdev, 0, 0);
-	if (!i2cd->regs) {
-		dev_err(dev, "pcim_iomap failed\n");
-		return -ENOMEM;
-	}
+	if (!i2cd->regs)
+		return dev_err_probe(dev, -ENOMEM, "pcim_iomap failed\n");
 
 	status = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI);
-	if (status < 0) {
-		dev_err(dev, "pci_alloc_irq_vectors err %d\n", status);
-		return status;
-	}
+	if (status < 0)
+		return dev_err_probe(dev, status, "pci_alloc_irq_vectors err\n");
 
 	gpu_enable_i2c_bus(i2cd);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v3 5/5] i2c: designware-pci: Switch to use i2c_new_ccgx_ucsi()
  2022-01-05 14:19 [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI Andy Shevchenko
                   ` (2 preceding siblings ...)
  2022-01-05 14:19 ` [PATCH v3 4/5] i2c: nvidia-gpu: Convert to use dev_err_probe() Andy Shevchenko
@ 2022-01-05 14:19 ` Andy Shevchenko
  2022-02-15  9:08   ` Wolfram Sang
  2022-01-24 15:06 ` [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI Andy Shevchenko
  2022-02-15  9:07 ` Wolfram Sang
  5 siblings, 1 reply; 19+ messages in thread
From: Andy Shevchenko @ 2022-01-05 14:19 UTC (permalink / raw)
  To: Wolfram Sang, Andy Shevchenko, linux-kernel, linux-i2c
  Cc: Jarkko Nikula, Mika Westerberg, Ajay Gupta, Shah, Nehal-bakulchandra

Instead of open coded variant switch to use i2c_new_ccgx_ucsi().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
v3: added tag (Jarkko)
 drivers/i2c/busses/Kconfig                 |  1 +
 drivers/i2c/busses/i2c-designware-pcidrv.c | 30 ++++------------------
 2 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 0c9b089d1456..e2e8ae7ed2a7 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -578,6 +578,7 @@ config I2C_DESIGNWARE_PCI
 	tristate "Synopsys DesignWare PCI"
 	depends on PCI
 	select I2C_DESIGNWARE_CORE
+	select I2C_CCGX_UCSI
 	help
 	  If you say yes to this option, support will be included for the
 	  Synopsys DesignWare I2C adapter. Only master mode is supported.
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index ef4250f8852b..2782dddfb087 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -24,6 +24,7 @@
 #include <linux/slab.h>
 
 #include "i2c-designware-core.h"
+#include "i2c-ccgx-ucsi.h"
 
 #define DRIVER_NAME "i2c-designware-pci"
 #define AMD_CLK_RATE_HZ	100000
@@ -125,26 +126,6 @@ static int mfld_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
 	return -ENODEV;
 }
 
- /*
-  * TODO find a better way how to deduplicate instantiation
-  * of USB PD slave device from nVidia GPU driver.
-  */
-static int navi_amd_register_client(struct dw_i2c_dev *dev)
-{
-	struct i2c_board_info	info;
-
-	memset(&info, 0, sizeof(struct i2c_board_info));
-	strscpy(info.type, "ccgx-ucsi", I2C_NAME_SIZE);
-	info.addr = 0x08;
-	info.irq = dev->irq;
-
-	dev->slave = i2c_new_client_device(&dev->adapter, &info);
-	if (IS_ERR(dev->slave))
-		return PTR_ERR(dev->slave);
-
-	return 0;
-}
-
 static int navi_amd_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
 {
 	struct dw_i2c_dev *dev = dev_get_drvdata(&pdev->dev);
@@ -325,11 +306,10 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
 	}
 
 	if ((dev->flags & MODEL_MASK) == MODEL_AMD_NAVI_GPU) {
-		r = navi_amd_register_client(dev);
-		if (r) {
-			dev_err(dev->dev, "register client failed with %d\n", r);
-			return r;
-		}
+		dev->slave = i2c_new_ccgx_ucsi(&dev->adapter, dev->irq, NULL);
+		if (IS_ERR(dev->slave))
+			return dev_err_probe(dev->dev, PTR_ERR(dev->slave),
+					     "register UCSI failed\n");
 	}
 
 	pm_runtime_set_autosuspend_delay(&pdev->dev, 1000);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI
  2022-01-05 14:19 [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI Andy Shevchenko
                   ` (3 preceding siblings ...)
  2022-01-05 14:19 ` [PATCH v3 5/5] i2c: designware-pci: Switch to use i2c_new_ccgx_ucsi() Andy Shevchenko
@ 2022-01-24 15:06 ` Andy Shevchenko
  2022-02-07 13:13   ` Andy Shevchenko
  2022-02-15  9:07 ` Wolfram Sang
  5 siblings, 1 reply; 19+ messages in thread
From: Andy Shevchenko @ 2022-01-24 15:06 UTC (permalink / raw)
  To: Wolfram Sang, linux-kernel, linux-i2c
  Cc: Jarkko Nikula, Mika Westerberg, Ajay Gupta, Shah, Nehal-bakulchandra

On Wed, Jan 05, 2022 at 04:19:31PM +0200, Andy Shevchenko wrote:
> Introduce a common module to provide an API to instantiate UCSI device
> for Cypress CCGx Type-C controller. Individual bus drivers need to select
> this one on demand.

Ajay, is it possible to get your tag on the series, please?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI
  2022-01-24 15:06 ` [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI Andy Shevchenko
@ 2022-02-07 13:13   ` Andy Shevchenko
  2022-02-07 14:14     ` Wolfram Sang
  0 siblings, 1 reply; 19+ messages in thread
From: Andy Shevchenko @ 2022-02-07 13:13 UTC (permalink / raw)
  To: Wolfram Sang, linux-kernel, linux-i2c
  Cc: Jarkko Nikula, Mika Westerberg, Ajay Gupta, Shah, Nehal-bakulchandra

On Mon, Jan 24, 2022 at 05:06:47PM +0200, Andy Shevchenko wrote:
> On Wed, Jan 05, 2022 at 04:19:31PM +0200, Andy Shevchenko wrote:
> > Introduce a common module to provide an API to instantiate UCSI device
> > for Cypress CCGx Type-C controller. Individual bus drivers need to select
> > this one on demand.
> 
> Ajay, is it possible to get your tag on the series, please?

Wolfram, can you remind, please, what the process is, if there is
a non-responsive (in a meaningful period of time) maintainer?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI
  2022-02-07 13:13   ` Andy Shevchenko
@ 2022-02-07 14:14     ` Wolfram Sang
  2022-02-07 14:39       ` Andy Shevchenko
  0 siblings, 1 reply; 19+ messages in thread
From: Wolfram Sang @ 2022-02-07 14:14 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-kernel, linux-i2c, Jarkko Nikula, Mika Westerberg,
	Ajay Gupta, Shah, Nehal-bakulchandra

[-- Attachment #1: Type: text/plain, Size: 425 bytes --]


> > Ajay, is it possible to get your tag on the series, please?
> 
> Wolfram, can you remind, please, what the process is, if there is
> a non-responsive (in a meaningful period of time) maintainer?

Well, I can apply patches if there is no response but interest and
reasonable trust, of course. Your series has interest and trust. But
still, it may be nice to ping active people from Nvidia and ask about
Ajay.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI
  2022-02-07 14:14     ` Wolfram Sang
@ 2022-02-07 14:39       ` Andy Shevchenko
  2022-02-15  9:10         ` Wolfram Sang
  0 siblings, 1 reply; 19+ messages in thread
From: Andy Shevchenko @ 2022-02-07 14:39 UTC (permalink / raw)
  To: Wolfram Sang, linux-kernel, linux-i2c, Jarkko Nikula,
	Mika Westerberg, Ajay Gupta, Shah, Nehal-bakulchandra
  Cc: Thierry Reding, Amit Cohen, Nikolay Aleksandrov, Sameer Pujar

On Mon, Feb 07, 2022 at 03:14:56PM +0100, Wolfram Sang wrote:
> 
> > > Ajay, is it possible to get your tag on the series, please?
> > 
> > Wolfram, can you remind, please, what the process is, if there is
> > a non-responsive (in a meaningful period of time) maintainer?
> 
> Well, I can apply patches if there is no response but interest and
> reasonable trust, of course. Your series has interest and trust. But
> still, it may be nice to ping active people from Nvidia and ask about
> Ajay.

Okay, I have Cc'ed this message to the people whose addresses I found in the
changes in the Git history of the vanilla kernel with most frequent appearance.

The Q is who is on nVidia side is responsible now for I²C controller driver?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI
  2022-01-05 14:19 [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI Andy Shevchenko
                   ` (4 preceding siblings ...)
  2022-01-24 15:06 ` [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI Andy Shevchenko
@ 2022-02-15  9:07 ` Wolfram Sang
  2022-02-15  9:46   ` Andy Shevchenko
  5 siblings, 1 reply; 19+ messages in thread
From: Wolfram Sang @ 2022-02-15  9:07 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-kernel, linux-i2c, Jarkko Nikula, Mika Westerberg,
	Ajay Gupta, Shah, Nehal-bakulchandra

[-- Attachment #1: Type: text/plain, Size: 348 bytes --]

On Wed, Jan 05, 2022 at 04:19:31PM +0200, Andy Shevchenko wrote:
> Introduce a common module to provide an API to instantiate UCSI device
> for Cypress CCGx Type-C controller. Individual bus drivers need to select
> this one on demand.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 2/5] i2c: nvidia-gpu: Switch to use i2c_new_ccgx_ucsi()
  2022-01-05 14:19 ` [PATCH v3 2/5] i2c: nvidia-gpu: Switch to use i2c_new_ccgx_ucsi() Andy Shevchenko
@ 2022-02-15  9:08   ` Wolfram Sang
  0 siblings, 0 replies; 19+ messages in thread
From: Wolfram Sang @ 2022-02-15  9:08 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-kernel, linux-i2c, Jarkko Nikula, Mika Westerberg,
	Ajay Gupta, Shah, Nehal-bakulchandra

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

On Wed, Jan 05, 2022 at 04:19:32PM +0200, Andy Shevchenko wrote:
> Instead of open coded variant switch to use i2c_new_ccgx_ucsi().
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 3/5] i2c: nvidia-gpu: Use temporary variable for struct device
  2022-01-05 14:19 ` [PATCH v3 3/5] i2c: nvidia-gpu: Use temporary variable for struct device Andy Shevchenko
@ 2022-02-15  9:08   ` Wolfram Sang
  0 siblings, 0 replies; 19+ messages in thread
From: Wolfram Sang @ 2022-02-15  9:08 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-kernel, linux-i2c, Jarkko Nikula, Mika Westerberg,
	Ajay Gupta, Shah, Nehal-bakulchandra

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]

On Wed, Jan 05, 2022 at 04:19:33PM +0200, Andy Shevchenko wrote:
> Use temporary variable for struct device to make code neater.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 4/5] i2c: nvidia-gpu: Convert to use dev_err_probe()
  2022-01-05 14:19 ` [PATCH v3 4/5] i2c: nvidia-gpu: Convert to use dev_err_probe() Andy Shevchenko
@ 2022-02-15  9:08   ` Wolfram Sang
  0 siblings, 0 replies; 19+ messages in thread
From: Wolfram Sang @ 2022-02-15  9:08 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-kernel, linux-i2c, Jarkko Nikula, Mika Westerberg,
	Ajay Gupta, Shah, Nehal-bakulchandra

[-- Attachment #1: Type: text/plain, Size: 296 bytes --]

On Wed, Jan 05, 2022 at 04:19:34PM +0200, Andy Shevchenko wrote:
> It's fine to call dev_err_probe() in ->probe() when error code is known.
> Convert the driver to use dev_err_probe().
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 5/5] i2c: designware-pci: Switch to use i2c_new_ccgx_ucsi()
  2022-01-05 14:19 ` [PATCH v3 5/5] i2c: designware-pci: Switch to use i2c_new_ccgx_ucsi() Andy Shevchenko
@ 2022-02-15  9:08   ` Wolfram Sang
  0 siblings, 0 replies; 19+ messages in thread
From: Wolfram Sang @ 2022-02-15  9:08 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-kernel, linux-i2c, Jarkko Nikula, Mika Westerberg,
	Ajay Gupta, Shah, Nehal-bakulchandra

[-- Attachment #1: Type: text/plain, Size: 301 bytes --]

On Wed, Jan 05, 2022 at 04:19:35PM +0200, Andy Shevchenko wrote:
> Instead of open coded variant switch to use i2c_new_ccgx_ucsi().
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI
  2022-02-07 14:39       ` Andy Shevchenko
@ 2022-02-15  9:10         ` Wolfram Sang
  2022-02-15  9:45           ` Andy Shevchenko
  0 siblings, 1 reply; 19+ messages in thread
From: Wolfram Sang @ 2022-02-15  9:10 UTC (permalink / raw)
  To: Andy Shevchenko, Thierry Reding
  Cc: linux-kernel, linux-i2c, Jarkko Nikula, Mika Westerberg,
	Ajay Gupta, Shah, Nehal-bakulchandra, Amit Cohen,
	Nikolay Aleksandrov, Sameer Pujar

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]


> Okay, I have Cc'ed this message to the people whose addresses I found in the
> changes in the Git history of the vanilla kernel with most frequent appearance.
> 
> The Q is who is on nVidia side is responsible now for I²C controller driver?

I applied your series now. But the question where Ajay is or who now
maintains the i2c-nvidia-gpu driver still remains...


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI
  2022-02-15  9:10         ` Wolfram Sang
@ 2022-02-15  9:45           ` Andy Shevchenko
  2022-02-15 12:46             ` Wolfram Sang
  0 siblings, 1 reply; 19+ messages in thread
From: Andy Shevchenko @ 2022-02-15  9:45 UTC (permalink / raw)
  To: Wolfram Sang, Thierry Reding, linux-kernel, linux-i2c,
	Jarkko Nikula, Mika Westerberg, Ajay Gupta, Shah,
	Nehal-bakulchandra, Amit Cohen, Nikolay Aleksandrov,
	Sameer Pujar

On Tue, Feb 15, 2022 at 10:10:09AM +0100, Wolfram Sang wrote:
> 
> > Okay, I have Cc'ed this message to the people whose addresses I found in the
> > changes in the Git history of the vanilla kernel with most frequent appearance.
> > 
> > The Q is who is on nVidia side is responsible now for I²C controller driver?
> 
> I applied your series now. But the question where Ajay is or who now
> maintains the i2c-nvidia-gpu driver still remains...

True. I dunno why nVidia guys are non-responsive for more than a week...
Maybe we should orphan the driver if no-one response in meaningful time
(let's say till the next merge window)?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI
  2022-02-15  9:07 ` Wolfram Sang
@ 2022-02-15  9:46   ` Andy Shevchenko
  0 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2022-02-15  9:46 UTC (permalink / raw)
  To: Wolfram Sang, linux-kernel, linux-i2c, Jarkko Nikula,
	Mika Westerberg, Ajay Gupta, Shah, Nehal-bakulchandra

On Tue, Feb 15, 2022 at 10:07:50AM +0100, Wolfram Sang wrote:
> On Wed, Jan 05, 2022 at 04:19:31PM +0200, Andy Shevchenko wrote:
> > Introduce a common module to provide an API to instantiate UCSI device
> > for Cypress CCGx Type-C controller. Individual bus drivers need to select
> > this one on demand.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Applied to for-next, thanks!

Thank you!

I hope at least AMD guys would be happy and can utilize this module for their
new hardware.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI
  2022-02-15  9:45           ` Andy Shevchenko
@ 2022-02-15 12:46             ` Wolfram Sang
  2022-02-15 17:41               ` Ajay Gupta
  0 siblings, 1 reply; 19+ messages in thread
From: Wolfram Sang @ 2022-02-15 12:46 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Thierry Reding, linux-kernel, linux-i2c, Jarkko Nikula,
	Mika Westerberg, Ajay Gupta, Shah, Nehal-bakulchandra,
	Amit Cohen, Nikolay Aleksandrov, Sameer Pujar

[-- Attachment #1: Type: text/plain, Size: 146 bytes --]


> Maybe we should orphan the driver if no-one response in meaningful time
> (let's say till the next merge window)?

Yes, I had a similar idea.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI
  2022-02-15 12:46             ` Wolfram Sang
@ 2022-02-15 17:41               ` Ajay Gupta
  0 siblings, 0 replies; 19+ messages in thread
From: Ajay Gupta @ 2022-02-15 17:41 UTC (permalink / raw)
  To: Wolfram Sang, Andy Shevchenko
  Cc: Thierry Reding, linux-kernel, linux-i2c, Jarkko Nikula,
	Mika Westerberg, Shah, Nehal-bakulchandra, Amit Cohen,
	Nikolay Aleksandrov, Sameer Pujar

Hi Wolfram and Andy,

> -----Original Message-----
> From: Wolfram Sang <wsa@kernel.org>
> Sent: Tuesday, February 15, 2022 4:46 AM
> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Thierry Reding <treding@nvidia.com>; linux-kernel@vger.kernel.org;
> linux-i2c@vger.kernel.org; Jarkko Nikula <jarkko.nikula@linux.intel.com>;
> Mika Westerberg <mika.westerberg@linux.intel.com>; Ajay Gupta
> <ajayg@nvidia.com>; Shah, Nehal-bakulchandra <nehal-
> bakulchandra.shah@amd.com>; Amit Cohen <amcohen@nvidia.com>;
> Nikolay Aleksandrov <nikolay@nvidia.com>; Sameer Pujar
> <spujar@nvidia.com>
> Subject: Re: [PATCH v3 1/5] i2c: Introduce common module to instantiate
> CCGx UCSI
> 
> 
> > Maybe we should orphan the driver if no-one response in meaningful
> > time (let's say till the next merge window)?
Sorry for the late response. The series looks good to me. I don't have setup ready
to test the changes but will be able to test next week and let you know if there is
any issues.

Thanks
Ajay
> nvpublic
> 
> Yes, I had a similar idea.


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2022-02-15 17:41 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 14:19 [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI Andy Shevchenko
2022-01-05 14:19 ` [PATCH v3 2/5] i2c: nvidia-gpu: Switch to use i2c_new_ccgx_ucsi() Andy Shevchenko
2022-02-15  9:08   ` Wolfram Sang
2022-01-05 14:19 ` [PATCH v3 3/5] i2c: nvidia-gpu: Use temporary variable for struct device Andy Shevchenko
2022-02-15  9:08   ` Wolfram Sang
2022-01-05 14:19 ` [PATCH v3 4/5] i2c: nvidia-gpu: Convert to use dev_err_probe() Andy Shevchenko
2022-02-15  9:08   ` Wolfram Sang
2022-01-05 14:19 ` [PATCH v3 5/5] i2c: designware-pci: Switch to use i2c_new_ccgx_ucsi() Andy Shevchenko
2022-02-15  9:08   ` Wolfram Sang
2022-01-24 15:06 ` [PATCH v3 1/5] i2c: Introduce common module to instantiate CCGx UCSI Andy Shevchenko
2022-02-07 13:13   ` Andy Shevchenko
2022-02-07 14:14     ` Wolfram Sang
2022-02-07 14:39       ` Andy Shevchenko
2022-02-15  9:10         ` Wolfram Sang
2022-02-15  9:45           ` Andy Shevchenko
2022-02-15 12:46             ` Wolfram Sang
2022-02-15 17:41               ` Ajay Gupta
2022-02-15  9:07 ` Wolfram Sang
2022-02-15  9:46   ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.