Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp19020pxb; Wed, 29 Sep 2021 23:31:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYX1CKc887JMdaZd3EXAZbTk2zhYgEm1SEvNOqW8ZoEL7wAxb7zXQ+4rVUrDns7ceWHtUz X-Received: by 2002:a17:90a:7345:: with SMTP id j5mr11360531pjs.48.1632983477352; Wed, 29 Sep 2021 23:31:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632983477; cv=none; d=google.com; s=arc-20160816; b=PfKi26U4HfJJVmK8DJrBwLe5tbhuKQxQq5YxeqM1S8TxwXiz7X/iDc7DGrU7msoPvp RL7J8wxLmzPlqssewLdJmfIakApwJlYvMGInd7J3Tq9cyAKQC+YtOouM9otp/87i0isQ kRRts+YPCszZGF1EY6i4De5Hzn1qPoWaD7XoJdgtidWTnUVam+6UzoE+gKe22ffW3WQ+ +fxPvt78p/klRGWPgycwCB5Z+h4B7IJ6TBg+x0p5G06Oy3RuX+ua8QP2Bp/XJ6ZB6Ydn 7v5M5rYBRAf3SSwCtLrcbCNYP3o+p9cq9C11Vnpsrw93HhO8F7JI7P73rKb9TiSgM3gB 7qdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ksMr7vCByQ646Cei8/rmLKsaC8SunBG84j+0Ln7QI4o=; b=zmseBCn0tWj6hPnz3OBnpGYfQI6L+S2/b/GJa0RLYNMLiK6/3uJxVXwNblrdS9oEGb D+7qXJoR7IHywWks0GRcPpdTej24v+HoJaucWNMqScC/KmpHWW+3Huw+BJGmiG1n+pDz WT2MI2KNH02vb22uxQOegKVRR2oNoVUUPmiGhgMo2FFTyEdiOOhnZu+S49LY+gk+5/8D FSyVmnD5FDtV7i6uoYhzIcPuHD+H9nnGNK0kJr/Ww1FX64xwAHoTaN/KwPUULfkgFR63 zgSVu1e5YLUTTkymSVtx359LFykKDuzToqIKbi/1vxIBH6z/n+wysrm78qkMle2xsNCm mAFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 35si2379073pgr.502.2021.09.29.23.31.04; Wed, 29 Sep 2021 23:31:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348300AbhI3Ga7 (ORCPT + 99 others); Thu, 30 Sep 2021 02:30:59 -0400 Received: from muru.com ([72.249.23.125]:38848 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348252AbhI3Ga6 (ORCPT ); Thu, 30 Sep 2021 02:30:58 -0400 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 8EF1080CF; Thu, 30 Sep 2021 06:29:43 +0000 (UTC) From: Tony Lindgren To: Greg Kroah-Hartman Cc: Andy Shevchenko , Jiri Slaby , Johan Hovold , Vignesh Raghavendra , linux-serial@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCHv2 0/4] Get rid of pm_runtime_irq_safe() for 8250_omap Date: Thu, 30 Sep 2021 09:29:02 +0300 Message-Id: <20210930062906.58937-1-tony@atomide.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Here are v2 patches to get rid of pm_runtime_irq_safe() for the 8250_omap driver. Based on comments from Andy and Johan, I improved a bunch of things as listed below. For removing the pm_runtime_irq_safe() usage, serial TX is the last remaining issue. We deal with TX by waking up the port and returning 0 bytes written from write_room() and write() if the port is not available because of PM runtime autoidle. This series also removes the dependency to Andy's pending generic serial layer PM runtime patches, and hopefully makes that work a bit easier :) Regards, Tony Changes since v1: - Separated out line discipline patches, n_tty -EAGAIN change I still need to retest - Changed prep_tx() to more generic wakeup() as also flow control needs it - Changed over to using wakeup() with device driver runtime PM instead of write_room() - Added runtime_suspended flag for drivers and generic serial layer PM to use Tony Lindgren (4): serial: core: Add wakeup() and start_pending_tx() for power management serial: 8250: Implement wakeup for TX and use it for 8250_omap serial: 8250_omap: Require a valid wakeirq for deeper idle states serial: 8250_omap: Drop the use of pm_runtime_irq_safe() Documentation/driver-api/serial/driver.rst | 9 ++++ drivers/tty/serial/8250/8250_omap.c | 42 +++++++++++----- drivers/tty/serial/8250/8250_port.c | 35 +++++++++++++- drivers/tty/serial/serial_core.c | 56 +++++++++++++++++++++- include/linux/serial_core.h | 3 ++ 5 files changed, 131 insertions(+), 14 deletions(-) -- 2.33.0