[PATCH v6 1/7] reset: mpfs: add non-auxiliary bus probing

Conor Dooley conor at kernel.org
Fri Oct 31 03:58:29 PDT 2025


On Fri, Oct 31, 2025 at 09:20:17AM +0200, claudiu beznea wrote:
> On 10/29/25 18:11, Conor Dooley wrote:
> > -static int mpfs_reset_probe(struct auxiliary_device *adev,
> > -			    const struct auxiliary_device_id *id)
> > +static int mpfs_reset_mfd_probe(struct platform_device *pdev)
> >   {
> > -	struct device *dev = &adev->dev;
> >   	struct reset_controller_dev *rcdev;
> > +	struct device *dev = &pdev->dev;
> > +	struct mpfs_reset *rst;
> > +
> > +	rst = devm_kzalloc(dev, sizeof(*rst), GFP_KERNEL);
> > +	if (!rst)
> > +		return -ENOMEM;
> > +
> > +	rcdev = &rst->rcdev;
> > +	rcdev->dev = dev;
> > +	rcdev->ops = &mpfs_reset_ops;
> > +
> > +	rcdev->of_node = pdev->dev.parent->of_node;
> > +	rcdev->of_reset_n_cells = 1;
> > +	rcdev->of_xlate = mpfs_reset_xlate;
> > +	rcdev->nr_resets = MPFS_NUM_RESETS;
> > +
> > +	rst->regmap = device_node_to_regmap(pdev->dev.parent->of_node);
> > +	if (IS_ERR(rst->regmap))
> > +		dev_err_probe(dev, PTR_ERR(rst->regmap), "Failed to find syscon regmap\n");
> 
> Do you want to continue registering the reset controller here? rcdev->base
> is NULL, thus the reset controller ops will fail, if I'm not wrong.


Oh, good point. That line is missing a return.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20251031/931316fa/attachment.sig>


More information about the linux-riscv mailing list