From patchwork Thu May 23 07:58:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 798635 Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B48A13CF95 for ; Thu, 23 May 2024 07:58:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716451111; cv=none; b=U56ZVsggYGlmIh8RyoHrDqZSyZv3/Tp4wwEHFOv8NdWQod4Al0OzVXFdoLM1GNkSJKQmVxHZRf1j9K600uW9CmPHe/6trQjRgD1xTlY1sitvt7Yc6jYJn89Ishxf22e1j2pURCB5Kw37zYJX1dYJktNIUCzfGUOHExKcBE147O0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716451111; c=relaxed/simple; bh=Iws/eTrVyDn5dkbNRe+ngWkLPY2GChSsQJLxObwKLVM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=em3hVelrTBfvWYPZnCiqNnNRoIqbdIU9jo0rEaxx5AUExHj0VgCJ1KEzx65xi/CQmHdRCYXFWSvIEQEb6VQAA97xZ31Wm8IX/oeg6qbbA23/gwG4bElGLWhVTF0mVnGa8VZ7O9XN1jtwKsDY8RitNiQ6a1Uvnlp+KI2xkCHkZdk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=DSEsaT0C; arc=none smtp.client-ip=209.85.208.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="DSEsaT0C" Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2e3fa13f018so74075931fa.3 for ; Thu, 23 May 2024 00:58:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716451108; x=1717055908; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4dcME9c6ixaYcF3shVm7kMCcCObSATYl0aCrY0gY47w=; b=DSEsaT0CewPiZdtsjAYPQ+DHuM43Mz4jxdj3cbYt9veo/YzDvYQFLgk87LxMwdBDP+ Ug4Xpdz1/YMM7SrlS8Se4oVPC1rwwaNFarsFBMtrONnornNLYUJBOA8nRlU/rW/9yYv7 ktSQUWIG+CVu+PmkrM5IRIDT+ob1Dj9nKfvJd5lZbtEGNi3W1HdEWrhyfR93ZO/CW4sK lTAHCRNAzPwwBDDDI0yCWNumNYIPC3F7j9wChVpktj82aad6goomyUwlWtseg6bJk3Fq Dg1nyQs1xH0Kil4q6yMN6HmkjCd0KpuzoF/Pn11WMUhcJ5R0uFABbPtGi61qlio6sqc8 /iNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716451108; x=1717055908; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4dcME9c6ixaYcF3shVm7kMCcCObSATYl0aCrY0gY47w=; b=Q1w66WX/RnJv7iazoxIl0UQMGlmbDw80T/pkMu58C3tchAnMSmOVIkuXUUwnDKbm95 W4QqezJOx+FvXENljYAnUGoHyePwHUdHFkcA9mR+ZtdFmJRE5uZgrrDCJ3j1K8zFc8gn Q/khDuwn7y6VPLHS7ZkwHcCG1VBCul6olqYHaQEiFf+BggQsdcSz5ZUxmXR0uxJL7iQl /ULNDb2DszEY7xooH4sYCPU5k8hq90wMSljaPQRH+CoEAdnoGoP4/DnmvE8B0Jii3XkU m6hL9xoKROCNgLhE2jGJ+vpPCaQ7Q6L2JSBZzpDdtJfN3Y/hFpl8Pzl7/UcZiaSvsJBK WbCw== X-Forwarded-Encrypted: i=1; AJvYcCUdOGkWzPckm6iAjxtD0SyHuInv0HVF2knQ9BeZQk6LiQ7k9/fwkRfAQtPY0yS/gcKnHwNU61KJKAUq7L0RFrRFm0aMwm1ZXsJw6wnq X-Gm-Message-State: AOJu0YwK4AIcBlXgCdUIgJpT0uN50WhiGkiVUcbiPPsaoE+BVVCi6Sn6 fx7OlOR2D16KqXfA8DPw5jsqtnrrB9ABtexLvdjTjstgSvLcln+8PFuGgvopRxw= X-Google-Smtp-Source: AGHT+IFpTa7+bTT/sd4yF+zlR91kFCGJP5zdGd3C9ipXu2fgsrBztORz8qI+fV4vZQJhbBvN91EpGg== X-Received: by 2002:a2e:3807:0:b0:2e6:dd18:ac29 with SMTP id 38308e7fff4ca-2e9494c4841mr26332501fa.20.1716451107667; Thu, 23 May 2024 00:58:27 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f01d7fsm17359125e9.1.2024.05.23.00.58.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:58:26 -0700 (PDT) From: Markus Schneider-Pargmann To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Tony Lindgren , John Ogness , Markus Schneider-Pargmann , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Ronald Wahl , Thomas Richard , Thomas Gleixner , Andy Shevchenko , Arnd Bergmann , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 1/5] dt-bindings: serial: 8250_omap: Add wakeup pinctrl state Date: Thu, 23 May 2024 09:58:15 +0200 Message-ID: <20240523075819.1285554-2-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075819.1285554-1-msp@baylibre.com> References: <20240523075819.1285554-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Pins associated with the 8250 omap unit can be the source of a wakeup in deep sleep states. To be able to wakeup, these pins have to be configured in a special way. To support this configuration add the default and wakeup pinctrl states. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Rob Herring (Arm) --- .../devicetree/bindings/serial/8250_omap.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml index 6a7be42da523..402e2ca81017 100644 --- a/Documentation/devicetree/bindings/serial/8250_omap.yaml +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml @@ -77,6 +77,22 @@ properties: current-speed: true overrun-throttle-ms: true + pinctrl-0: + description: Default pinctrl state + + pinctrl-1: + description: Wakeup pinctrl state + + pinctrl-names: + description: + When present should contain at least "default" describing the default pin + states. The second state called "wakeup" describes the pins in their + wakeup configuration required to exit sleep states. + minItems: 1 + items: + - const: default + - const: wakeup + required: - compatible - reg From patchwork Thu May 23 07:58:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 798848 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 02E0E13D250 for ; Thu, 23 May 2024 07:58:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716451113; cv=none; b=nPfFEAuQjj7oQeEKPxyOf3H3gyb4UK+6AxkmAW0RmcNUddETTrU88C/6km8TSf/oYZL/+Ja9LV5QTCaIOVt4v9R4bhEZ/P9IO9sBhCmfYB3SDl/UbokYO6fyl9HoJixiKhH5oQi9rYB+wEjwcVwQhLDrc5ZmkMdN2a7cWIzwUO0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716451113; c=relaxed/simple; bh=GeYcq7hifjt1OLF0wnkQX/WSgPVVPHA4Q3hJVp/5Vi0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A0OVGEQMoRQZftQX4mecN9N8QNR3p8gvbmGOPB2zbQUOvu+3NaVodQuw8zV/pM4O2JjM2V1DqUHf+3lkcaUELKI+2iqVDkvDNab/lufQLlceXB9AtdYxr1+41neWosZxuwSnk6jL7fVwn9B2I3MrpcxjfU9G2JtDek6Qit2Iz6k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=FVHI0EGF; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="FVHI0EGF" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4200ee78f33so17515495e9.3 for ; Thu, 23 May 2024 00:58:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716451109; x=1717055909; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nnsvziUa618dnnoBP9xDRE/1PzDppW/Ko7YUJL6XyH0=; b=FVHI0EGFmQ9BIqm4FKanBf58RVhii9cB8Oi+i/5UStV/dFDDo7ZL++KfIt6ew8+9V7 Nxmwl7CbrsssR3E+VcOZ1OFHspC08wDTFBDjzltlu1YXSwgiHTWyMp0gbW5opyVOKu6L RuLO1dlgsxPXe1pAt1Bbuy3480CMX76ASHzNpVsmKJCTnbH1idJ9sIeHVn3IC8puX6V9 tJ9XA6qCLaYVFw3Dddi1qu/33K5+zBEfPvUsXyTPEGgwRDgSRUQkJtE8fMYdRP8lBZqe IdFhMdZAKWc4druy9yU4RdngNuC5YDN3anbbCCsi7ovUhR0KMqbt4EE35BE26VQvBnm6 NIyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716451109; x=1717055909; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nnsvziUa618dnnoBP9xDRE/1PzDppW/Ko7YUJL6XyH0=; b=KODOOTRi48vP3wpQyL5u/wF7BwYq/R0pJx+4GcN2L6lfSrkeqww+9pCxyDQvzUy7ks Nm0VSi8mh93od7+AGOfilAq27TanvPJatOwH2gWqEi4vhkhEZbUD4H3cb1u1GEQfIrI/ 9Sb/H95jAeEdgOPK3J7vaQUTcNBX4wVxZyANWyeDyOzSnRe2hnZJRbR7xLw20WaT1AWT HL/APr98CPXOl3zetXDwtw5ZfKAP8Xp4RxizaR6Bqb3MqgaQXZux3MI+h7GRSJ8PO6v8 zg8HM0TVSpUZ5X/rVRFoVXTtpkaddHP8XbhQzZVHW/56kyoXwMs3VqI4wMxfYdI8LWxJ XeBw== X-Forwarded-Encrypted: i=1; AJvYcCWk7GCcmn4XbD6t85daCtHQun4efumXK3zAv8zDUyaoIrO1e8BiQlUjj9wyD1AkqzkOJALqzwkF4bGvsg+HqoELe/AFKkKtIVfMFq/B X-Gm-Message-State: AOJu0Yxxffa0TRKWmY6hNIYtYJ3L3QAM/nDO0WP4Ow7V+NsN4+SHCwF+ rCI7Qc3uMxPH4Wsrn/0op4tiMkydJWHrTCalzsDlwbsS3pcgy2LFf2x4/qh9sWQ= X-Google-Smtp-Source: AGHT+IGc+MunU1oSZSugH61FPZEMIvettC8j8J+MkPor20SXGxRrNqr01E38oCLB5OzrMNXFDVl0cw== X-Received: by 2002:a05:600c:1386:b0:419:f3f9:8ed6 with SMTP id 5b1f17b1804b1-420fd2ddf9fmr39635585e9.4.1716451109255; Thu, 23 May 2024 00:58:29 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f01d7fsm17359125e9.1.2024.05.23.00.58.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:58:28 -0700 (PDT) From: Markus Schneider-Pargmann To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Tony Lindgren , John Ogness , Markus Schneider-Pargmann , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Ronald Wahl , Thomas Richard , Thomas Gleixner , Andy Shevchenko , Arnd Bergmann , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 2/5] serial: 8250: omap: Remove unused wakeups_enabled Date: Thu, 23 May 2024 09:58:16 +0200 Message-ID: <20240523075819.1285554-3-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075819.1285554-1-msp@baylibre.com> References: <20240523075819.1285554-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This field seems to be unused for quite some time already. Remove it. Signed-off-by: Markus Schneider-Pargmann --- drivers/tty/serial/8250/8250_omap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index 66901d93089a..ca456ea23317 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -141,7 +141,6 @@ struct omap8250_priv { atomic_t active; bool is_suspending; int wakeirq; - int wakeups_enabled; u32 latency; u32 calc_latency; struct pm_qos_request pm_qos_request; From patchwork Thu May 23 07:58:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 798634 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A53D413D261 for ; Thu, 23 May 2024 07:58:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716451114; cv=none; b=hqCh62O3cd9YchseMFxKV9sA04iQuzqvfXPa1uTh0g2dZ8tiAhY9KR7jdUAwU50iwqmdonOKIURDLS2fZrQNg2NkaoADIRLPOaX23UF+puOeUIsy4xsMUuHhTJQSjLJsAQ1SaFeWvNUOir3Vnc8nOQe9hrVbVplKXYJrhjhA/l0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716451114; c=relaxed/simple; bh=JXfSwwnz3aoD1YttqGWpLZwDZffWB1gKvJPkA/WlJVo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=q6WCSJqa+oj1k9IFDXG1rlK6+4UP7rjq7Fz/F6pJ2UFyvLZLuP2Bc6NiCWtXQWEMmySwnnNObyL6VVn6LMWxHVPWcQPDjh3XDvpRr5FZEsH5xW/++EUtTFfjfvQ0jV+ldFRRlw+wkM5Lq60IRvTCucstp7hjcbcUitohEzhtiNM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=Ih7cW4tj; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="Ih7cW4tj" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-420180b5922so20508035e9.2 for ; Thu, 23 May 2024 00:58:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716451111; x=1717055911; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qI60UQPxpWufyIYTmlWT9jYm0QX18O1OLfjH3sNxehE=; b=Ih7cW4tjbhpzpJjTY6jbi2qqMrrmkRC97Pso2mnpsH8zpgZqxOaeSNAXZW2OjhCYpp HKZKmCsQPXx98VrUTIpA71F0L12zZ36AsSCVVBQFllLEydbJDrwLHWArxSORMeuQSF2Q WIOSvE1mn0zwEb8OyEaxEnhpaKdNZgcrGPoYaDuomy8ceL4h0XvxkpyrxOhexYcij8zw C403lNhkuCiBiDjcy7UuhXniYLCsDCl9JV1Z0DH8s+Q5OSmZJlwEq9bgROjFNOrIzMw6 tf8rh54VFmKypHyXkPun+NQmeqfkFMtTMkGO5COcJGxjL8PG7Puq2RVykwkaV7tOopnn tQXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716451111; x=1717055911; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qI60UQPxpWufyIYTmlWT9jYm0QX18O1OLfjH3sNxehE=; b=D1hrL6Wbc/wY3u/PlvWt731mtj9vPs+UQZNo/0w1inkjeUMz3ppZZYNUyjvueVE/af 3ovZNSP1GTxWC6Bv3mPH86td166bqA0WbTzOddrXpKb0OzqAv2VzgFqjo8lADncsN7BI 2Spuodd1yWInQeZpdp6QEPqjaiAUgFeR7ZIJLonVF2bzu/Fxt2NoBqyxIegtNlfzUp0U thvt9CnIciHDBefu+aYWPjMK/GEmEBF8xLQTARy0L7uydUvzxrsgTGAxGLAgJL8YN4je xpqMnsL2eQv+MDqIGb9ksZrRCzumHVZK05I8Uc7KQbLeYB5E8usUWmNS/tyPegZW0jJE FQ8w== X-Forwarded-Encrypted: i=1; AJvYcCXcp4myRfYgeCKfrxhBcEO1sVionHF/on37kz06wOKC6Sz5B3EgFuoYhNCiUWRt3B5BEfirLDtTSib8RCh097OBI3HZZJfiTRo6QWpy X-Gm-Message-State: AOJu0YzKUTY82hr+XKm/3yfb+be3q3kkh1DYrwLpjG5KZKJ2yLiAEVKq ntJFJefzVg0B906+d6DJlklnUq4tOIoVfH9yrzqNHFQYD3vOUjxFFEOkfY5yuY8= X-Google-Smtp-Source: AGHT+IEmmwzL+k40uTlhKRwS2l9e+3ryu1+UT4VHTi5jnr4CZXZGZT2LSEj1dDGLqO0KbZJstq52qw== X-Received: by 2002:a05:600c:314d:b0:41b:e244:164a with SMTP id 5b1f17b1804b1-420fd2f1533mr40593155e9.6.1716451110834; Thu, 23 May 2024 00:58:30 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f01d7fsm17359125e9.1.2024.05.23.00.58.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:58:30 -0700 (PDT) From: Markus Schneider-Pargmann To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Tony Lindgren , John Ogness , Markus Schneider-Pargmann , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Ronald Wahl , Thomas Richard , Thomas Gleixner , Andy Shevchenko , Arnd Bergmann , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 3/5] serial: 8250: omap: Set wakeup capable, do not enable Date: Thu, 23 May 2024 09:58:17 +0200 Message-ID: <20240523075819.1285554-4-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075819.1285554-1-msp@baylibre.com> References: <20240523075819.1285554-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The driver sets wakeup enable by default. But not all uarts are meant to be wakeup enabled. Change the default to be wakeup capable but not enabled. The user can enable wakeup when needed. Signed-off-by: Markus Schneider-Pargmann Acked-by: Kevin Hilman Reviewed-by: Kevin Hilman --- drivers/tty/serial/8250/8250_omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index ca456ea23317..5b7508dfb5d8 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -1496,7 +1496,7 @@ static int omap8250_probe(struct platform_device *pdev) platform_set_drvdata(pdev, priv); - device_init_wakeup(&pdev->dev, true); + device_set_wakeup_capable(&pdev->dev, true); pm_runtime_enable(&pdev->dev); pm_runtime_use_autosuspend(&pdev->dev); From patchwork Thu May 23 07:58:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 798847 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 183BF13D27F for ; Thu, 23 May 2024 07:58:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716451115; cv=none; b=rBygGZ8rT5a4j7+4avC9crJPeDbUU8b7MsqkMjdR8fmZzOffatoPIo6DImQe1WtKk2fR4aMhwqzwVGjGVYp3S3glM2tActopH8yi54HxykuJujkxCcxQvTUEzRsp62QMoBeDKowgt7B0FYh8MaOvrK+XRPOvsRfUrfnswhIDuA4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716451115; c=relaxed/simple; bh=xXMdx2YgQV2v/OWZAGfu0mLEHHS2I9maO01eCHtUDpU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Lxr24Av/8mup7RJyuf2AhfqjD/J4bnqTIJS/6w719RPnNKfIEjOJda+KkKdbwBdSkjrLoO/ltcp7LNoIaIyO+Ih8TXNFxt2eRuvAVlhnMiVUNC1GjYrKOVcPI2nTA7KLAQu98bCYzzCQiV9pIRTDWhBdgS3RSdbkfWht5UomYRo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=a0iZ5dJI; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="a0iZ5dJI" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-42100f37690so3109275e9.0 for ; Thu, 23 May 2024 00:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716451112; x=1717055912; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Z8K16dWvOhO2qm+sr1y3MxtWvPvdycG1GWiFMpy3S5U=; b=a0iZ5dJIddxbiN/gysft3jTV/B7x2rPIz2KUzZVqUcCgvzv9T7RGUL3LSiTNnb0jgs z7Ux8xhH62YXxfv+Bl8tQkAK0TZm3qGKnKwAHT0MWS4cX8z20nRxcV0NobccQ/1S+6xg uvFKJHOBpL/3XKe+g0HsXUNLktCAoBaDQfQ6frqBmE8L8Pgd7XOJeFOUWSfZdC3nwp4n MX+xcxq5RHeCh7OMPxyg5ybC4I2BgdA9X6+Kg347RSWaYttSPwFSSm1LtKncoFGfswnZ 8tUh2Z+bwihCUlVkx+KoYhwTzIHipE/ZGrv9gHImMWN2Jzbecb2OnjwVuCNnggjwSqT7 hguQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716451112; x=1717055912; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z8K16dWvOhO2qm+sr1y3MxtWvPvdycG1GWiFMpy3S5U=; b=jsA8SJr5UBL2dRGRZeOCJOgONvpTFMlJzlQwJqrsvwFsq+eBsL+m91rdFynMXw47A2 /GI2AbbzLUP5CGdLO6dC4vIIRqPCyNFEWjgrhISP3OezR6KHjfpVNCOqL9wDx1Xl1/bB fAc1l+EuW46dJx2Tzmpityl3bl2fyCqolo39OjzrTSRz2G4wk8oA37vcExEIqQx2MyBR V4TWcY1xvLI7cDRFJPb4GTZSDGkb1aOlAu+tphyo2f/orPznRPnsE1AYKzYJN8BojuvG w8oNuI8ZPWW6gMMK4+R3othFhteaLnX+wJYB6lI88FGoQSt326/PUydgkOvzGSD4/y7Z N7xg== X-Forwarded-Encrypted: i=1; AJvYcCWoByLQK1yJYwAHgU/tMivE4l+p+AraaEpY2oiGIOl4rP4LpZRnAig/k7cblqhAn4kNBGMMNbti2JdquWXLxKhBtCcgM1D9ANXWzyAS X-Gm-Message-State: AOJu0YxQkboVZnRsy/Z8gUkIBjTfaxnmcOO0EOXIUNdOlg4PNjvvU/Go bqIpCY3HQudpqFwxyXxQuRPoYu1HISXZP7AsXv5baElGQ8P/UGRv7+DiY9tOkIQ= X-Google-Smtp-Source: AGHT+IFfe5vIFo/LgA8ARRskHuwvWe7QRmx5Miy8yG8EWQ6t9qMTpauF9TRt5VITqvCuUrFcUT4oIw== X-Received: by 2002:a05:600c:4fd2:b0:418:3d59:c13a with SMTP id 5b1f17b1804b1-421015b3ca3mr13374455e9.9.1716451112348; Thu, 23 May 2024 00:58:32 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f01d7fsm17359125e9.1.2024.05.23.00.58.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:58:31 -0700 (PDT) From: Markus Schneider-Pargmann To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Tony Lindgren , John Ogness , Markus Schneider-Pargmann , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Ronald Wahl , Thomas Richard , Thomas Gleixner , Andy Shevchenko , Arnd Bergmann , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 4/5] serial: 8250: omap: Support wakeup pinctrl state Date: Thu, 23 May 2024 09:58:18 +0200 Message-ID: <20240523075819.1285554-5-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075819.1285554-1-msp@baylibre.com> References: <20240523075819.1285554-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 UART can be used as a wakeup source for am62 from a powered-off SoC state. To enable wakeup from UART am62 requires a wakeup flag being set in the pinctrl. If the device is marked as wakeup enabled, select the 'wakeup' pinctrl state on sys_off. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Kevin Hilman --- drivers/tty/serial/8250/8250_omap.c | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index 5b7508dfb5d8..617a421a1396 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -27,8 +27,10 @@ #include #include #include +#include #include #include +#include #include "8250.h" @@ -149,6 +151,9 @@ struct omap8250_priv { spinlock_t rx_dma_lock; bool rx_dma_broken; bool throttled; + + struct pinctrl *pinctrl; + struct pinctrl_state *pinctrl_wakeup; }; struct omap8250_dma_params { @@ -1345,6 +1350,30 @@ static int omap8250_no_handle_irq(struct uart_port *port) return 0; } +static int omap8250_select_wakeup_pinctrl(struct device *dev, + struct omap8250_priv *priv) +{ + if (IS_ERR_OR_NULL(priv->pinctrl_wakeup)) + return 0; + + if (!device_may_wakeup(dev)) + return 0; + + return pinctrl_select_state(priv->pinctrl, priv->pinctrl_wakeup); +} + +static int omap8250_sysoff_handler(struct sys_off_data *data) +{ + struct omap8250_priv *priv = dev_get_drvdata(data->dev); + int ret; + + ret = omap8250_select_wakeup_pinctrl(data->dev, priv); + if (ret) + dev_err(data->dev, "Failed to select pinctrl state 'wakeup', continuing poweroff\n"); + + return NOTIFY_DONE; +} + static struct omap8250_dma_params am654_dma = { .rx_size = SZ_2K, .rx_trigger = 1, @@ -1566,6 +1595,16 @@ static int omap8250_probe(struct platform_device *pdev) priv->line = ret; pm_runtime_mark_last_busy(&pdev->dev); pm_runtime_put_autosuspend(&pdev->dev); + + priv->pinctrl = devm_pinctrl_get(&pdev->dev); + if (!IS_ERR_OR_NULL(priv->pinctrl)) + priv->pinctrl_wakeup = pinctrl_lookup_state(priv->pinctrl, "wakeup"); + + devm_register_sys_off_handler(&pdev->dev, + SYS_OFF_MODE_POWER_OFF_PREPARE, + SYS_OFF_PRIO_DEFAULT, + omap8250_sysoff_handler, NULL); + return 0; err: pm_runtime_dont_use_autosuspend(&pdev->dev); From patchwork Thu May 23 07:58:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 798633 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DCB1913D2B2 for ; Thu, 23 May 2024 07:58:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716451118; cv=none; b=Hy8X4ovUYKuJgUOpS5DaAUt6EDgwgPl0qimQMt7GsXUCoYrj9FUA7Sa84xBisdxvlyB3PW+BhGAMK9mPVVpRYs7/6z01POBmiVJMDlHlNqYvj5ZCgGIgCUbfAHk6MFAty2Xg6kc3YJZPqRj2tAIDbWcdM6WGfFcMAv8wteeJZnQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716451118; c=relaxed/simple; bh=oY9pJCCB+gMDQTAUOCI57KbOI5M/HreuFbqNaMW9YWI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kBNPk6EEpQtgAWfQ/cxJPkw7v34gWa9gWjg7HwCilTrGh/gMAhnrjTCfLgNna8Fa3RFcWDCm2lDrQ/wTFtrjq8TC0t6q5+R0f9JHtssuqsanK7dTsZmSM5lP5x7/j/68DgyHeSH470+I+RNt68GcmkVgkvyuetz2Ev3PsQIUPT8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=TK/gv9Ba; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="TK/gv9Ba" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4202dd90dcfso16744175e9.0 for ; Thu, 23 May 2024 00:58:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716451114; x=1717055914; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=D8GG0qSUKW/QwiEfb1pXJnlM6Z5iknMteP/DubTFmCA=; b=TK/gv9Ba/1znMN70+vHAhjN6RiQjNI7tSNplK/LWY6Q8hlaJoVjf2pzbRI8YW9NTgB YbQGTguSFarzIZoVVCiGHAJtm1F4bHxtBqgYK6xjx1THBrMCzLDxhReKLU0uQQJjQoRR urz0zaeqdkhvOLi+w5TZ/P67U+DqEIadDPw2z70YWmAJvHg6s7xQyuuhuxgZv9N1rZoz Ms4C5vjpWQesLQJq8k0TMNU/29ziYuXW/4F5fmkV3fLmY3bekLVb5TYKC3MZoP4eotE6 2wlVkqOxXT+tpsVbd0IHrNflWqbd1t3NXAxnLGrUIuwu6uvn1y9vR29ssYzAGINDcGte +9sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716451114; x=1717055914; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D8GG0qSUKW/QwiEfb1pXJnlM6Z5iknMteP/DubTFmCA=; b=brArdRM27y0kKj2cfoz1vHj42680SIBo3HU1jVc49DsRPnBZo3e5CgHrIRX+vSv8om +j/1u2u6z7XGJ+5ICdCAWtvVL5iMEaDI11u70wC/HKAYAvbvnwHYEsP5s+gK6q1oNK6K 2dxcYS0XnzDVFZ+TrsJnSPiglmuGyVOWPEdFO25SUARRsJVl6JUYDUmPePr8k4Uyth8l piHV/1xIBENEuTawr+qTHLhm0ns60WNdR4+V4SlJ9/tUdjNlr+Xbda2THTSPYuZRN2CN MrhlX9uxBY2wyzv+J53HhyNkkXmTCbhnZ4XugAGY67IdyWTlLJIIkhMM+zUyowyU0NOh +rWw== X-Forwarded-Encrypted: i=1; AJvYcCVv0gKjv/GggsYHNlV13M/sD0uyVn3AO3RI9c8MckIY1JJbU9c5dy5TbvX3XTgJ6ubbi4q9Xsse5uygG1sQtpdIX+QZpHMaQ8DWrxg8 X-Gm-Message-State: AOJu0YzXD4PbMOIQsTaR0sAsImExrH78rjM1bAGJmacLYEvgxWuMsNeC nEZ/Ft0gI6Kw61HSCyUUexiW1BIjal67zFo+Mux2hp7YalYMk7SSXn8y6ngBwWU= X-Google-Smtp-Source: AGHT+IHY1QA7e7M81Uch6zrTpW4SzcO290mENs1Q7433I/NCsVyGWKJ/Rr+g3fYyAhO+lvsDLKDNDA== X-Received: by 2002:a05:600c:56c1:b0:41f:e56c:ef81 with SMTP id 5b1f17b1804b1-420fd2dcc03mr34490425e9.1.1716451113999; Thu, 23 May 2024 00:58:33 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f01d7fsm17359125e9.1.2024.05.23.00.58.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:58:33 -0700 (PDT) From: Markus Schneider-Pargmann To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Tony Lindgren , John Ogness , Markus Schneider-Pargmann , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Ronald Wahl , Thomas Richard , Thomas Gleixner , Andy Shevchenko , Arnd Bergmann , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 5/5] serial: 8250: omap: Set wakeup pinctrl on suspend Date: Thu, 23 May 2024 09:58:19 +0200 Message-ID: <20240523075819.1285554-6-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075819.1285554-1-msp@baylibre.com> References: <20240523075819.1285554-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 To enable the serial driver and it's pin to be a wakeup source in suspend to ram states, select the wakeup pinctrl state on suspend and restore the default pinctrl state on resume. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Kevin Hilman --- drivers/tty/serial/8250/8250_omap.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index 617a421a1396..61f056c4e78e 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -1663,6 +1663,13 @@ static int omap8250_suspend(struct device *dev) struct generic_pm_domain *genpd = pd_to_genpd(dev->pm_domain); int err = 0; + err = omap8250_select_wakeup_pinctrl(dev, priv); + if (err) { + dev_err(dev, "Failed to select wakeup pinctrl, aborting suspend %pe\n", + ERR_PTR(err)); + return err; + } + serial8250_suspend_port(priv->line); err = pm_runtime_resume_and_get(dev); @@ -1696,6 +1703,13 @@ static int omap8250_resume(struct device *dev) struct generic_pm_domain *genpd = pd_to_genpd(dev->pm_domain); int err; + err = pinctrl_select_default_state(dev); + if (err) { + dev_err(dev, "Failed to select default pinctrl state on resume: %pe\n", + ERR_PTR(err)); + return err; + } + if (uart_console(&up->port) && console_suspend_enabled) { if (console_suspend_enabled) { err = pm_runtime_force_resume(dev);