Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp64736pxh; Thu, 7 Apr 2022 14:06:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw47H5YWOMT3fPNkwfKyHYOvbRaKdaU6yMuZMpqDoNpcShYEH+1k/PrmB7N2KN85GKmM6LK X-Received: by 2002:a62:384b:0:b0:505:79b6:52ee with SMTP id f72-20020a62384b000000b0050579b652eemr833612pfa.48.1649365579264; Thu, 07 Apr 2022 14:06:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649365579; cv=none; d=google.com; s=arc-20160816; b=mgLrYPxK/bbc1lFEhF8mx4VQyvFobSpOQODXvG9+panBXBTF0qpZ+SRiyujuQ/BCNK YytzuOf16tMbEDhdNWnGHycATWJL9TDOQLGu2sBuceEfrQ1IYz167Bfkk27cFpG1qHWe 0onBFAYtPVWyntQ2oVae5Gp5uOdR6S0bZb6ZjYa5NZAkW2l3g2bqFwzyYc/dYG/xvHy8 4JugA7913tFaU5KcO2Zk6yryRBcDleKteUY2VQF4ehdWx3M0b/PHC+6jq/5z67zQv5Hw A3u7JWqNAKpeTq8Pjf9fAIdTyxlGYshqbn3nU6IAAbB97LEAQsqDCdXnFnGX9E0Lomg9 nBEA== 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=+Cg1pUySQC4X4kBYk+LJTlgqyGdH2p2daDW19hb2yNA=; b=PchDBx5WcKlJmZcs0oevherq3Ep0p9+woQBa/SA2KN7q8FrpAqam4okqWw32sYQy3m AMfEPqe1RByDHcizUBJ0ZBEC5OMgE1KzfyhDTfKRyzqYBI9/XFca9yB2Xzh+stt4pwBu QfdacqBMzy8R9SlZ3X2nJUFycYKxuEqUGTkEScrv5rZ+rdFOhhTSJn3nE/gjTvknJ9U5 u5lPsAdNWgDX858XegG4pqLXCOxQS18/9SFFw+CkCqSPoka2DIouQgT2eyH10jiWKDVn xrqxzJxP3ash/jOjkuoE0VYeAiFVmiebS1FbwduU9+cc0quAlbxuCwvjdE+gyj9iRlj+ Yq2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=WOsUq3Sl; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c13-20020aa78c0d000000b004fb0c7ab1easi17429210pfd.302.2022.04.07.14.06.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 14:06:19 -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=@google.com header.s=20210112 header.b=WOsUq3Sl; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8EC8A47EF53; Thu, 7 Apr 2022 13:12:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238579AbiDGRLW (ORCPT + 99 others); Thu, 7 Apr 2022 13:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbiDGRLU (ORCPT ); Thu, 7 Apr 2022 13:11:20 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC2241CABED for ; Thu, 7 Apr 2022 10:09:19 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id kw18so6150011pjb.5 for ; Thu, 07 Apr 2022 10:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=+Cg1pUySQC4X4kBYk+LJTlgqyGdH2p2daDW19hb2yNA=; b=WOsUq3SlF033ixeQW0PYz1silnSsmCb4wzQqxZHnZOCDj2RxPdRr+wEWvW2TRnvdYc +Tdf0RWYgStx77KCZOTyjia4y2D4SrbYXy0H5/rS1hfnTudlxD9WP+yMWGRnMAHhQz5H k+COor9aKkFhtNrr2zuCpGP/vejeRd0y4NuHJoz/ApsEwjmr5vY7gN62t/UtRBemCI/d RvVvuydMRJc6XoRkrBCTizHXSLDqv4Cg1lo5iJy+Z8vjRVZo/pPl/Wlx9kMiDGww9QL5 +vbbank+1QmSmmTm2E6+j9UvoCJ0DN7/EYC0L3xEDS/BceQwTcUlN6PH9vKhYxvZgwA7 gJfw== 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=+Cg1pUySQC4X4kBYk+LJTlgqyGdH2p2daDW19hb2yNA=; b=y3kGDZgdFmE2zd4gLgrVzIfGYfI/3cub72oY+D+PhDzHy/+xmEhNb/wJRiQqj9p52b 1T42dsqVb445rrR+wKw24Bd/PPhgx3UVwXj1LRIvrnwnivUBoefKFdAELZvJLe9ygdDC xao2tXQCpOvjf4gg1uNZy1D5Kb7A5oYVVmBqPJE9dlwUlMEM9mcBYAs5Jl00lkx6S4d1 kDBCo3ld6ll6/mR0xDX7Olkd0LyURMQJ06fNrO4wZGCNS+jN8EUsN8F33jmOzjFoYM17 sk5ngcfV2e+nQxPGuxjr1rOL0Z198GaAU+yY0VzcGa3klZzFX5uDA9XqQILL+3TUSeqD kqeQ== X-Gm-Message-State: AOAM533lfZewp/wp7vbxnQ0f51Mg1zq6VYZd33sMVRoF7JLkck5mRohM UkFgSWuGqBNpN5uP43h2KgAAKg== X-Received: by 2002:a17:90b:124c:b0:1bc:369b:7db5 with SMTP id gx12-20020a17090b124c00b001bc369b7db5mr16823881pjb.179.1649351358878; Thu, 07 Apr 2022 10:09:18 -0700 (PDT) Received: from google.com ([2620:15c:202:201:3a11:864:6d11:d714]) by smtp.gmail.com with ESMTPSA id z5-20020a056a00240500b004e15d39f15fsm23672403pfh.83.2022.04.07.10.09.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 10:09:17 -0700 (PDT) Date: Thu, 7 Apr 2022 10:09:10 -0700 From: Benson Leung To: Akihiko Odaki Cc: Guenter Roeck , Prashant Malani , linux-kernel , chrome-platform@lists.linux.dev, Benson Leung , Guenter Roeck Subject: Re: [PATCH] platform/chrome: cros_ec_typec: Check for EC driver Message-ID: References: <20220404041101.6276-1-akihiko.odaki@gmail.com> <033c1ec4-4bee-a689-140c-9694dfee435b@gmail.com> <0fdba110-8743-3b2d-cb30-3a89b7cfa592@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="viQeAp1xsC0BfER1" Content-Disposition: inline In-Reply-To: <0fdba110-8743-3b2d-cb30-3a89b7cfa592@gmail.com> X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL 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 --viQeAp1xsC0BfER1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Akihiko, On Fri, Apr 08, 2022 at 02:03:52AM +0900, Akihiko Odaki wrote: > If I read the code correctly, the registration itself happens synchronous= ly > and platform_device_register_data() always returns a non-NULL value unless > it returns -ENOMEM. The driver, however, can be asynchronously bound and > dev_get_drvdata(&typec->ec->ec->dev) can return NULL as the consequence. = It > would have a call trace like the following when scheduling asynchronous > driver binding: > platform_device_register_data() > platform_device_register_resndata() > platform_device_register_full() > - This always creates and returns platform_device. > platform_device_add() > - This adds the created platform_device. > device_add() > bus_probe_device() > device_initial_probe() > __device_attach() > - This schedules asynchronous probing. >=20 > typec->ec->ec should be pointing to the correct platform_device as the > patched driver works without Oops on my computer. It is not NULL at least. Can you provide more information about your test computer in this case? Is it a Chromebook running stock firmware (if so, please let us know which model, and which firmware version it is running). In the past, we've also gotten some reports from people running MrChromebox custom firmware on older Chromebooks which have exposed other bugs in this driver. Let us know if that's the case here, and where we can get that firmware. Thanks, Benson --=20 Benson Leung Staff Software Engineer Chrome OS Kernel Google Inc. bleung@google.com Chromium OS Project bleung@chromium.org --viQeAp1xsC0BfER1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQCtZK6p/AktxXfkOlzbaomhzOwwgUCYk8atgAKCRBzbaomhzOw wmvhAQC0z35R8BEqy4d5pAQ7va0d1etqr1514DiP+ue65mnFZQEAvqbl4NnrC8Hb OmwQDepne2orty0TN9Oc7qQwZyc2vQY= =Rr0T -----END PGP SIGNATURE----- --viQeAp1xsC0BfER1--