From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatolij Gustschin Date: Wed, 31 Jul 2019 15:11:47 +0200 Subject: [U-Boot] [PATCH v2 2/2] serial: lpuart: request dm device removal when booting OS In-Reply-To: References: <20190714195732.31232-1-agust@denx.de> <20190714195732.31232-2-agust@denx.de> Message-ID: <20190731151147.731e41d6@crub> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Peng, On Mon, 15 Jul 2019 03:02:46 +0000 Peng Fan peng.fan at nxp.com wrote: ... > > +static int lpuart_serial_remove(struct udevice *dev) { > > + if (dev == gd->cur_serial_dev) > > + dev->flags |= DM_FLAG_REMOVE_WITH_PD_ON; > > How about introduce a device tree property for DM? Then > Set the flags in common code, not in specific driver. we should not add more DT properties which are not describing the hardware, I think. Current plan is to drop this patch and do additional check dev != gd->cur_serial_dev in device_remove(), as Lokesh suggested. -- Anatolij