Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp118485rwb; Thu, 17 Nov 2022 21:51:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf6CAiexWcpMSY2unTTBjgGeTXtHZluDce0blGzksTFWkusfMrCBspz8QqMRnfPu2YfjoQjq X-Received: by 2002:a17:903:100a:b0:189:1e5:8424 with SMTP id a10-20020a170903100a00b0018901e58424mr286709plb.156.1668750701699; Thu, 17 Nov 2022 21:51:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668750701; cv=none; d=google.com; s=arc-20160816; b=J7vgwYsWbHrQDoEF4aWt+cSAz/wQbenUBmlXfSWZWI7rHP1RuRT/6u6rRSEgcS9CMz jP60wjJHv5JPIAzx2fycbCcx3mdqdord7aRi+DTSPVZ6GPV78IzjPikTmP2ewYjJu78G 0ypH/3YaJkwG+bgZF5aE3S38bvEHwSDHbYl5aI9BIRVWT5MR5WjemezHZCJlnClex1aB L9+/DPiryheoWGW8gFMZ/iG92ZNcSjJfviz+wltqB1RIrPcieNJYWT50sUh11Mhsh+AA LhWrvptD7SfqFY7mdw2paAa5S0/+EBlqq44moHcEMPjBxxDuDPJ0IWUdfakf2R733MZe x7+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dVibTccdjXR2xBpC3GuLQ3qVB3s2W4zbxTvbJcyw9P0=; b=jGrOMKO865Y6REwYOJUHsQPiYbBZ+YrSEpTRsqBPpQRB4+j1KzShUpjUJr3c/unuBr ZGLij/apGSi0T5WBE3Vjl884/6lANJzSrut+HavusXTFcmoKRy72gktty8rIv9BRAKYZ OdxE+Rr+BgrFChd3J2onpc2s0jlchjOVZ8Il2N/qiDxOFGNuhbqWvRnGWekyPT4OcZf3 41SK4oucd6au4ixoU2SA8U69M1RMO6OqWF573Ew8Eo0fPwizkM0lVbY0AUxrdUWKNeLe RpZ/u6IxCPA4ltqgTpCXqMDTJNVi6VKcVK9xfFolEmEpcppNY0nAJoR7cpbctFOlwVmD R27w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fDq8eAj3; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 9-20020a17090a0c0900b00212d47deabesi2467334pjs.60.2022.11.17.21.51.29; Thu, 17 Nov 2022 21:51:41 -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=@kernel.org header.s=k20201202 header.b=fDq8eAj3; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240989AbiKRFo3 (ORCPT + 91 others); Fri, 18 Nov 2022 00:44:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240980AbiKRFo0 (ORCPT ); Fri, 18 Nov 2022 00:44:26 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89D6E781B7 for ; Thu, 17 Nov 2022 21:44:25 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3E7BDB82289 for ; Fri, 18 Nov 2022 05:44:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8ECFAC433C1; Fri, 18 Nov 2022 05:44:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668750263; bh=8UNw72vtePNuy20elDajpRx7jkdEzL8qsaeAcoAR8ek=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fDq8eAj3Nll5jTlojaUiSRDcXaiN7HkW8LUDs34SL9AtYFtqvI9v9Y0Zo2kl1yxEH L9BkmmbObqF6HlyNvtcB1Obz1///wLymPuEdqjA99tDqDj2TRXlbCvlFHRlwkMSD72 q1qlplhb4dWNFX6F3HMBROkcYdpQfAvNj+0vIf3qFJXWevy1RoVoDEru9oWC4vb+Dx g8c/98vF+Gm83JNxF749L/INMVgWoDijb26uj7qT0YIPv8FwrpxhyVIjo6q3SBCcB5 NhSndHJ7nKDg3JBS2nlu/vHgIuk/Bf+JR8L1BSIUlMyhAoXLrisoFX0Ds8MpBNcq/q OZitTh9v8iHAg== Date: Fri, 18 Nov 2022 13:44:19 +0800 From: Tzung-Bi Shih To: Mark Hasemeyer Cc: LKML , Raul Rangel , Bhanu Prakash Maiya , Benson Leung , Enric Balletbo i Serra , Guenter Roeck , chrome-platform@lists.linux.dev Subject: Re: [PATCH v7 3/3] platform/chrome: cros_ec_uart: Add DT enumeration support Message-ID: References: <20221117114818.v7.1.If7926fcbad397bc6990dd725690229bed403948c@changeid> <20221117114818.v7.3.Ie23c217d69ff25d7354db942613f143bbc8ef891@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221117114818.v7.3.Ie23c217d69ff25d7354db942613f143bbc8ef891@changeid> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Thu, Nov 17, 2022 at 11:48:48AM -0700, Mark Hasemeyer wrote: > @@ -392,6 +393,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); It would need a guard for checking CONFIG_OF. Similar to what `cros_ec_uart_acpi_id` does. > @@ -405,6 +412,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, It would need be wrapped by `of_match_ptr()`. Similar to what `ACPI_PTR()` does.