* [PATCH v2] i2c: cadence: Add shutdown handler
@ 2025-07-24 5:12 Ajay Neeli
2025-07-24 5:28 ` Michal Simek
2025-07-24 17:52 ` kernel test robot
0 siblings, 2 replies; 3+ messages in thread
From: Ajay Neeli @ 2025-07-24 5:12 UTC (permalink / raw)
To: git, andi.shyti, linux-arm-kernel, linux-i2c, linux-kernel
Cc: michal.simek, srinivas.goud, radhey.shyam.pandey, Ajay Neeli
Implement shutdown function for Cadence I2C driver to suspend the bus
during system "reboot" or "shutdown".
Interrupts are disabled in the handler to avoid spurious events when the
driver is in slave mode.
Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
---
Changes in V2:
Disable interrupts
---
drivers/i2c/busses/i2c-cadence.c | 32 ++++++++++++++++++++++++++------
1 file changed, 26 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c
index 8df63aa..e0a56df 100644
--- a/drivers/i2c/busses/i2c-cadence.c
+++ b/drivers/i2c/busses/i2c-cadence.c
@@ -192,6 +192,7 @@ enum cdns_i2c_slave_state {
* @transfer_size: The maximum number of bytes in one transfer
* @atomic: Mode of transfer
* @err_status_atomic: Error status in atomic mode
+ * @irq: IRQ Number
*/
struct cdns_i2c {
struct device *dev;
@@ -224,6 +225,7 @@ struct cdns_i2c {
unsigned int transfer_size;
bool atomic;
int err_status_atomic;
+ int irq;
};
struct cdns_platform_data {
@@ -1495,7 +1497,7 @@ static int cdns_i2c_probe(struct platform_device *pdev)
{
struct resource *r_mem;
struct cdns_i2c *id;
- int ret, irq;
+ int ret;
const struct of_device_id *match;
id = devm_kzalloc(&pdev->dev, sizeof(*id), GFP_KERNEL);
@@ -1526,9 +1528,9 @@ static int cdns_i2c_probe(struct platform_device *pdev)
if (IS_ERR(id->membase))
return PTR_ERR(id->membase);
- irq = platform_get_irq(pdev, 0);
- if (irq < 0)
- return irq;
+ id->irq = platform_get_irq(pdev, 0);
+ if (id->irq < 0)
+ return id->irq;
id->adap.owner = THIS_MODULE;
id->adap.dev.of_node = pdev->dev.of_node;
@@ -1590,10 +1592,10 @@ static int cdns_i2c_probe(struct platform_device *pdev)
goto err_clk_notifier_unregister;
}
- ret = devm_request_irq(&pdev->dev, irq, cdns_i2c_isr, 0,
+ ret = devm_request_irq(&pdev->dev, id->irq, cdns_i2c_isr, 0,
DRIVER_NAME, id);
if (ret) {
- dev_err(&pdev->dev, "cannot get irq %d\n", irq);
+ dev_err(&pdev->dev, "cannot get irq %d\n", id->irq);
goto err_clk_notifier_unregister;
}
cdns_i2c_init(id);
@@ -1636,6 +1638,23 @@ static void cdns_i2c_remove(struct platform_device *pdev)
reset_control_assert(id->reset);
}
+/**
+ * cdns_i2c_shutdown - Shutdown the i2c device
+ * @pdev: Handle to the platform device structure
+ *
+ * This function handles shutdown sequence
+ */
+static void cdns_i2c_shutdown(struct platform_device *pdev)
+{
+ struct cdns_i2c *id = platform_get_drvdata(pdev);
+
+ /* Disable interrupts */
+ disable_irq(id->irq);
+
+ /* Initiate failure of client i2c transfers */
+ i2c_mark_adapter_suspended(&id->adap);
+}
+
static struct platform_driver cdns_i2c_drv = {
.driver = {
.name = DRIVER_NAME,
@@ -1644,6 +1663,7 @@ static void cdns_i2c_remove(struct platform_device *pdev)
},
.probe = cdns_i2c_probe,
.remove = cdns_i2c_remove,
+ .shutdown = cdns_i2c_shutdown,
};
module_platform_driver(cdns_i2c_drv);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] i2c: cadence: Add shutdown handler
2025-07-24 5:12 [PATCH v2] i2c: cadence: Add shutdown handler Ajay Neeli
@ 2025-07-24 5:28 ` Michal Simek
2025-07-24 17:52 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: Michal Simek @ 2025-07-24 5:28 UTC (permalink / raw)
To: Ajay Neeli, git, andi.shyti, linux-arm-kernel, linux-i2c,
linux-kernel
Cc: srinivas.goud, radhey.shyam.pandey
On 7/24/25 07:12, Ajay Neeli wrote:
> Implement shutdown function for Cadence I2C driver to suspend the bus
> during system "reboot" or "shutdown".
>
> Interrupts are disabled in the handler to avoid spurious events when the
> driver is in slave mode.
>
> Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
> ---
> Changes in V2:
> Disable interrupts
> ---
> drivers/i2c/busses/i2c-cadence.c | 32 ++++++++++++++++++++++++++------
> 1 file changed, 26 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c
> index 8df63aa..e0a56df 100644
> --- a/drivers/i2c/busses/i2c-cadence.c
> +++ b/drivers/i2c/busses/i2c-cadence.c
> @@ -192,6 +192,7 @@ enum cdns_i2c_slave_state {
> * @transfer_size: The maximum number of bytes in one transfer
> * @atomic: Mode of transfer
> * @err_status_atomic: Error status in atomic mode
> + * @irq: IRQ Number
> */
> struct cdns_i2c {
> struct device *dev;
> @@ -224,6 +225,7 @@ struct cdns_i2c {
> unsigned int transfer_size;
> bool atomic;
> int err_status_atomic;
> + int irq;
> };
>
> struct cdns_platform_data {
> @@ -1495,7 +1497,7 @@ static int cdns_i2c_probe(struct platform_device *pdev)
> {
> struct resource *r_mem;
> struct cdns_i2c *id;
> - int ret, irq;
> + int ret;
> const struct of_device_id *match;
>
> id = devm_kzalloc(&pdev->dev, sizeof(*id), GFP_KERNEL);
> @@ -1526,9 +1528,9 @@ static int cdns_i2c_probe(struct platform_device *pdev)
> if (IS_ERR(id->membase))
> return PTR_ERR(id->membase);
>
> - irq = platform_get_irq(pdev, 0);
> - if (irq < 0)
> - return irq;
> + id->irq = platform_get_irq(pdev, 0);
> + if (id->irq < 0)
> + return id->irq;
>
> id->adap.owner = THIS_MODULE;
> id->adap.dev.of_node = pdev->dev.of_node;
> @@ -1590,10 +1592,10 @@ static int cdns_i2c_probe(struct platform_device *pdev)
> goto err_clk_notifier_unregister;
> }
>
> - ret = devm_request_irq(&pdev->dev, irq, cdns_i2c_isr, 0,
> + ret = devm_request_irq(&pdev->dev, id->irq, cdns_i2c_isr, 0,
> DRIVER_NAME, id);
> if (ret) {
> - dev_err(&pdev->dev, "cannot get irq %d\n", irq);
> + dev_err(&pdev->dev, "cannot get irq %d\n", id->irq);
> goto err_clk_notifier_unregister;
> }
> cdns_i2c_init(id);
> @@ -1636,6 +1638,23 @@ static void cdns_i2c_remove(struct platform_device *pdev)
> reset_control_assert(id->reset);
> }
>
> +/**
> + * cdns_i2c_shutdown - Shutdown the i2c device
> + * @pdev: Handle to the platform device structure
> + *
> + * This function handles shutdown sequence
> + */
> +static void cdns_i2c_shutdown(struct platform_device *pdev)
> +{
> + struct cdns_i2c *id = platform_get_drvdata(pdev);
> +
> + /* Disable interrupts */
> + disable_irq(id->irq);
> +
> + /* Initiate failure of client i2c transfers */
> + i2c_mark_adapter_suspended(&id->adap);
> +}
> +
> static struct platform_driver cdns_i2c_drv = {
> .driver = {
> .name = DRIVER_NAME,
> @@ -1644,6 +1663,7 @@ static void cdns_i2c_remove(struct platform_device *pdev)
> },
> .probe = cdns_i2c_probe,
> .remove = cdns_i2c_remove,
> + .shutdown = cdns_i2c_shutdown,
> };
>
> module_platform_driver(cdns_i2c_drv);
Andi: I was checking other drivers and I can't see any other action which should
be taken to have proper shutdown. Please let us know if driver should do
something else too.
Acked-by: Michal Simek <michal.simek@amd.com>
Thanks,
Michal
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] i2c: cadence: Add shutdown handler
2025-07-24 5:12 [PATCH v2] i2c: cadence: Add shutdown handler Ajay Neeli
2025-07-24 5:28 ` Michal Simek
@ 2025-07-24 17:52 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-07-24 17:52 UTC (permalink / raw)
To: Ajay Neeli, git, andi.shyti, linux-arm-kernel, linux-i2c,
linux-kernel
Cc: llvm, oe-kbuild-all, michal.simek, srinivas.goud,
radhey.shyam.pandey, Ajay Neeli
Hi Ajay,
kernel test robot noticed the following build errors:
[auto build test ERROR on andi-shyti/i2c/i2c-host]
[also build test ERROR on soc/for-next linus/master v6.16-rc7 next-20250724]
[cannot apply to xilinx-xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Ajay-Neeli/i2c-cadence-Add-shutdown-handler/20250724-131658
base: https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host
patch link: https://lore.kernel.org/r/20250724051243.22051-1-ajay.neeli%40amd.com
patch subject: [PATCH v2] i2c: cadence: Add shutdown handler
config: x86_64-buildonly-randconfig-002-20250724 (https://download.01.org/0day-ci/archive/20250725/202507250134.05RWuclB-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250725/202507250134.05RWuclB-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507250134.05RWuclB-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/i2c/busses/i2c-cadence.c:1608:53: error: use of undeclared identifier 'irq'
1608 | id->i2c_clk / 1000, (unsigned long)r_mem->start, irq);
| ^
1 error generated.
vim +/irq +1608 drivers/i2c/busses/i2c-cadence.c
ba064873ce5d19 Lars-Peter Clausen 2023-03-17 1485
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1486 /**
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1487 * cdns_i2c_probe - Platform registration call
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1488 * @pdev: Handle to the platform device structure
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1489 *
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1490 * This function does all the memory allocation and registration for the i2c
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1491 * device. User can modify the address mode to 10 bit address mode using the
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1492 * ioctl call with option I2C_TENBIT.
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1493 *
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1494 * Return: 0 on success, negative error otherwise
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1495 */
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1496 static int cdns_i2c_probe(struct platform_device *pdev)
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1497 {
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1498 struct resource *r_mem;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1499 struct cdns_i2c *id;
a11a46d7bd0877 Ajay Neeli 2025-07-24 1500 int ret;
63cab195bf4986 Anurag Kumar Vulisha 2015-07-10 1501 const struct of_device_id *match;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1502
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1503 id = devm_kzalloc(&pdev->dev, sizeof(*id), GFP_KERNEL);
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1504 if (!id)
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1505 return -ENOMEM;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1506
7fa32329ca0314 Shubhrajyoti Datta 2015-11-24 1507 id->dev = &pdev->dev;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1508 platform_set_drvdata(pdev, id);
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1509
63cab195bf4986 Anurag Kumar Vulisha 2015-07-10 1510 match = of_match_node(cdns_i2c_of_match, pdev->dev.of_node);
63cab195bf4986 Anurag Kumar Vulisha 2015-07-10 1511 if (match && match->data) {
63cab195bf4986 Anurag Kumar Vulisha 2015-07-10 1512 const struct cdns_platform_data *data = match->data;
63cab195bf4986 Anurag Kumar Vulisha 2015-07-10 1513 id->quirks = data->quirks;
63cab195bf4986 Anurag Kumar Vulisha 2015-07-10 1514 }
63cab195bf4986 Anurag Kumar Vulisha 2015-07-10 1515
58b924241d0a23 Shubhrajyoti Datta 2022-07-28 1516 id->rinfo.pinctrl = devm_pinctrl_get(&pdev->dev);
58b924241d0a23 Shubhrajyoti Datta 2022-07-28 1517 if (IS_ERR(id->rinfo.pinctrl)) {
8bfd4ec726945c Carsten Haitzler 2022-11-28 1518 int err = PTR_ERR(id->rinfo.pinctrl);
8bfd4ec726945c Carsten Haitzler 2022-11-28 1519
58b924241d0a23 Shubhrajyoti Datta 2022-07-28 1520 dev_info(&pdev->dev, "can't get pinctrl, bus recovery not supported\n");
8bfd4ec726945c Carsten Haitzler 2022-11-28 1521 if (err != -ENODEV)
8bfd4ec726945c Carsten Haitzler 2022-11-28 1522 return err;
8bfd4ec726945c Carsten Haitzler 2022-11-28 1523 } else {
8bfd4ec726945c Carsten Haitzler 2022-11-28 1524 id->adap.bus_recovery_info = &id->rinfo;
58b924241d0a23 Shubhrajyoti Datta 2022-07-28 1525 }
58b924241d0a23 Shubhrajyoti Datta 2022-07-28 1526
c02fb2b8067a4b Dejin Zheng 2020-04-14 1527 id->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem);
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1528 if (IS_ERR(id->membase))
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1529 return PTR_ERR(id->membase);
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1530
a11a46d7bd0877 Ajay Neeli 2025-07-24 1531 id->irq = platform_get_irq(pdev, 0);
a11a46d7bd0877 Ajay Neeli 2025-07-24 1532 if (id->irq < 0)
a11a46d7bd0877 Ajay Neeli 2025-07-24 1533 return id->irq;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1534
a1f64317bbf5fe Masahiro Yamada 2015-07-21 1535 id->adap.owner = THIS_MODULE;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1536 id->adap.dev.of_node = pdev->dev.of_node;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1537 id->adap.algo = &cdns_i2c_algo;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1538 id->adap.timeout = CDNS_I2C_TIMEOUT;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1539 id->adap.retries = 3; /* Default retry value. */
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1540 id->adap.algo_data = id;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1541 id->adap.dev.parent = &pdev->dev;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1542 init_completion(&id->xfer_done);
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1543 snprintf(id->adap.name, sizeof(id->adap.name),
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1544 "Cadence I2C at %08lx", (unsigned long)r_mem->start);
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1545
3d36dd1161ca31 Michal Simek 2025-02-06 1546 id->clk = devm_clk_get_enabled(&pdev->dev, NULL);
2d1a83a4f36f1a Krzysztof Kozlowski 2020-09-02 1547 if (IS_ERR(id->clk))
2d1a83a4f36f1a Krzysztof Kozlowski 2020-09-02 1548 return dev_err_probe(&pdev->dev, PTR_ERR(id->clk),
2d1a83a4f36f1a Krzysztof Kozlowski 2020-09-02 1549 "input clock not found.\n");
2d1a83a4f36f1a Krzysztof Kozlowski 2020-09-02 1550
0cbc9a2c62d267 Lars-Peter Clausen 2023-04-06 1551 id->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL);
0cbc9a2c62d267 Lars-Peter Clausen 2023-04-06 1552 if (IS_ERR(id->reset))
0cbc9a2c62d267 Lars-Peter Clausen 2023-04-06 1553 return dev_err_probe(&pdev->dev, PTR_ERR(id->reset),
0cbc9a2c62d267 Lars-Peter Clausen 2023-04-06 1554 "Failed to request reset.\n");
0cbc9a2c62d267 Lars-Peter Clausen 2023-04-06 1555
0cbc9a2c62d267 Lars-Peter Clausen 2023-04-06 1556 ret = reset_control_deassert(id->reset);
3d36dd1161ca31 Michal Simek 2025-02-06 1557 if (ret)
3d36dd1161ca31 Michal Simek 2025-02-06 1558 return dev_err_probe(&pdev->dev, ret,
0cbc9a2c62d267 Lars-Peter Clausen 2023-04-06 1559 "Failed to de-assert reset.\n");
0cbc9a2c62d267 Lars-Peter Clausen 2023-04-06 1560
7fa32329ca0314 Shubhrajyoti Datta 2015-11-24 1561 pm_runtime_set_autosuspend_delay(id->dev, CNDS_I2C_PM_TIMEOUT);
7fa32329ca0314 Shubhrajyoti Datta 2015-11-24 1562 pm_runtime_use_autosuspend(id->dev);
7fa32329ca0314 Shubhrajyoti Datta 2015-11-24 1563 pm_runtime_set_active(id->dev);
db3fad841d9bf5 Topi Kuutela 2019-12-09 1564 pm_runtime_enable(id->dev);
7fa32329ca0314 Shubhrajyoti Datta 2015-11-24 1565
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1566 id->clk_rate_change_nb.notifier_call = cdns_i2c_clk_notifier_cb;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1567 if (clk_notifier_register(id->clk, &id->clk_rate_change_nb))
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1568 dev_warn(&pdev->dev, "Unable to register clock notifier.\n");
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1569 id->input_clk = clk_get_rate(id->clk);
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1570
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1571 ret = of_property_read_u32(pdev->dev.of_node, "clock-frequency",
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1572 &id->i2c_clk);
90224e6468e15d Andy Shevchenko 2020-03-24 1573 if (ret || (id->i2c_clk > I2C_MAX_FAST_MODE_FREQ))
90224e6468e15d Andy Shevchenko 2020-03-24 1574 id->i2c_clk = I2C_MAX_STANDARD_MODE_FREQ;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1575
1a351b10b9671f Radu Pirea 2020-01-06 1576 #if IS_ENABLED(CONFIG_I2C_SLAVE)
1a351b10b9671f Radu Pirea 2020-01-06 1577 /* Set initial mode to master */
1a351b10b9671f Radu Pirea 2020-01-06 1578 id->dev_mode = CDNS_I2C_MODE_MASTER;
1a351b10b9671f Radu Pirea 2020-01-06 1579 id->slave_state = CDNS_I2C_SLAVE_STATE_IDLE;
1a351b10b9671f Radu Pirea 2020-01-06 1580 #endif
8b51a8e64443b9 Shubhrajyoti Datta 2021-07-13 1581 id->ctrl_reg = CDNS_I2C_CR_ACK_EN | CDNS_I2C_CR_NEA | CDNS_I2C_CR_MS;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1582
a069fcd9fa1822 Lars-Peter Clausen 2023-03-17 1583 id->fifo_depth = CDNS_I2C_FIFO_DEPTH_DEFAULT;
a069fcd9fa1822 Lars-Peter Clausen 2023-03-17 1584 of_property_read_u32(pdev->dev.of_node, "fifo-depth", &id->fifo_depth);
a069fcd9fa1822 Lars-Peter Clausen 2023-03-17 1585
ba064873ce5d19 Lars-Peter Clausen 2023-03-17 1586 cdns_i2c_detect_transfer_size(id);
ba064873ce5d19 Lars-Peter Clausen 2023-03-17 1587
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1588 ret = cdns_i2c_setclk(id->input_clk, id);
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1589 if (ret) {
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1590 dev_err(&pdev->dev, "invalid SCL clock: %u Hz\n", id->i2c_clk);
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1591 ret = -EINVAL;
0cbc9a2c62d267 Lars-Peter Clausen 2023-04-06 1592 goto err_clk_notifier_unregister;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1593 }
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1594
a11a46d7bd0877 Ajay Neeli 2025-07-24 1595 ret = devm_request_irq(&pdev->dev, id->irq, cdns_i2c_isr, 0,
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1596 DRIVER_NAME, id);
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1597 if (ret) {
a11a46d7bd0877 Ajay Neeli 2025-07-24 1598 dev_err(&pdev->dev, "cannot get irq %d\n", id->irq);
0cbc9a2c62d267 Lars-Peter Clausen 2023-04-06 1599 goto err_clk_notifier_unregister;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1600 }
8b51a8e64443b9 Shubhrajyoti Datta 2021-07-13 1601 cdns_i2c_init(id);
681d15a0f527af Vishnu Motghare 2014-12-03 1602
0e1929dedea367 Mike Looijmans 2017-01-16 1603 ret = i2c_add_adapter(&id->adap);
0e1929dedea367 Mike Looijmans 2017-01-16 1604 if (ret < 0)
0cbc9a2c62d267 Lars-Peter Clausen 2023-04-06 1605 goto err_clk_notifier_unregister;
0e1929dedea367 Mike Looijmans 2017-01-16 1606
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1607 dev_info(&pdev->dev, "%u kHz mmio %08lx irq %d\n",
2264997254ca11 Lars-Peter Clausen 2023-01-07 @1608 id->i2c_clk / 1000, (unsigned long)r_mem->start, irq);
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1609
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1610 return 0;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1611
0cbc9a2c62d267 Lars-Peter Clausen 2023-04-06 1612 err_clk_notifier_unregister:
3501f0c6630635 Satish Nagireddy 2022-06-28 1613 clk_notifier_unregister(id->clk, &id->clk_rate_change_nb);
7fa32329ca0314 Shubhrajyoti Datta 2015-11-24 1614 pm_runtime_disable(&pdev->dev);
db3fad841d9bf5 Topi Kuutela 2019-12-09 1615 pm_runtime_set_suspended(&pdev->dev);
61b804548e1744 Manikanta Guntupalli 2025-02-06 1616 reset_control_assert(id->reset);
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1617 return ret;
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1618 }
df8eb5691c48d3 Soren Brinkmann 2014-04-04 1619
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-24 17:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-24 5:12 [PATCH v2] i2c: cadence: Add shutdown handler Ajay Neeli
2025-07-24 5:28 ` Michal Simek
2025-07-24 17:52 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).