From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Thu, 18 Jul 2019 09:22:20 -0600 Subject: [U-Boot] [PATCH v2 1/2] dm: core: device: switch off power domain after device removal In-Reply-To: References: <20190714195732.31232-1-agust@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Anatolij, On Sun, 14 Jul 2019 at 20:59, Peng Fan wrote: > > > Subject: [PATCH v2 1/2] dm: core: device: switch off power domain after > > device removal > > > > The power domain associated with a device is enabled when probing, but > > currently the domain remains enabled when the device is removed. > > Some boards started to disable power domains for selected devices via > > custom board_quiesce_devices(), but it doesn't work in many cases, i. e. > > because devices still can be accessed later in > > .remove() callback on behalf of dm_remove_devices_flags(). > > > > Utilize the DM core to power off the device power domain, but add a device > > flag to be able to selectively let the power domain enabled after device > > removal. This might be required for devices that must remain enabled when > > booting OS, i. e. serial console for debug output, etc. > > > > Signed-off-by: Anatolij Gustschin > > --- > > Changes in v2: > > - use CONFIG_IS_ENABLED(POWER_DOMAIN) to reduce code size > > > > drivers/core/device-remove.c | 9 +++++++++ > > include/dm/device.h | 6 ++++++ > > 2 files changed, 15 insertions(+) Unfortunately this causes a test failure (make qcheck). Can you please take a look? Regards, Simon