On Sun, 24 Nov 2024 10:26:34 +0100 Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> wrote: > On Thu, Nov 21, 2024 at 03:42:38PM +0100, Kory Maincent wrote: > > From: Kory Maincent (Dent Project) <kory.maincent@xxxxxxxxxxx> > > > > Add support for devm_pse_irq_helper() to register PSE interrupts. This aims > > to report events such as over-current or over-temperature conditions > > similarly to how the regulator API handles them but using a specific PSE > > ethtool netlink socket. > > > > Signed-off-by: Kory Maincent <kory.maincent@xxxxxxxxxxx> > > .... > > > @@ -634,6 +752,7 @@ pse_control_get_internal(struct pse_controller_dev > > *pcdev, unsigned int index) psec->pcdev = pcdev; > > list_add(&psec->list, &pcdev->pse_control_head); > > psec->id = index; > > + psec->attached_phydev = phydev; > > Hm, i guess, here is missing some sort of phy_attach_pse. > Otherwise the phydev may be removed. I don't think so as a phy_device remove call will also free the pse control pointer through the pse_control_put() function. https://elixir.bootlin.com/linux/v6.11.7/source/drivers/net/phy/phy_device.c#L1045 Regards, -- Köry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com