Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1563168ybl; Thu, 30 Jan 2020 02:02:36 -0800 (PST) X-Google-Smtp-Source: APXvYqwhiIUmofToF4M9KCRfxwNj6vV/t18dhEviScOMZUsMoKJzenWYbG3YG8wdkmvvPOVt+oyr X-Received: by 2002:a9d:7410:: with SMTP id n16mr3031291otk.23.1580378556043; Thu, 30 Jan 2020 02:02:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580378556; cv=none; d=google.com; s=arc-20160816; b=lC+pBOtJkQDYIz7U9+/EHK7YcBRXMga2yRjjCLZIWR6ox26WKEJkQ6gkHeL+jPC46u SuTVwvokCPiBB4+ZrDzuTAyOZ8+If1PGHTpJZiiWiu9hRSrSHmr4eC033GroFpzMpH/g 72Gm4Rni3EG3sFbj3k3nv2TNEMRws7K9vDExTclXA0HknCV6WlZwpsq0ezLDW3X2lyZv EjRw63BNAP/Luv1qaZGet+3dy/F1fWddsURhCRRdWQCCSGIu1JYGoL8UFWy9TFCJ4F+K YKjmeSjN+ffz0Lu09SE0d+dYx82DzvPotXkzhEMHOa1rq9qifgiBJ48YBfZboIb2azH2 LzNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=n+8srRbbuF9E1Dj/HTpZpgdXBLLzvhn2NSEsRIf5bCU=; b=yQBafsMGf49NEpyau+SEnl1U8UoimjwewwxDrH0v4ymHnnr7s6HcPgXPZihr7bgN9z bo1KmkIhFR66bgMNb9ShdgdDM8q6zcd7irgQX+QkbNuHDWd6ikAXYU0oEKMtoCs3Qys8 Not4QIJOSay4iWxMX7LeTz783DV2IdQqrUitpnkggWl/80L28jqHa8peNp1wqkSQe9Hb X5Outiv67YCa3VG7GsDRo6OS0LsFDHxdltJAdhSFqrZ3zUZJKh5GFZVJCRw8VuKkXTPf /o90ir0BUZ5TXAk5++YUvB22ovjBoMfS7nf19HEB7Z6aRQhimqFgykI8uxcc2UpqSP5z dRqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si2685863oti.249.2020.01.30.02.02.23; Thu, 30 Jan 2020 02:02:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726945AbgA3KBE (ORCPT + 99 others); Thu, 30 Jan 2020 05:01:04 -0500 Received: from mga05.intel.com ([192.55.52.43]:57775 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726882AbgA3KBE (ORCPT ); Thu, 30 Jan 2020 05:01:04 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jan 2020 02:01:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,381,1574150400"; d="scan'208";a="262121220" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga002.fm.intel.com with ESMTP; 30 Jan 2020 02:01:02 -0800 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1ix6dD-0004b9-Sn; Thu, 30 Jan 2020 12:01:03 +0200 Date: Thu, 30 Jan 2020 12:01:03 +0200 From: Andy Shevchenko To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 5/5] console: Introduce ->exit() callback Message-ID: <20200130100103.GR32742@smile.fi.intel.com> References: <20200127114719.69114-1-andriy.shevchenko@linux.intel.com> <20200127114719.69114-5-andriy.shevchenko@linux.intel.com> <20200130090917.sg5vnwvlng4ox6ua@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200130090917.sg5vnwvlng4ox6ua@pathway.suse.cz> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 30, 2020 at 10:09:17AM +0100, Petr Mladek wrote: > On Mon 2020-01-27 13:47:19, Andy Shevchenko wrote: > > Some consoles might require special operations on unregistering. For example, > > serial console, when registered in the kernel, keeps power on for entire time, > > until it gets unregistered. For such cases to have a balance we would provide > > ->exit() callback. > > Is there any plan to use this callback, please? > > The console init, setup, registration code needs a clean up, > definitely. If you plan some rework, I would like to understand > the bigger picture before we start adding new callbacks. Yes, as mentioned in the commit message I would like to use it for balancing runtime PM reference counters in the UART code later on. It will look like: ->setup(): pm_runtime_get(...); ->exit(): pm_runtime_put(...); The current operations have no needs to be undone. -- With Best Regards, Andy Shevchenko