On 18/12/2023 18:16, Théo Lebrun wrote: > Add the Mobileye EyeQ5 reset controller driver. See the header comment > for more information on how it works. This driver is specific to this > platform; it might grow to add later support of other platforms from > Mobileye. > > Signed-off-by: Théo Lebrun <theo.lebrun@xxxxxxxxxxx> > --- ... > +static int eq5r_probe(struct platform_device *pdev) > +{ > + struct device *dev = &pdev->dev; > + struct device_node *np = dev->of_node; > + struct device_node *parent_np = of_get_parent(np); > + struct eq5r_private *priv; > + int ret, i; > + > + priv = kzalloc(sizeof(*priv), GFP_KERNEL); > + if (!priv) > + return -ENOMEM; > + > + dev_set_drvdata(dev, priv); > + > + priv->olb = ERR_PTR(-ENODEV); > + if (parent_np) > + priv->olb = syscon_node_to_regmap(parent_np); > + if (IS_ERR(priv->olb)) > + priv->olb = syscon_regmap_lookup_by_phandle(np, "mobileye,olb"); > + if (IS_ERR(priv->olb)) > + return PTR_ERR(priv->olb); NAK for such code. In all of your patches. This is part of the OLB, as you explained before, and cannot be anything else. > + > + for (i = 0; i < EQ5R_DOMAIN_COUNT; i++) > + mutex_init(&priv->mutexes[i]); > + > + priv->rcdev.ops = &eq5r_ops; > + priv->rcdev.owner = THIS_MODULE; > + priv->rcdev.dev = dev; > + priv->rcdev.of_node = np; > + priv->rcdev.of_reset_n_cells = 2; > + priv->rcdev.of_xlate = eq5r_of_xlate; > + > + priv->rcdev.nr_resets = 0; > + for (i = 0; i < EQ5R_DOMAIN_COUNT; i++) > + priv->rcdev.nr_resets += __builtin_popcount(eq5r_valid_masks[i]); > + > + ret = reset_controller_register(&priv->rcdev); > + if (ret) { > + dev_err(dev, "Failed registering reset controller: %d\n", ret); > + return ret; > + } > + > + dev_info(dev, "probed\n"); Drop Best regards, Krzysztof