Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5535535rwb; Sun, 4 Dec 2022 23:57:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf41K6YQLPqsKcbm7vvexoRLSRACvVcReNaaIqh+G71ZMW5FD1ilQrKHoivCNYJoSyEBEVRu X-Received: by 2002:a17:902:db09:b0:186:def0:4886 with SMTP id m9-20020a170902db0900b00186def04886mr67715204plx.152.1670227038365; Sun, 04 Dec 2022 23:57:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670227038; cv=none; d=google.com; s=arc-20160816; b=yUykhwdxAxCfH3Lu6F7a62Y3HnSpuamCAm/ubjwPm/r4Zcr+HLjzKfOl5uWgiiBnsF Deg5zWfVvDfNt2DJeh4q2GA9I7XWEcAg231pOEaiKdwrLAd1PRDLBOoCUpXz1lnogHX1 hAjzteCm3HbQVfxKbBhKKlLz7bxrFgVQ4DCrKhOES0cTxjNwCrqpsNclHzJetwhMpmy8 K/PlTLYgPEks1MQrB9uvaCdhfnHRZc8L34DH0VWD5srufkONnyqV8k9FfZsnby39Qbpt T0hKHdenj5vQq8omSCyR1FK1laf/zgOql6slOiqieKU9H7/r9mig3ws2B+nZu4ZNOVxR /Rgw== 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=TFBuZgmPhW5LWntAwnJs0BrrqusNQIYCnHrYxYRlVks=; b=F/OiAW4yt1aj+YEnAHTe9UoyeFMxS4Wh6nSrG7RkUmdGNFb9ktYBHy9XgV6xpWywHx 2qPtlOmAsZq+3I9lrZz2qpfuuusSVBd4s1YEupHjLQsKe71BKqLt1TRHvFGWRXF46vYV z/9GphEyzimRC+vUzYdVY1Icxm1C+1+kQrzy5TfZfcG/b+DbPfWQC5F68oQ+P4lhXrJi wnzTACYSfkWrNUQ4ARM+soq9+GWabZFys67AP/ACPU+zgtkwYCdpluV3ieuUosycqHYg Yr/g5encgjLtM34/+gh/7VpjLMuk/Xps5bKb50og7O4dDbtJTBhGBcvjtRqm3BL69Q+a Xg5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lkVVjG0Z; 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 s14-20020a632c0e000000b00460a6ee5b53si14233324pgs.37.2022.12.04.23.57.07; Sun, 04 Dec 2022 23:57:18 -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=lkVVjG0Z; 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 S231767AbiLEHU3 (ORCPT + 82 others); Mon, 5 Dec 2022 02:20:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231680AbiLEHUY (ORCPT ); Mon, 5 Dec 2022 02:20:24 -0500 Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81AE11004C for ; Sun, 4 Dec 2022 23:20:22 -0800 (PST) Received: by mail-il1-x129.google.com with SMTP id d14so4725213ilq.11 for ; Sun, 04 Dec 2022 23:20:22 -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=TFBuZgmPhW5LWntAwnJs0BrrqusNQIYCnHrYxYRlVks=; b=lkVVjG0Z8biqffn+OcAxsV1R0osXrCwi99bUnP2ndNZ3RweZZUHZ7VQyJmGuBmPjTI CpEgr1GsyGSbxYh2KToeaLCzobKs429ZafFNtxbE4nDlqdI8OA6fUQ1VfTjrL2AcziYA SYobP9ouwyxsQJalBeaFVZC8SWurgcVnPludY= 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=TFBuZgmPhW5LWntAwnJs0BrrqusNQIYCnHrYxYRlVks=; b=TsCDlSfUYClt3UBxzyVTW15j/weUgRZYxjh51SGzqDZGurscX/vD1f5brAtKxDmL8S cY3/OUmXRrFUyPtl+enIH3tYiMn+kmutPLRuBPYiU5M2bxfNmqEHQ5KLNRAhRaBreZAn z7UoB7OwsiFdhB2jcCzZWJXiQLdVSd2vYaPETA5QcOODBnXDk3Px1MG/EDfjrWW0/rlb UW2LwrbNLzBms19F0TgfqBCENV47aZc9B9dhMrWNGhION1plYHAGsHYa5yMW/vEDOrLp jpY4bXAe43ovTkLZAR5biZ/JzH4zTBHty0ekyLV74Cwpc5llsFELBHMAze1UcPl3yR+M woOQ== X-Gm-Message-State: ANoB5pl4wjwQUVMtd3G1K5uLPY4avP1fbjsvdda91Ot/YXplkOk2PUGK oEZEbxxlroG15UiBEd/zM3W0rS7hrs6OVnNC X-Received: by 2002:a05:6e02:1785:b0:303:542:f2c5 with SMTP id y5-20020a056e02178500b003030542f2c5mr18835048ilu.176.1670224821754; Sun, 04 Dec 2022 23:20:21 -0800 (PST) Received: from markhas1.roam.corp.google.com (63-225-246-100.hlrn.qwest.net. [63.225.246.100]) by smtp.gmail.com with ESMTPSA id a8-20020a021608000000b003755aa71fffsm5581184jaa.105.2022.12.04.23.20.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Dec 2022 23:20:21 -0800 (PST) From: Mark Hasemeyer To: LKML Cc: Raul Rangel , Bhanu Prakash Maiya , Mark Hasemeyer , Benson Leung , Guenter Roeck , Tzung-Bi Shih , chrome-platform@lists.linux.dev Subject: [PATCH v9 3/3] platform/chrome: cros_ec_uart: Add DT enumeration support Date: Mon, 5 Dec 2022 00:20:01 -0700 Message-Id: <20221205001932.v9.3.Ie23c217d69ff25d7354db942613f143bbc8ef891@changeid> X-Mailer: git-send-email 2.39.0.rc0.267.gcb52ba06e7-goog In-Reply-To: <20221205001932.v9.1.If7926fcbad397bc6990dd725690229bed403948c@changeid> References: <20221205001932.v9.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 --- 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 4b416441f973c..ea4922238eaae 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 @@ -347,6 +348,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 }, @@ -360,6 +367,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.rc0.267.gcb52ba06e7-goog