Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp81263pxb; Fri, 9 Apr 2021 19:00:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSJvnyKq/vV3QFPHVNeqaJzaRbtzQ/Q90EzanyNgI9W6eXJfl/qfYimaqegmavKofDPtXZ X-Received: by 2002:a05:6402:1759:: with SMTP id v25mr20072505edx.177.1618020052341; Fri, 09 Apr 2021 19:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618020052; cv=none; d=google.com; s=arc-20160816; b=0lvpI6Jv1Jujxdaw/BAovUzWj7qqKUSeKjT6MQiluLg58gl+IYS6unM1cDZmFh1mgC RRQe4jwcFbLpWb/yejPjCvToMl63GSpyqxSMKYLOu2gZsvmdmv6bw6QyBLyYvHCvVzik ggdlZiU8s/EptdHrDeNFmbuAFxSwMR7GWeilbCTKOv8DkeebaGe3eil+zIRWwtw//StV VP3QcVk6a5DapqRmv9CZVPOTjlNrk9kQp1jLG9JOlM6BYGSHr87En0IGACYt1dxVTwOr WRXJ02Chz5utA3N4xaK+ypbbjBepd8QuKjsOExsHj3hBdKEGegoUMllftzGGT7qj4MpL Xz5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=YKekralRjci5bQu/4xmd55reV4SMgAHUOMu01CiJvWw=; b=LjBB1nBr2FN3TqxIIZCvCuTFR5p/T11CGfpLZw3Qnfr5GsDZi0RrrTm/qbAsk5gIIy kDztng5lU+aT672wHLhf4ov2fjMjZ1iVAYSQLjbBcIRx4v5elrWoiWfXjbyvFBAaArOx vJNtaA2VYS7yKTl+m1k2r4UKZtwwLL75eKQPPDHIkd8kMIJWa2ubKQVpGjQD1CMsPfsl mJsL9hUPVYCi7Ytd0ld0KpX07Shw1Ovb/zT4j3y7LanTaZnHbTQhggICTX4RzSu9469o LYAwiqZNHcQmUDCst11/0l+jajzHaPtBik9VMshMxT+x83nkADt+5Fe6l3CNM27VHiMz QFyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YZjnjaST; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e18si3271141ejs.95.2021.04.09.19.00.29; Fri, 09 Apr 2021 19:00:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YZjnjaST; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229665AbhDJB7g (ORCPT + 99 others); Fri, 9 Apr 2021 21:59:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233777AbhDJB7f (ORCPT ); Fri, 9 Apr 2021 21:59:35 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EFF0C061762 for ; Fri, 9 Apr 2021 18:59:21 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id j7so3600955plx.2 for ; Fri, 09 Apr 2021 18:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=YKekralRjci5bQu/4xmd55reV4SMgAHUOMu01CiJvWw=; b=YZjnjaSTQjJ215LLBBT3Z+O2NhkXNtMxVIMIxveK0Ch7okbfFmQaCyluEj3wRTxN9L iqZp52H9OFo/2Gtq7BlPscHNU4gOuuagoimZKjbS1yM9DWRkOHh7Ldoqe87jDdKe4qAT Z7fthw667CHOGLF/MH8BzMT6Wp/YEC9Jdc31c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=YKekralRjci5bQu/4xmd55reV4SMgAHUOMu01CiJvWw=; b=TeXcmvfQTZ52MykAayZYoXskpW1JAn2pRMRRli0uhfduPfD9pcnmsYRRKz4S24TjjD 1yaDIuxMnOqtZOARm+9skm4LsS/8SerhfnSLKggvKMybxfxhycjHRjkXZVqnHVirfarC loqpcC1qgLc3Mp1nMBEe3YD2JGETqhIPGukS5S89nH44d60lifUEzSjtC3G58fZysBPv gaRbm9KgplL3q/tOHs7xyeivoUBK31EdOxX6EvFikhDSTEAVp8St+VBJvjWHMFFfvRma 7UIo8sVztbPtB8ulzrqRr5N71XQnTv3ugoxjmP29blmDYVHq7ig6XREmhnev3opH4qvp 4sEw== X-Gm-Message-State: AOAM530h3ZWDmMYJH1upb2NIejQjW8gvI71hMD7qsmIZHjRdimf6hpme HSPvgIoKEu+X2n7E1fvf4uQ6wPjbn2AY9g== X-Received: by 2002:a17:90a:7896:: with SMTP id x22mr16283044pjk.182.1618019961050; Fri, 09 Apr 2021 18:59:21 -0700 (PDT) Received: from chromium.org ([2620:15c:202:201:5141:7881:7013:743b]) by smtp.gmail.com with ESMTPSA id p2sm3755665pgm.24.2021.04.09.18.59.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Apr 2021 18:59:20 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <159978558757.2295844.13766111546939928492@swboyd.mtv.corp.google.com> References: <20200909224226.2177401-1-swboyd@chromium.org> <6b546379-d5ce-f0bd-7907-be36f90c15ed@collabora.com> <159978558757.2295844.13766111546939928492@swboyd.mtv.corp.google.com> Subject: Re: [PATCH v2] platform/chrome: Don't populate lightbar device if it isn't there From: Stephen Boyd Cc: Benson Leung , linux-kernel , Gwendal Grignou , Guenter Roeck , Lee Jones To: Enric Balletbo i Serra , Guenter Roeck Date: Fri, 09 Apr 2021 18:59:19 -0700 Message-ID: <161801995912.3764895.7559313428958998666@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Stephen Boyd (2020-09-10 17:53:07) > Quoting Enric Balletbo i Serra (2020-09-10 08:49:42) > > On 10/9/20 16:52, Guenter Roeck wrote: > > > On Thu, Sep 10, 2020 at 7:32 AM Enric Balletbo i Serra > > > wrote: > > >> On 10/9/20 16:18, Guenter Roeck wrote: > > >>> On Wed, Sep 9, 2020 at 3:42 PM Stephen Boyd w= rote: > > >>>> @@ -206,6 +209,17 @@ static int ec_device_probe(struct platform_de= vice *pdev) > > >>>> } > > >>>> } > > >>>> > > >>>> + if (!strcmp(ec_platform->ec_name, CROS_EC_DEV_NAME) && > > >>>> + !cros_ec_get_lightbar_version(ec, NULL, NULL)) { > > >>> > > >>> Any idea why the lightbar code doesn't use cros_ec_check_features()= ? > > >>> There is a definition for EC_FEATURE_LIGHTBAR, but it doesn't seem = to > > >>> be used. It would be much more convenient if that feature check cou= ld > > >>> be used instead of moving the get_lightbar_version command and its > > >>> helper function around. > > >>> > > >> > > >> IIRC it was to support a very old device, the Pixel Chromebook (Link= ). This flag > > >> is not set in this device but has a lightbar, hence we had this 'wei= rd' way to > > >> detect the lightbar. > > >> > > >=20 > > > If that is the only reason, wouldn't it be better to use something > > > else (eg dmi_match) to determine if the system in question is a Pixel > > > Chromebook (Link) ? > > >=20 > > > if (!strcmp(ec_platform->ec_name, CROS_EC_DEV_NAME) && > > > (cros_ec_check_features(ec, EC_FEATURE_LIGHTBAR) || > > > dmi_match(DMI_PRODUCT_NAME, "Link")) { > > >=20 > >=20 > > That looks a better solution, indeed. And definetely I'd prefer use the= check > > features way. > >=20 > > Gwendal, can you confirm that the Pixel Chromebook (Link) is the _only_= one > > affected? This one is the only that comes to my mind but I might miss o= thers. > >=20 > > I think that Samus has this flag (I can double check) and this was disc= ussed > > with you (long, long time ago :-) ) > >=20 >=20 > Sounds fine by me. I'll wait for Gwendal to inform us. Anything come of this? I haven't seen any updates.