Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp947415iob; Fri, 13 May 2022 17:22:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKi7LK0hr3K8kPSQR+QwYhLxTIj5Eh0QggIH+XLADslyN/t32FQoV0wLTEcv8FmS/qsH5r X-Received: by 2002:a7b:cf04:0:b0:394:27c8:d28a with SMTP id l4-20020a7bcf04000000b0039427c8d28amr16883417wmg.94.1652487778375; Fri, 13 May 2022 17:22:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652487778; cv=none; d=google.com; s=arc-20160816; b=IgDe1M1WA0YeMDSQRZVHbSOCrLyABLKCNHCoY3h7qDTFCdfrq7/dmReEeAB2dYBSUV LLZpG3SFyIQxPnry13WorEVTk5NRaiwYkQdKC1GvD6qvYvUiwdFA+zBct0aWSXHJcA91 4fghEj2LZPY/rD593jl3myGGHihVMC9YQw03Gvg90RHEKw0irLVt1WXWX6Q4abV6pRPk H53MK/PULkwIkEcnvAz+q0u/Er36WILltKVc3uifYULDoI2eaqc+wW8RQ9yDu99haIFk SWUuJEfwFPqYdX6DYLzwIhGIBPhxDX6InpslCNmce9YSf1PT+mEIfDSXKsTgivp8c8nt BWyw== 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=CCXk4aGiQyCTAljD0WBKOYV+IYE8EXr1rYTSu6VFgtI=; b=TCqrHlYXEyfT/1UTxLM92ymtslBH8bhNTkI/FS5X5vafZ09Uq1qbiwW7LZ7gtIQjmp WPKsSNaoIJ+1e+x+56vEIyM4Ox+b9RR+ppwpAyW8wmW4we1xI58JmwUUPA3RycSkULfm YdO/iBjplncxhOixxZlhrtnCUCxDS4fN3DuWIpo07EYsdoElszB9q6PXFJKWuDZzBBqR WEzA0oObtafMor7U2cLZGPJC6xmtvdih5wFpcCDPuFqFZqtgXTqaLdhRgqX6zchD5Kc2 vQvhahpW17q1GihoXTlNrrlitQtqYUq8AyY+ZThxplrFtljNphd6EdQLhZXONAibhjMR tijQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FFyemYPi; 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 bv29-20020a0560001f1d00b00207aa22415csi3199270wrb.437.2022.05.13.17.22.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 17:22:58 -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=FFyemYPi; 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 67738B41D7; Fri, 13 May 2022 16:18:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359638AbiELXqZ (ORCPT + 99 others); Thu, 12 May 2022 19:46:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356038AbiELXqY (ORCPT ); Thu, 12 May 2022 19:46:24 -0400 Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B83280214 for ; Thu, 12 May 2022 16:46:23 -0700 (PDT) Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-ed9ac77cbbso8660028fac.1 for ; Thu, 12 May 2022 16:46:23 -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=CCXk4aGiQyCTAljD0WBKOYV+IYE8EXr1rYTSu6VFgtI=; b=FFyemYPiqGMWq2J42zvVIy56OVbEqIuNlxuncSVPaNxNIIJ5ZycERdzKRulHFGsJEr oumADnP6plIx6csRjg0toODmGtxNF15v1tIvtE34hTfIWKIZI4lQPYRCfz+j1TgnixOx LQc4iQyXWPoOM+4Sw9q+M3yt1yefAvrCDz8Gs= 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=CCXk4aGiQyCTAljD0WBKOYV+IYE8EXr1rYTSu6VFgtI=; b=w9T7zAWuXJBJE6Z8fb2I+FVVK2u0QSM7yfizdn8ZVHlrF2mOlzxtdJGGBiRSFLtdNm zeYD08XVc+upnD/O9FEX+ArmJsx5ZbsWqgLz94vZP0kHCSuAflwU5DmNklZhU2kMZvF7 7dcGQUrDuQ/jnIOo+31NFQ9Jzhebim5hbo7yzK5z5OTcRudEpyehRhXRgBcgDXhWTi3C kGywcFHLkccFmr81bysbUcQQcf428livq13J80YxTimzN9em8MTTqzeas1CDt+h38iRi 7YojOyZQscQK4OjU6/DUf3/7cKMvmyr6p7qvsrmaM9ZIC7Y6pjaEx12vyVzI35aCDqiv KSUQ== X-Gm-Message-State: AOAM531XjFc37IfTLuZqtivgNs5Y/BMdxFLCUOrC3IG58aEnLoU1yc+3 HQUy9jrsCMInBsUfr5/YpqnUOODB6zA63VaTqLo6xA== X-Received: by 2002:a05:6870:558e:b0:e1:db7c:26aa with SMTP id n14-20020a056870558e00b000e1db7c26aamr1255109oao.63.1652399182819; Thu, 12 May 2022 16:46:22 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 12 May 2022 16:46:22 -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: Thu, 12 May 2022 16:46:22 -0700 Message-ID: Subject: Re: [PATCH v2 1/2] dt-bindings: google,cros-ec-keyb: Introduce switches only compatible To: Dmitry Torokhov 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" 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 Dmitry Torokhov (2022-05-12 16:31:08) > 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? ;) I think I covered that in v3 of this series[1]. > > We should also abort binding the device if it specifies the new > compatible, but EC does not report any buttons or switches. Sure. I don't have that done in v3 so I can respin the patch series to fail probe if there aren't any switches and the cros-ec-keyb-switches compatible is present. Can you take a quick glance at v3 and let me know if anything else is needed? [1] https://lore.kernel.org/all/20220503042242.3597561-1-swboyd@chromium.org/