From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D1A6322F for ; Mon, 2 May 2022 23:49:41 +0000 (UTC) Received: by mail-oi1-f169.google.com with SMTP id r1so16561747oie.4 for ; Mon, 02 May 2022 16:49:40 -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=QKul5ccqYeflU3lPBKlkJ87TCI2WVPI5PesSrfUnM7LlfkxVZUICvlnGn9ue1Ozd5T Euf/n9HHkAltlcdgpIyKvdrUmN7jvU39taWtddZZc1F0ZI08jlGGZ3U48mBRF2VACrJU fypj4VnFXKCzrL5D/yA6PLXM27UsjhxlCeffAyCUxa6WJfZhm3Om/0SOEORlosdm2JkB GuSETW5YHf3g7HRGuVDsu6Hh2k7O4yK+W9gOdCXgU8zPq9rfdzpNvjGzAjuMMMBmdJnC GGsKsTc24d1QYHqhOT34bGjq1mPalAHF4BX1XgRuwAzCNGP2AzTmviizDiheCZcaE2gb M7ww== X-Gm-Message-State: AOAM532wBYSEZq7RDmUXARCZODhdqQbVrZPxvt31V7BeCf1Iu/B0s1Qm YMuQFa/rUcemsDKTwlgWIgZFN1K3eJXiBXwpphq30g== X-Google-Smtp-Source: ABdhPJxXlou3d6XzjcL/neLV6qpKQUgvnmAFgJDuMOTACWhPnak8bHhRAo8T3khmrzYlbcN9YD2WnbIjkQoANiagm8E= 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 Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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" 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.