]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
i3c: dw: Remove ibi_capable property
authorAniket <aniketmaurya@google.com>
Thu, 27 Jun 2024 03:41:19 +0000 (03:41 +0000)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 26 Jul 2024 12:21:29 +0000 (14:21 +0200)
Since DW I3C IP master role always supports IBI, we don't need
to keep two variants of master ops and select one using this
property. Hence remove the code.

Signed-off-by: Aniket <aniketmaurya@google.com>
Link: https://lore.kernel.org/r/20240627034119.3938050-1-aniketmaurya@google.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/ast2600-i3c-master.c
drivers/i3c/master/dw-i3c-master.c
drivers/i3c/master/dw-i3c-master.h

index 01a47d3dd499f56d9a71e69f502c16ce5145189f..84942dbb6f8028cc5d02717912e6174fa0228afe 100644 (file)
@@ -156,7 +156,6 @@ static int ast2600_i3c_probe(struct platform_device *pdev)
                        i3c->sda_pullup);
 
        i3c->dw.platform_ops = &ast2600_i3c_ops;
-       i3c->dw.ibi_capable = true;
        return dw_i3c_common_probe(&i3c->dw, pdev);
 }
 
index 77a2a1c3fd1de5937d3ffe84d4f34390f4824219..9aae5c8dba8de1e6dba650be7192b2eab2367e82 100644 (file)
@@ -1404,21 +1404,6 @@ static const struct i3c_master_controller_ops dw_mipi_i3c_ops = {
        .attach_i2c_dev = dw_i3c_master_attach_i2c_dev,
        .detach_i2c_dev = dw_i3c_master_detach_i2c_dev,
        .i2c_xfers = dw_i3c_master_i2c_xfers,
-};
-
-static const struct i3c_master_controller_ops dw_mipi_i3c_ibi_ops = {
-       .bus_init = dw_i3c_master_bus_init,
-       .bus_cleanup = dw_i3c_master_bus_cleanup,
-       .attach_i3c_dev = dw_i3c_master_attach_i3c_dev,
-       .reattach_i3c_dev = dw_i3c_master_reattach_i3c_dev,
-       .detach_i3c_dev = dw_i3c_master_detach_i3c_dev,
-       .do_daa = dw_i3c_master_daa,
-       .supports_ccc_cmd = dw_i3c_master_supports_ccc_cmd,
-       .send_ccc_cmd = dw_i3c_master_send_ccc_cmd,
-       .priv_xfers = dw_i3c_master_priv_xfers,
-       .attach_i2c_dev = dw_i3c_master_attach_i2c_dev,
-       .detach_i2c_dev = dw_i3c_master_detach_i2c_dev,
-       .i2c_xfers = dw_i3c_master_i2c_xfers,
        .request_ibi = dw_i3c_master_request_ibi,
        .free_ibi = dw_i3c_master_free_ibi,
        .enable_ibi = dw_i3c_master_enable_ibi,
@@ -1456,7 +1441,6 @@ static void dw_i3c_hj_work(struct work_struct *work)
 int dw_i3c_common_probe(struct dw_i3c_master *master,
                        struct platform_device *pdev)
 {
-       const struct i3c_master_controller_ops *ops;
        int ret, irq;
 
        if (!master->platform_ops)
@@ -1506,12 +1490,9 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
        master->maxdevs = ret >> 16;
        master->free_pos = GENMASK(master->maxdevs - 1, 0);
 
-       ops = &dw_mipi_i3c_ops;
-       if (master->ibi_capable)
-               ops = &dw_mipi_i3c_ibi_ops;
-
        INIT_WORK(&master->hj_work, dw_i3c_hj_work);
-       ret = i3c_master_register(&master->base, &pdev->dev, ops, false);
+       ret = i3c_master_register(&master->base, &pdev->dev,
+                                 &dw_mipi_i3c_ops, false);
        if (ret)
                goto err_assert_rst;
 
index 8cb617b8147e133ff88bfa9013ea80ae15302f8b..7e76ca381d9f65074e169cf1cea9f9a59b588b4e 100644 (file)
@@ -38,7 +38,6 @@ struct dw_i3c_master {
        struct clk *core_clk;
        char version[5];
        char type[5];
-       bool ibi_capable;
        u32 sir_rej_mask;
        /*
         * Per-device hardware data, used to manage the device address table