Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp815032iob; Fri, 13 May 2022 13:23:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYleClTdlYdyRUFmCrrMVoDfr3wdlWRwi1u+Cu8IoYMgwbyI7Il+2OXagIhmRfG3duYgNt X-Received: by 2002:a17:906:1f52:b0:6f4:ebc2:da82 with SMTP id d18-20020a1709061f5200b006f4ebc2da82mr5881476ejk.176.1652473411661; Fri, 13 May 2022 13:23:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652473411; cv=none; d=google.com; s=arc-20160816; b=OftlJoOfG9S0GUZaw2HFyuTlvSbP6umH5I4whm1eVLnq2b3pSrf3WlOznW3V68VZmb vGPJa+2G79/29CPZwd8J7RQZ6a+7jhfC/Tfl3Be5saAKBIJ0GCD2q1IFQkzLg/kWZ7QE BcOmrese9t8gsQIoHkRMdtzKgSw/cgZtB27DBhg1rL5EBR2e4OEbrM2A3rgddIMpQTNe wRxSeE2ROwLzhwey0TaMw9tlmDxvAyHEOmRhrOPthwf1lxrI8KvJRzwpWvO+fvl5SOtd CpyzKVbqI8/nMhn2MAu5UUL4Vq/t0UnzDfUm5Yul+bC2POByucyS1J22ghjj09ooLPsX zkOA== 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=E6IZ0JJc5m0aq/8SHpdc4cXSMXVdXk6ybd09b5VcxZo=; b=WYnqaGANyCohtWEKJp26uS3noaX6jTTfeW0hUXaYX1ez/xUkA9LHnkMw1lTBKh8+LY lq5EqzsMpzbZ4Gl9iIzrVvQ6UkKzydBrYPFNCuWS3ohppqxryTY4iIq7ELvdlB33GuZm S92cuaRmUYRWHTtBCL9YDPm2q1yONaV4BL2aJdkiRgoH4UFVmLMwRCOZ9bUEuKigUwVz teNSNoh/ciPZhPjpsfkQ1PYI26dWKNKyB8vLK34+shn1h9kbMqNk1zBZwMVHVeRSPBZp td/PTnuixCGGIi1VGNLLM2BsSFWaJAwObzpXPTxeThv2+bSvaUWrHBFjn+QW3qjBZKr9 nwwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jaFXXvhZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y7-20020a056402358700b00425fda3ac71si3378895edc.523.2022.05.13.13.23.05; Fri, 13 May 2022 13:23:31 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=jaFXXvhZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352581AbiELKWk (ORCPT + 99 others); Thu, 12 May 2022 06:22:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242164AbiELKWf (ORCPT ); Thu, 12 May 2022 06:22:35 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54B565F8FC; Thu, 12 May 2022 03:22:34 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id q4so4427908plr.11; Thu, 12 May 2022 03:22:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=E6IZ0JJc5m0aq/8SHpdc4cXSMXVdXk6ybd09b5VcxZo=; b=jaFXXvhZgi7pQZsqjsiN7ExzaMY4FC6PbyviRfgj/rI7KDPpqiKF9Qe22s4IFcdYTK NpkPijwPubv/q+KLP0JReczZ/9WN+qRePp1iuXyYkbrAXRTEJgcMz2QB8pk9hHuMKkcR GxyOZ26Qjydr63nnOCxvkS17Yep7Ee8XYQc8WlrD6+oaGpdC9GWt7Pgz1HpoVJIlYbS6 cpjHl3sBz7SOylii3OGzR+zQZjtZrg4/5Eoc4ZGe4AOli4wXXbDJ45398Z3H8b/WGBSh oEQC+mSJXJAFgQ/HGjQ2Sns9FVfrdsHcE3u3cSZJck5vs5LEBo5C1daxDT0MaJs1XPk5 +Vzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=E6IZ0JJc5m0aq/8SHpdc4cXSMXVdXk6ybd09b5VcxZo=; b=utaACJ9fSEzMHKy86otzp/NefYFJ7imXYZ9TOXRTuBXw4XUIuo5HrGiPo47LQ5H003 TtdCk4UzgRIqop1Mf604+VF0opqT0c8jIgA8K3EeK0zpdm5q9Z68IWECNmV5zsS24t0D PvfbozJq946Fps2PG0e6mWULgo2KnoCrSHn6961S1b6QWkCLQJBGtQijHMIuXc5UhC31 WU8z84dOXwlVGpO79eLQhYI/8Lr2Q+FTmd1GpEh6LJ1O/QlgreRvZlaCB29vSbH5JR82 4XTELNkgg45pBQd0yKVCru3AqHVcc8xdAFBwdgM5MCTZkMRi+BpMP2fYkwIL3ZDYuRJy o2CQ== X-Gm-Message-State: AOAM533BBM+c9PJK6wreOw5op/IN3GRrQmKK5TylNkJSDiZDyqc6zCj5 qn6R4lJAybwhROkUUAUFds4= X-Received: by 2002:a17:90b:2243:b0:1dc:3f08:8316 with SMTP id hk3-20020a17090b224300b001dc3f088316mr10371638pjb.194.1652350953722; Thu, 12 May 2022 03:22:33 -0700 (PDT) Received: from google.com ([2620:15c:202:201:ad76:8fc:e2ba:172]) by smtp.gmail.com with ESMTPSA id h11-20020aa786cb000000b0050dc76281fcsm3334694pfo.214.2022.05.12.03.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 03:22:32 -0700 (PDT) Date: Thu, 12 May 2022 03:22:30 -0700 From: Dmitry Torokhov To: Stephen Boyd Cc: Doug Anderson , 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" Subject: Re: [PATCH v2 1/2] dt-bindings: google,cros-ec-keyb: Introduce switches only compatible Message-ID: References: <20220429233112.2851665-1-swboyd@chromium.org> <20220429233112.2851665-2-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi Stephen, Sorry for the delay with my response. On Mon, May 02, 2022 at 01:41:33PM -0700, Stephen Boyd wrote: > Quoting Dmitry Torokhov (2022-05-02 10:43:06) > > On Mon, May 2, 2022 at 10:00 AM Doug Anderson wrote: > > > > > > That goes against the recently landed commit 4352e23a7ff2 ("Input: > > > cros-ec-keyb - only register keyboard if rows/columns exist") but > > > perhaps we should just _undo_ that that since it landed pretty > > > recently and say that the truly supported way to specify that you only > > > have keyboards/switches is with the compatible. > > > > > > What do you think? > > > > I am sorry, I am still confused on what exactly we are trying to solve > > here? Having a device with the new device tree somehow run an older > > kernel and fail? Why exactly do we care about this case? > > Yes, we're trying to solve the problem where a new device tree is used > with an older kernel because it doesn't have the driver patch to only > create an input device for the matrix when rows/columns properties are > present. Otherwise applying that devicetree patch to an older kernel > will break bisection. Well, my recommendation here would be: "do not do that". How exactly will you get new DTS into a device with older kernel, and why would you do that? > > > 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. Have we solved module loading in the presence of multiple compatibles? IIRC we only ever try to load module on the first compatible, so you'd be breaking autoloading cros-ec-keyb on these older kernels. I think the cure that is being proposed is worse than the disease. Thanks. -- Dmitry