Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3611937rwl; Tue, 27 Dec 2022 11:58:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXs/rxLnaBurb0IivRLKB3vFE/RdfX1wmiKXYJNnMJwEwNqxLHOyxpc+l1IUiMasgYORzdoU X-Received: by 2002:a17:906:656:b0:7ee:1596:4b6 with SMTP id t22-20020a170906065600b007ee159604b6mr18189703ejb.59.1672171091625; Tue, 27 Dec 2022 11:58:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672171091; cv=none; d=google.com; s=arc-20160816; b=RpZ7PpQfVhjt9Tg1y0sLsdWMp4WTDA1gX3EtgQcKu740gL1bbLYCIWs6D9WYXcJppY 1fpQuONcPRvXLIuMgRkLcyFC0Z/H2N2z9O3JIeGORxwNMXLxYdX5OIxs8BNfvbYC8C49 Enb4cGeQGJsGkk0MRwDT+F5C+6sp1IJHbrPtFqgg5wvyJd6Z/3y/1wyIucbWCRGxOLfF x4Lg1z0FMljhDtDzoLd8eggA/B+dPdfTvc4IM/D9FagG1JZyxesGq3iV5swIr5n/Ow0H jHqigGINACTXUS0NI2bcl6MBUorTDdaKbKnisTSiH2Y3mVDyQU26Z9I1tPTyTvdvNNva 8v6g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=t/vFqs9zTl4UAxKrKxsxms/5j3RJaU9FKMLZvOt0iQs=; b=NslWvTre3yjf1Uurx1HOhs239RB5PGqLWnCMoEhhkMpkSmS62m+OvPgGHpyxs7IFn8 /xeZICxL69BMSlorxRSZ3a/SS1pCKfHFRNhnxtYEF7soV+qbRPhLztra32WFcXk6Mw5Z pIVKS9bzaAIruj65PPFbepMluSAqC8cOZeW3Hr7SqH52jt17YyGyeRLExn3jMrlPxgjC YSPGI9j/jProKLQ73vlSOjbnNrtUn90oxSp/MsgH3Gi77z1HaffNHVz0bgJ9sNldMle2 GQ6vXCG8MPtxw9tBBG6E//ZkEHm/kHGp0HnyVd6HUuhNp+5BISMDhstc/tXE2wFaiylu AOjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=oCDoLpOy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz34-20020a1709077da200b0078dcee0cf13si12776498ejc.561.2022.12.27.11.57.56; Tue, 27 Dec 2022 11:58:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=oCDoLpOy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231913AbiL0TdV (ORCPT + 66 others); Tue, 27 Dec 2022 14:33:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231611AbiL0TdQ (ORCPT ); Tue, 27 Dec 2022 14:33:16 -0500 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F828B1D0 for ; Tue, 27 Dec 2022 11:33:10 -0800 (PST) Received: by mail-il1-x12f.google.com with SMTP id i25so7175559ila.8 for ; Tue, 27 Dec 2022 11:33:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=t/vFqs9zTl4UAxKrKxsxms/5j3RJaU9FKMLZvOt0iQs=; b=oCDoLpOy+2jWXVLrcvUNlYTWaXjNhm5UxcC8EI6ZFW/yjDEZKrc2o5NKDuzvpelFvN nDnx4zEm28GxT3Bp91fsXJ23rf+N9gdP2rAr2J+FzcYns7h1SsiUmFZJDOxo1o+32gaf 24wk8dKHiJE3Quldwf6ZWdMGR8YM/R7qZQaAg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=t/vFqs9zTl4UAxKrKxsxms/5j3RJaU9FKMLZvOt0iQs=; b=seLFgs04YZz9AHKtXzGA95Mmk17PVJe/sTOIWhwBWi4rYQHirJyA9s9s0vzjvDJyiy MHD7s5Q0fHpF/61gwQCeRlZDBYutU/2MGxxLSqMGFPVIzkOA/jM9+NDveU12h2ToDrgZ 6cMDh2fWUOXcQLq3ODp7NdqZZCQLqZyB4zY8YT0mwqaGvFPfcYNmWCstI0sqo7MPlYak JVq4Sb7l4Y+kgp2XimTsDjVS8UzRmRkmVdkWBhRNF8R2zUvyOWDRBqSPun2Y2kE/ZhLK 7Vr3j4uxf2HNv3Rkidgr/fnMIfinitxZzWVgDqmi/Rc5fzyyL6ykglu5SBdFI6ofkcAD BesQ== X-Gm-Message-State: AFqh2kqHH5lspj1HStKm11VnLmU9XLpNeu+UY4vxQfXh8v1JZKuPN1PD xleOBNETeLdvHPcw+i1fDgKTQUvlnbhYkpTB X-Received: by 2002:a05:6e02:1d99:b0:30b:d861:2c84 with SMTP id h25-20020a056e021d9900b0030bd8612c84mr20324642ila.0.1672169589390; Tue, 27 Dec 2022 11:33:09 -0800 (PST) Received: from markhas1.corp.google.com ([100.107.108.223]) by smtp.gmail.com with ESMTPSA id a10-20020a02ac0a000000b003755a721e98sm4504995jao.107.2022.12.27.11.33.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Dec 2022 11:33:09 -0800 (PST) From: Mark Hasemeyer To: LKML Cc: Raul Rangel , Bhanu Prakash Maiya , Mark Hasemeyer , Prashant Malani , Benson Leung , Guenter Roeck , Tzung-Bi Shih , chrome-platform@lists.linux.dev Subject: [PATCH v13 3/3] platform/chrome: cros_ec_uart: Add DT enumeration support Date: Tue, 27 Dec 2022 12:32:24 -0700 Message-Id: <20221227123212.v13.3.Ie23c217d69ff25d7354db942613f143bbc8ef891@changeid> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20221227123212.v13.1.If7926fcbad397bc6990dd725690229bed403948c@changeid> References: <20221227123212.v13.1.If7926fcbad397bc6990dd725690229bed403948c@changeid> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bhanu Prakash Maiya Existing firmware uses the "PRP0001" _HID and an associated compatible string to enumerate the cros_ec_uart. Add DT enumeration support for already shipped firmware. Signed-off-by: Bhanu Prakash Maiya Co-developed-by: Mark Hasemeyer Signed-off-by: Mark Hasemeyer Reviewed-by: Prashant Malani --- Changes in v13: - No change Changes in v12: - Add Reviewed-by: Prashant Malani Changes in v11: - No change Changes in v10: - No change Changes in v9: - Rebase onto for-next - Update authorship Changes in v8: - No change Changes in v7: - Move PRP0001 enumeration support to its own commit drivers/platform/chrome/cros_ec_uart.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/platform/chrome/cros_ec_uart.c b/drivers/platform/chrome/cros_ec_uart.c index 971ea4bc2df80..0cef2888dffd0 100644 --- a/drivers/platform/chrome/cros_ec_uart.c +++ b/drivers/platform/chrome/cros_ec_uart.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -326,6 +327,12 @@ static int __maybe_unused cros_ec_uart_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_ec_uart_pm_ops, cros_ec_uart_suspend, cros_ec_uart_resume); +static const struct of_device_id cros_ec_uart_of_match[] = { + { .compatible = "google,cros-ec-uart" }, + {} +}; +MODULE_DEVICE_TABLE(of, cros_ec_uart_of_match); + #ifdef CONFIG_ACPI static const struct acpi_device_id cros_ec_uart_acpi_id[] = { { "GOOG0019", 0 }, @@ -339,6 +346,7 @@ static struct serdev_device_driver cros_ec_uart_driver = { .driver = { .name = "cros-ec-uart", .acpi_match_table = ACPI_PTR(cros_ec_uart_acpi_id), + .of_match_table = cros_ec_uart_of_match, .pm = &cros_ec_uart_pm_ops, }, .probe = cros_ec_uart_probe, -- 2.39.0.314.g84b9a713c41-goog