Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3004665rwb; Fri, 9 Dec 2022 08:49:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf66DBl3M3rSKdm039iWonbMg+3UQbw2AONGw7s8uN9FqLSQf4DsX9LE7y7tP9HF7BPlMdOh X-Received: by 2002:a17:90a:304b:b0:218:f8a6:7bda with SMTP id q11-20020a17090a304b00b00218f8a67bdamr6450538pjl.48.1670604567720; Fri, 09 Dec 2022 08:49:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670604567; cv=none; d=google.com; s=arc-20160816; b=gJFgK5S0jxo++lX2RBe62Y8aY6qKa2ef2OBQdc3UkE+K3xlmMHU78QUF/LfNxi+diQ Wxe9R5+npXF8vAdgZSpqDLK7OcahJDIrzsDu4HSMq1HBMp06MUsK8XimIW2p2DdibQNN BUoYmleHYhbsnMAWVVLUc7MPKm22bHtlbd61zLFHRKVUMiRH0mTlIy8pYRNgsawErQ+0 tM3UWPl/R14L0pmvN8IT5k4onefc7om5IuxWQwg3nSMp3nsXo5ezTD3crkmvxZMMHmkc on80MuQZXBG/3IR3uFL4sVlWUzwWLsIHmyDBMIJtlbyPaDXj07f01Kanfxl1JDcUHpQA NA6Q== 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=LET7+BVLD7u2mz2p/Z3V+N5nYBkLwsfyiST0eTO7hzc=; b=zQjN5vfjfo1MFObYJXCyO4VoMX65xGsyUiqqBjGtRbUpqZsjxCnloth1I2RnBVN523 6GmTXF2lDCKHTDAHQRntRhLB8uh12h2NFuFL9UHUYxkGP5LMD/DP2Y1nCLLga9DBCakY 8hUcDBh3w/ixjXgUQnBGG8Ln1mBqFZ4/t9KSp5PPVrAlJD77y6pL+8sI7PCPf7nkFL7J EIUFB1Oo0BOIWsE5AslbvCqMLOq6BnU3sQgAZ2dSXvKsAOl1o6SExORQdD9b8vZwqfrU bTy8mE8b1iHr809AXBEJWM8/TeCTc0UFoT3Ph/OukaxSCTsAf6LI/DwgWNStcPNqbQPy u0dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=NDNMKLLD; 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 pg5-20020a17090b1e0500b002194029463fsi2228516pjb.111.2022.12.09.08.49.17; Fri, 09 Dec 2022 08:49:27 -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=NDNMKLLD; 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 S229759AbiLIQ0j (ORCPT + 74 others); Fri, 9 Dec 2022 11:26:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbiLIQ0b (ORCPT ); Fri, 9 Dec 2022 11:26:31 -0500 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F32486F5A for ; Fri, 9 Dec 2022 08:26:30 -0800 (PST) Received: by mail-il1-x136.google.com with SMTP id x12so147225ilg.1 for ; Fri, 09 Dec 2022 08:26:30 -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=LET7+BVLD7u2mz2p/Z3V+N5nYBkLwsfyiST0eTO7hzc=; b=NDNMKLLDBAWf3MbF+6zPgovX77wTaVAyPMqg01VPkudPh14T1CwOao5Z19mx2+2xV7 FTo99ZqyJQ83ny1hGx7ubIC4VplT5IlyRzD4g+UjgtMNKneXVSelvMsYF6GYqUyu48hU iJz/SJ0ywZgJyvxcUzTBEYtGf8wooFhu7IDSs= 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=LET7+BVLD7u2mz2p/Z3V+N5nYBkLwsfyiST0eTO7hzc=; b=esXlpaABUe7RF1X83D+ElMxZtYkk/vvXYMo7VJebrTcKImzYVqsSGZ4Ao3YQZ3Bsw0 BYWEWPCQlPZ46eTOh3F2NiDtChKy2Hc0sgEsMZPB5OtMM/t1fKhBB0tgMOouctBjFz0l h1/6j0/RrLhi63wVubwqngb7A/FwN5AlhMntztrnpYLNogzw9JYUFUkqp1KUHAFhcdt9 w8KC5kWFCdNMBJecXFSOZWNQuLxRNUOQlh6rN0VhuzuJxGV++4op2livaos7P5I70rWU 7tfuQo6qMPft4Pz4TDTBHbPvRKRj9hWw2JeYsj7CHdUfdrqNDu2EKAWm/M4rEganwsjp nkgA== X-Gm-Message-State: ANoB5pneL7kHta1Y98UTF6k4b6h/5olPpw7aPx+BDsUVsa9k3Q1YHhiL ZM7u6jnwEqp1Pn1gqDJ56GUikgjPt5p19HhT X-Received: by 2002:a92:d9ce:0:b0:303:2f20:1a05 with SMTP id n14-20020a92d9ce000000b003032f201a05mr3535629ilq.24.1670603189613; Fri, 09 Dec 2022 08:26:29 -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 b2-20020a92dcc2000000b002e85e8b8d1dsm556531ilr.5.2022.12.09.08.26.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 08:26:29 -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 v12 3/3] platform/chrome: cros_ec_uart: Add DT enumeration support Date: Fri, 9 Dec 2022 09:26:24 -0700 Message-Id: <20221209092619.v12.3.Ie23c217d69ff25d7354db942613f143bbc8ef891@changeid> X-Mailer: git-send-email 2.39.0.rc1.256.g54fd8350bd-goog In-Reply-To: <20221209092619.v12.1.If7926fcbad397bc6990dd725690229bed403948c@changeid> References: <20221209092619.v12.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 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 43a7493347a59..bf0c291914725 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.rc1.256.g54fd8350bd-goog