Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp989234iob; Fri, 13 May 2022 18:46:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoFOk7N4C1W/GuV1qOWtezAu3yfJ/aK/VgKY7K/E5/WCjZpWIOymm2yL2OYsBSjicdQscK X-Received: by 2002:a5d:590d:0:b0:20a:c3eb:2584 with SMTP id v13-20020a5d590d000000b0020ac3eb2584mr5811692wrd.18.1652492782401; Fri, 13 May 2022 18:46:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652492782; cv=none; d=google.com; s=arc-20160816; b=Iji1vI4jATaIpqfmGbXPtHAFCNxzXu94LnoT4af/bl3gf2GYEIykUerkFNEwFkiSOz b8GsJsGdU/SEYeT/cOs3VMLGUdzaIiJiPkj0fnZs7d0QqcBIzJdcigoVRcp5wElpmT9w r6zzKh4y6Rc2osGS4SBzjUhM7zfCdm3F7RXyTUqxuc6BHsXdO12N5aKCYBX6VYZf42p5 uT3lBCJzi/QIoF/cGaUPw9GIIuFFgFRQidccQu8215JBjjM5Jwhj49MES/MZZ998OFyz Q3XSR9W7v+9jmG4HngXfdEFIHLP3sAhNnEhr0FDbLLxbKhOyQKHNZwlmItTxc9rgb++Z CzEw== 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=eYpdJ90sIk3qZfEgX1a80cpN/dFwOCIJBaG2OIahXBc=; b=uZsZXwxyYOcEEiWUapLtDSdrBlL7gEHTNpm3UNGXtN9Opv133W6co4PEzZhaIec1jc rqhRsR9Hw8RZUWTVBwtf9P2WGqlIMgpDgYJnhbxmSgpEeE8vNFALfbDikjIqS6+Sm5NU rgdliXnccx1Iyw+uzeJPgelmwbcqXI7dyv49SXO95lOmAqbNV5VzIBJkW2Bp0pwydmZq npUh+P3bEDlykhO1CTKnerxl1DIPZd3uOwBCCl9ncodkxeHsIeCeqO5fUCkMrMXW/fwy MQgFIoRyrEDtIDugdw7tBStY4YSF8f7DNyUS0m4J3KjRHwBa35Ni+C936020FH5E9OB+ GYOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qKp7BG8m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a5-20020a05600c224500b00394357243ffsi6510399wmm.46.2022.05.13.18.46.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:46:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qKp7BG8m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DE9BB438532; Fri, 13 May 2022 17:11:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359497AbiELXbQ (ORCPT + 99 others); Thu, 12 May 2022 19:31:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359494AbiELXbO (ORCPT ); Thu, 12 May 2022 19:31:14 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B5725DE5B; Thu, 12 May 2022 16:31:13 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id gj17-20020a17090b109100b001d8b390f77bso9241733pjb.1; Thu, 12 May 2022 16:31:13 -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=eYpdJ90sIk3qZfEgX1a80cpN/dFwOCIJBaG2OIahXBc=; b=qKp7BG8mXAqZXqb/q+PqxvmItgFgFMkAAnwKz1ZHXkZUzAmYP1HhV7uDIrl8P5ETsq wcXGlgBZT6WcjLF4FbrqrsOPbP6NYQLlPiTVFfR+/fdNCoT+aOUjWHFviEiJEDWPRe8M QAZVv4pIpo4JlGexYJ02gmNzrN7VyihR6x7qLYq1mKKzPKPZZoiql485/sL4mdIcSlaH qXl8S8sFG43zr08JWElKyp6uI8TS5HgtN4WwArQ9QPt7WWqnpi5JwOLaoVVY6il+NlE4 Aft7cZSdhohv0lDf1inYoo0+fKqi5aFjNKon+ogLso8wmA2p1Z/RWkB02i+JU4p0uBbL Vwqg== 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=eYpdJ90sIk3qZfEgX1a80cpN/dFwOCIJBaG2OIahXBc=; b=PZcgH/et2KtIg4zaAHykniXJwhSOJ71LUyGULWmqihqatvkTNUW/be0SZMSLZH0pg0 Ye04SHYnQw6gOGfG//fHvJLpE9VE8g8t/FDEE8SlJmLjCcEy2GAvLIJloyIk1dxalG7t TPDfDHA1VKIPNiZtX1bVHP/okjblixT4z6YdYaCPKnZ59fzQx5ZVhsdwxRfCJolON+MA KowDd+XRFqvN7KH56dZY5+iPLNr6Ik9dUDozKaKOqvnR72ZiTOg80HqQdoRCkkhl6iiz XAHDO/3DxS+Ixo6/gcllr3+HaVe7YAFzj+9iTTFv84UDQUzpnyGeJiS33NZuskpFVqV+ mssQ== X-Gm-Message-State: AOAM531VYxd/9ti1g3WpSvCWXx4Ij2mxiifpVaviVHLuvAPqpIuCzMDQ 8P76set5+lsahjcPzcqspBI= X-Received: by 2002:a17:902:f24c:b0:15c:b564:e4cc with SMTP id j12-20020a170902f24c00b0015cb564e4ccmr1893884plc.137.1652398272481; Thu, 12 May 2022 16:31:12 -0700 (PDT) Received: from google.com ([2620:15c:202:201:88fd:a79c:b005:79b1]) by smtp.gmail.com with ESMTPSA id a3-20020a170902710300b0015e8d4eb22esm443677pll.120.2022.05.12.16.31.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 16:31:11 -0700 (PDT) Date: Thu, 12 May 2022 16:31:08 -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=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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, May 12, 2022 at 01:11:39PM -0700, Stephen Boyd wrote: > Quoting Stephen Boyd (2022-05-12 11:58:02) > > Quoting Dmitry Torokhov (2022-05-12 03:22:30) > > > > > > 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. > > > > > > > The first compatible is still cros-ec-keyb in the driver though? Or you > > mean the first compatible in the node? I'm not aware of this problem at > > all but I can certainly test out a fake node and module and see if it > > gets autoloaded. > > I can't get this test module to fail to load no matter what I do. I > commented out the second match table entry, and kept it there and > removed 'vendor,switch-compat' from the DTS. Module still autoloads. > Ah, indeed, if the module contains both compatibles we will load it. It is broken when we have 2 or more modules and DT lists several compatibles for a device. OK, it looks like you feel very strongly regarding having a dedicated compatible. In this case please make sure that the compatible's behavior is properly documented (i.e. google,cros-ec-keyb compatible does not imply that there are *NO* switches, and users having buttons and switches in addition to matrix keys can also use google,cros-ec-keyb as a compatible for their device). We also need to mention that with the 2nd compatible the device still can report key/button events, it is simply that there is no matrix component. Should we call the other compatible google,cros-ec-bs? We should also abort binding the device if it specifies the new compatible, but EC does not report any buttons or switches. Thanks. -- Dmitry