From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E62CC433F5 for ; Mon, 11 Oct 2021 08:28:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 07FE260EB1 for ; Mon, 11 Oct 2021 08:28:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234947AbhJKIaI (ORCPT ); Mon, 11 Oct 2021 04:30:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:51672 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234913AbhJKIaH (ORCPT ); Mon, 11 Oct 2021 04:30:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E915360F21; Mon, 11 Oct 2021 08:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633940888; bh=DOwrpFJGRa6owRtbNZhTfEzzpZvhKOCToK9K0ouxKAM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DatTPuLa8IB2ay0KjCnjg2/B0B4LL1NmXtGQ+gMRnwPc2SPZ6yWCZ8wPK0lcgy90L ePKhQWQRECvIpDYo6xMoLrXVTkapZQQbSj4uuFbhQ3xY6JPta+h9w+kNziO/WK2Aod Kiv89Zx0o8q91kLjaaZLojAi71wH86ROmX/06os8NO2RcjSRZQq+PML+H6kng5Fv+c TJ54zx3SVak0PJohE9LcRWKVO6XkKLjJIdKHFV/+9mh2srHgw776kQ1gyURnX6jzV+ O0R1wVkOufyPlF2adbQXIsKrOeADb6qw1FTLauXFZO+cNhdKihUdIE7xFbfdeZt8oI Ff0yPmfjKs+4g== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1mZqf7-0002JM-8v; Mon, 11 Oct 2021 10:27:58 +0200 Date: Mon, 11 Oct 2021 10:27:57 +0200 From: Johan Hovold To: Hector Martin Cc: Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, Marc Zyngier , Rob Herring , Arnd Bergmann , Linus Walleij , Alyssa Rosenzweig , Greg Kroah-Hartman , Mark Kettenis , Philipp Zabel , "Rafael J. Wysocki" , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH 6/7] tty: serial: samsung_tty: Support runtime PM Message-ID: References: <20211005155923.173399-1-marcan@marcan.st> <20211005155923.173399-7-marcan@marcan.st> <77ae3bb1-6da5-3ec6-de33-5e5f661b6145@canonical.com> <46109820-904b-4e87-5134-7d045dbbe57e@marcan.st> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46109820-904b-4e87-5134-7d045dbbe57e@marcan.st> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, Oct 11, 2021 at 02:32:29PM +0900, Hector Martin wrote: > On 06/10/2021 16.43, Krzysztof Kozlowski wrote: > > On 05/10/2021 17:59, Hector Martin wrote: > >> if (port) { > >> + pm_runtime_get_sync(&dev->dev); > > > > 1. You need to check return status. > > 2. Why do you need to resume the device here? > > As Rafael mentioned, this is basically disabling PM so the device is > enabled when not bound (which seems to be expected behavior). Not sure > what I'd do if the resume fails... this is the remove path after all, > it's not like we're doing anything else with the device at this point. You still need to disable the clocks before returning from remove(). Consider what happens when the driver is rebound otherwise. Johan