Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp247638iob; Mon, 2 May 2022 18:27:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIj+Z0xTtTN+XKCulBTuWkqTxYSBW6xl3CPqtISdTrgUNHtJJtMKCJfxJOohZUT+rWAdoG X-Received: by 2002:a63:8a43:0:b0:3c2:2b52:848a with SMTP id y64-20020a638a43000000b003c22b52848amr5497240pgd.1.1651541258153; Mon, 02 May 2022 18:27:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651541258; cv=none; d=google.com; s=arc-20160816; b=QwJc0xlYQ6hvPNpBA01AFrs71MfnGjujOErNYgnFsXRl46aR5adV5FA/PatKMaGl1b 1Dt+ldkvC3N1ovjT2IyzXy29NsczBDfcYYPXI02R1NzXWsocbQGy7Faf3zHjssNHL1zk CoO2X5wnmvwfShQpJKvXiwC3RpY1E0Q2cR38Tr9P2mhgd5/Lvxj1xh8StiNS5AF6o6cT oj3LwGAIMb4LmIff6VbaI4Ymo6nLZWn1hfmvZ+8JDf5DzQU1YDZVUgmzIa1tz/ydHHnU 7i/SB+gSVjXZdo0S5qUI+1mIby2gid8f/i6Ee8+M1N6y8VSwG9NoXjuPBpxCV86guldf CpBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=f/8wAhfndevj/J1N3yBWJIasHRz86NCxkLOraqJEZ3I=; b=NFXdWYvqtvQg/EPeCbRtB17QxiqjHrygdvCLaaJcMpurK22PT9Fv6/t5dwyz20Gr55 76nMByKqwrRGFMcdlb4nGDd6RAULZ41rxXqbrvKreob4SHYTrEktg4C+4KzsVKNOWCfW vBmmJyX1n/HcMSY2YhTYbwS8fJJvaW1bq1ib0XlYEoeOySylciiNo1dXn6z+fGEqnMVF Ky0Aek158ocKFO14TTbJuPAhoI0NtEOIQChKehJChZR6iXD3GP4zBIAm5FLwF2O/TTW1 G20OS1zVmVZIAXB2BpeegcpHOxPE3WCf6Q8VTGPzxGI45FFefEzo0o6Elc7qEocYy6Qv 1+TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=U+eozlJi; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g25-20020a633759000000b0039dade203f0si16489752pgn.292.2022.05.02.18.27.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 18:27:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=U+eozlJi; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D32DF393F5; Mon, 2 May 2022 18:06:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230180AbiEBXyl (ORCPT + 99 others); Mon, 2 May 2022 19:54:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230308AbiEBXxN (ORCPT ); Mon, 2 May 2022 19:53:13 -0400 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F323833891 for ; Mon, 2 May 2022 16:49:41 -0700 (PDT) Received: by mail-oi1-x22d.google.com with SMTP id l16so9501548oil.6 for ; Mon, 02 May 2022 16:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=f/8wAhfndevj/J1N3yBWJIasHRz86NCxkLOraqJEZ3I=; b=U+eozlJiuwXweZAZwZgwKg8AbtEWzgT787jSunJqgNYKFAYU2sk9jF/tussaSBzEj6 zPONEEClbARzCV70uc7Eac8vMXYjko7CvW18CXSdgRFD6hiK9T7gZqDzUjmqV/b3PHmk OWScniXMFIN7XUInNcGUHP0cy2DepwEIxBsrM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=f/8wAhfndevj/J1N3yBWJIasHRz86NCxkLOraqJEZ3I=; b=lVsmQdFEM2OJB6fODumSUTohQRvCgD1waSU1721rXc1/bWSm6SsqIK3MgNMcTzl48W jJIBOyYrO/6whZ24xjg66YkjXgqLAvEVy3xipCruimeRHnuzHxbOiAtXD4be1ZWAjMFF wyizICE99Sls8tS4uqL0mVFi2d9G4N5Rvw8KUuQJ9ZER/hdpYL5LfHv0lYooCRan7rBv 9u0NGwaKhWL/l5PbZMN0nrCOTt66Z0Kcv1bih/fD6mdg2ecKOzN13l0Rx0X2sHGEpZBt uPjkUlidqWArx/NeYruJY8x5M4SWzrDZ8Oo8wnOgsSHeRpb+6YV99QiFWbPWsPZPKhTU nyXQ== X-Gm-Message-State: AOAM533REMSzIvJmyEQq/ruX/eldv79hLSnCV037MckhV/xtKwvBXF41 5/lB6619lMlKcPy2HGBrUAkuerh6rHsl15cPBAGSzw== X-Received: by 2002:a05:6808:18a5:b0:326:31ff:4232 with SMTP id bi37-20020a05680818a500b0032631ff4232mr249354oib.193.1651535380105; Mon, 02 May 2022 16:49:40 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 2 May 2022 16:49:39 -0700 MIME-Version: 1.0 In-Reply-To: References: <20220429233112.2851665-1-swboyd@chromium.org> <20220429233112.2851665-2-swboyd@chromium.org> From: Stephen Boyd User-Agent: alot/0.10 Date: Mon, 2 May 2022 16:49:39 -0700 Message-ID: Subject: Re: [PATCH v2 1/2] dt-bindings: google,cros-ec-keyb: Introduce switches only compatible To: Dmitry Torokhov , Doug Anderson Cc: LKML , patches@lists.linux.dev, chrome-platform@lists.linux.dev, Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, Benson Leung , Guenter Roeck , Hsin-Yi Wang , "Joseph S. Barrera III" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Quoting Stephen Boyd (2022-05-02 13:41:33) > Quoting Dmitry Torokhov (2022-05-02 10:43:06) > > > We have > > implemented the notion that without rows/columns properties we will > > not be creating input device for the matrix portion, all older devices > > should have it defined, so the newer driver is compatible with them... > > > > Agreed, that solves half the problem. This new compatible eases > integration so that devicetrees can say they're compatible with the old > binding that _requires_ the rows/column properties. By making the driver > change we loosened that requirement, but the binding should have been > making the properties required at the start because it fails to bind > otherwise. > > My interpretation of what Doug is saying is that we should maintain that > requirement that rows/columns exists if the original compatible > google,cros-ec-keyb is present and use the new compatible to indicate > that there are switches. Combining the two compatibles means there's > switches and a matrix keyboard, having only the switches compatible > means only switches, and having only the keyboard compatible means only > matrix keyboard. > > It sounds OK to me. There's one more thing to mention. The switches are discovered by querying the EC. Reverting commit 4352e23a7ff2 ("Input: cros-ec-keyb - only register keyboard if rows/columns exist") makes it so that in the case you have a keyboard and switches you'll be tempted to define both compatibles because you have some switches, but for all practical purposes you don't need to change anything. The EC will still be queried for the switches. Maybe "google,cros-ec-keyb-switches" is a bad name. It should really be "google,cros-ec-keyb-v2" or "google,cros-ec-keyb-optional" where we clarify that matrix keyboard properties are optional now and are used to indicate if there's a matrix keyboard or not.