Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3599229rdb; Wed, 27 Dec 2023 12:46:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKhphSi4Sbqr7YOZ9JnDq3XHl5nFUOkwKJAEoCE1abLgYAfn5IEuWywEF+y22x4asSd4RF X-Received: by 2002:aa7:cfc5:0:b0:555:4a1d:b9f5 with SMTP id r5-20020aa7cfc5000000b005554a1db9f5mr1071051edy.78.1703709977573; Wed, 27 Dec 2023 12:46:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703709977; cv=none; d=google.com; s=arc-20160816; b=I6EHPirPj/ZQ05lbeIf2BCuFyY+rsZBJ763fsVGkq2fbP1+00mL5fBkbzCJzO+an2k mZnqfPQ7PbzL79BhMwEU+UzXlsqVCgfA2F8Kn8inm/QS2cUPI6+Nb1sDxs6aVxBIb4gw i6txjjbwhdrEKKSc3jRXznJMLPrXfHML6maSffbLyJRadvBWKzu0Ka3m+1xh3EYYlk98 mYvFdhLuR7wZQiPIuyo6j4Qw9eBRvm1bSoHZRHkL3GBs732DxycmNrKtOczro5AvKTIX 3PdvQk3+PJgleOU8Hn1jkL22hAh2xBG7ThS3GYKpAePsdhC8PVivGq/H9AMRJf2VeNkP OasA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=fVDgWJyq2vOmIjdOR8AJqO+EWu6/v9sa3TFBqXWfDD0=; fh=izcywEqmRmEmxIoYmMgqBOaY4E+smEsFvFtii71JlkM=; b=DRp8Yf1LCXKYawS9esjH0UkDUw4f6nu6OrvhkK8XCMqevXFvS9dKUjeH2gsW301rKC Ei9b78jzgcOsgRQ/xKDI3N6reHx4TygEqcBrNr1j5R51T/oEdS7qL58BB0FRmdPtwpv/ DpszPvMKWfDwD3TlMZNt237/KTdpfHAr9wrQ5XOahn516b5zZjv8Uset0oou98D4CGax yRpATAPYe8OzcUBiqg3eViFShJAYXUNCQ4dHcUUc6Gocn9ltezABxkgVKsDwpWnRex01 DaqgHu6YUSr6VjhYDHS3zCcd1RWBrfjzDU/2y1DXn8KELvJi8crQkN0tAe1abWpeHgeg QulQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Bh1Qn2j2; spf=pass (google.com: domain of linux-kernel+bounces-12248-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12248-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id cw28-20020a056402229c00b005556f3a6847si360714edb.465.2023.12.27.12.46.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 12:46:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12248-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Bh1Qn2j2; spf=pass (google.com: domain of linux-kernel+bounces-12248-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12248-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 14C561F22240 for ; Wed, 27 Dec 2023 20:46:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F086047F73; Wed, 27 Dec 2023 20:46:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Bh1Qn2j2" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yw1-f180.google.com (mail-yw1-f180.google.com [209.85.128.180]) (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 148CE47F4D for ; Wed, 27 Dec 2023 20:46:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-5eb072c0b69so25836087b3.0 for ; Wed, 27 Dec 2023 12:46:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1703709967; x=1704314767; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fVDgWJyq2vOmIjdOR8AJqO+EWu6/v9sa3TFBqXWfDD0=; b=Bh1Qn2j23YiFbcAtOLLtfFC05EtX8S9vc9G1g+aAjMtysKRaLtL+hMxsLUYixE00Os h6z0KKr6K+AjhGry6UswPFWITrGAU3PWkkKhVam5GJnvDg7d08Y3f/A3LG/omsMSUCVr WJr0+RHyDjSLVNmgNZZ8psgp0mVRVsCRkCh/o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703709967; x=1704314767; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fVDgWJyq2vOmIjdOR8AJqO+EWu6/v9sa3TFBqXWfDD0=; b=wBNx96S3kMR4EzYxE8p4UD6UZ6ox+17nBlDhmY1jcNhVhC4mx46mBqzwVt8g3LC+ca /tmqNHkwzHc0IQEpiW8sDffYFe6eBXqw6leSgQyH+43EehBlGxWI4P60Qgf15b6Vfsb5 VpwkohAyXWT96HP4uzFWlOsvYHRrSS62IT2k73Bv7+/eLDlSqijpQSVN/qM3QFI9GeUF iNFo1cgN0Tt8UGabM/m6NO3KpubAndNjLanDxRE9kO+ogyUwU0D9hhjmy897WonYQ/rq BFlDgDTH2dyzoq6nedKPqvqCXj8ABLdQ1SkXpg5k0hIpBB5WRYIcDFzsOP9GMtGOebln Ra+A== X-Gm-Message-State: AOJu0YyGM3FRbNfSKJk8/pjWI1YI2QNth9zKif1YOcvCXsaU9vJkv3ew 5LG43KjVhGlxLvTQGe/1JZboupPPVA6A7lnEQJgMDCsGB+0b X-Received: by 2002:a0d:ca4d:0:b0:5e7:a5c4:d9db with SMTP id m74-20020a0dca4d000000b005e7a5c4d9dbmr5847203ywd.51.1703709967172; Wed, 27 Dec 2023 12:46:07 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231226192149.1830592-1-markhas@chromium.org> <20231226122113.v3.24.Ieee574a0e94fbaae01fd6883ffe2ceeb98d7df28@changeid> In-Reply-To: From: Mark Hasemeyer Date: Wed, 27 Dec 2023 13:45:56 -0700 Message-ID: Subject: Re: [PATCH v3 24/24] platform/chrome: cros_ec: Use PM subsystem to manage wakeirq To: Tzung-Bi Shih Cc: LKML , AngeloGioacchino Del Regno , Krzysztof Kozlowski , Rob Herring , Konrad Dybcio , Sudeep Holla , Andy Shevchenko , Raul Rangel , Benson Leung , Bhanu Prakash Maiya , Chen-Yu Tsai , Guenter Roeck , Lee Jones , Prashant Malani , Rob Barnes , Stephen Boyd , chrome-platform@lists.linux.dev Content-Type: text/plain; charset="UTF-8" > > /* Retrieve GpioInt and translate it to Linux IRQ number */ > > - ret = acpi_dev_gpio_irq_get(adev, 0); > > + ret = acpi_dev_get_gpio_irq_resource(adev, NULL, 0, &irqres); > > if (ret < 0) > > return ret; > > > > - ec_uart->irq = ret; > > - dev_dbg(&ec_uart->serdev->dev, "IRQ number %d\n", ec_uart->irq); > > + ec_uart->irq = irqres.start; > > How about keep using `ret`? The return value for 'acpi_dev_get_gpio_irq_resource' is different: 0 on success, negative errno on failure. > > @@ -301,7 +306,14 @@ static int cros_ec_uart_probe(struct serdev_device *serdev) > > > > serdev_device_set_client_ops(serdev, &cros_ec_uart_client_ops); > > > > - return cros_ec_register(ec_dev); > > + /* Register a new cros_ec device */ > > + ret = cros_ec_register(ec_dev); > > + if (ret) { > > + dev_err(dev, "Couldn't register ec_dev (%d)\n", ret); > > + return ret; > > + } > > It doesn't need the change after moving device_init_wakeup() and > dev_pm_set_wake_irq() into cros_ec_register(). > > Drop it? Will do.