Lines Matching +full:shared +full:- +full:interrupt

1 // SPDX-License-Identifier: GPL-2.0
3 * R-Car Generation 2 da9063(L)/da9210 regulator quirk
6 * regulators. All of these regulators have their interrupt request lines
7 * tied to the same interrupt pin (IRQ2) on the SoC.
9 * After cold boot or da9063-induced restart, both the da9063 and da9210 seem
10 * to assert their interrupt request lines. Hence as soon as one driver
11 * requests this irq, it gets stuck in an interrupt storm, as it only manages
12 * to deassert its own interrupt request line, and the other driver hasn't
13 * installed an interrupt handler yet.
46 bool shared; /* IRQ line is shared */ member
91 if (action != BUS_NOTIFY_ADD_DEVICE || dev->type == &i2c_adapter_type) in regulator_quirk_notify()
95 dev_dbg(dev, "Detected %s\n", client->name); in regulator_quirk_notify()
103 if (!pos->shared) in regulator_quirk_notify()
106 if (pos->np->parent != client->dev.parent->of_node) in regulator_quirk_notify()
109 dev_info(&client->dev, "clearing %s@0x%02x interrupts\n", in regulator_quirk_notify()
110 pos->id->compatible, pos->i2c_msg.addr); in regulator_quirk_notify()
112 ret = i2c_transfer(client->adapter, &pos->i2c_msg, 1); in regulator_quirk_notify()
114 dev_err(&client->dev, "i2c error %d\n", ret); in regulator_quirk_notify()
127 list_del(&pos->list); in regulator_quirk_notify()
128 of_node_put(pos->np); in regulator_quirk_notify()
155 return -ENODEV; in rcar_gen2_regulator_quirk()
169 ret = -ENOMEM; in rcar_gen2_regulator_quirk()
174 argsa = &quirk->irq_args; in rcar_gen2_regulator_quirk()
175 memcpy(&quirk->i2c_msg, id->data, sizeof(quirk->i2c_msg)); in rcar_gen2_regulator_quirk()
177 quirk->id = id; in rcar_gen2_regulator_quirk()
178 quirk->np = of_node_get(np); in rcar_gen2_regulator_quirk()
179 quirk->i2c_msg.addr = addr; in rcar_gen2_regulator_quirk()
189 argsb = &pos->irq_args; in rcar_gen2_regulator_quirk()
191 if (argsa->args_count != argsb->args_count) in rcar_gen2_regulator_quirk()
194 ret = memcmp(argsa->args, argsb->args, in rcar_gen2_regulator_quirk()
195 argsa->args_count * in rcar_gen2_regulator_quirk()
196 sizeof(argsa->args[0])); in rcar_gen2_regulator_quirk()
198 pos->shared = true; in rcar_gen2_regulator_quirk()
199 quirk->shared = true; in rcar_gen2_regulator_quirk()
203 list_add_tail(&quirk->list, &quirk_list); in rcar_gen2_regulator_quirk()
208 ret = -ENOMEM; in rcar_gen2_regulator_quirk()
229 list_del(&pos->list); in rcar_gen2_regulator_quirk()
230 of_node_put(pos->np); in rcar_gen2_regulator_quirk()