Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4178448ybl; Mon, 9 Dec 2019 06:43:32 -0800 (PST) X-Google-Smtp-Source: APXvYqzOv3VnuLz830SDkt441+P6HgZrhz5oBlwGIsLgAlyExYuREN3ExyItK7QdRtPdGHOKDcM3 X-Received: by 2002:aca:ec4d:: with SMTP id k74mr22916051oih.64.1575902612395; Mon, 09 Dec 2019 06:43:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575902612; cv=none; d=google.com; s=arc-20160816; b=d/rfzNdF7D+MT5OajwxuOUnBL8TQkF+wqoLlHARG5Ur9Vi+NB1qWhkfFX9rYpkr3sv f+eYytMfGLREA9QuyQjAGxbLF+VsTucch7Lva26xyOkFw18Nv3Yp4A9m8B1IDcToYRjP a4KID2KGMcfoTzpyZZ+gHwuGBIEd1HugsztakSvc3k1njlt8/pJpKJCHiYSlEyFPp09L Jsppli+PA0rpZmf7LdCQ7wkxaP7DngXVNgv+Z592M5U+q65GzOUnRTlmK2DkCBo0wWgE qa+uCXO6gs7fPkmR5mKD/UPn7dg6tbi248W/bJ+zjuFP17MKRjg1DRmoIJNNJE/eLTec g6PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=McW/DefalRm0q/Tp9SncZQm+h+msmm3obYgF/c1Zyxo=; b=ZtZX6KZSoWUciqM2hIHkpS3AYJeoaMyD7Eeyrg7U3g4vkS8kCVWg5AJyIzbylhfCJd hA11nXoN81kSim5fuLYJWcXRodSSPEDUf51mpzJhwWwTKd9I/unTsI1VEmhBTcXQCCmM jxlSqQIisAkJgaqSpp4QE5tFivEErq+0r79bGx9JuwG8T9F5vg7Re5uqsIOMwrTW51Ua Jpawj3u7+uVSZbWbayCNE28EfDcmhicKwzsI5s0YPpYrfpNTXbKPJv2qhg7RWrrmpf+x uHZjaJWDX4NRpMwrhd+PuWw6Fzwg+r8XaH88VLkfknudpkS4VLkhVSMsLMI1FY4H2mf0 KWEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7si11534149oir.183.2019.12.09.06.43.20; Mon, 09 Dec 2019 06:43:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727755AbfLIOli (ORCPT + 99 others); Mon, 9 Dec 2019 09:41:38 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:45780 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726687AbfLIOli (ORCPT ); Mon, 9 Dec 2019 09:41:38 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 5505B28B60A Subject: Re: [PATCH 4/4] platform/chrome: i2c: i2c-cros-ec-tunnel: Convert i2c tunnel to MFD Cell To: Lee Jones , Raul E Rangel Cc: Wolfram Sang , Akshu.Agrawal@amd.com, Guenter Roeck , Chanwoo Choi , linux-kernel@vger.kernel.org, Alexandre Belloni , linux-i2c@vger.kernel.org, Benson Leung References: <20191121211053.48861-1-rrangel@chromium.org> <20191121140830.4.Iddc7dd74f893297cb932e9825d413e7890633b3d@changeid> <20191209131745.GM3468@dell> From: Enric Balletbo i Serra Message-ID: <6f6b0ac7-37d8-e2a1-3249-223905c2a5b1@collabora.com> Date: Mon, 9 Dec 2019 15:41:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191209131745.GM3468@dell> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lee, On 9/12/19 14:17, Lee Jones wrote: > On Thu, 21 Nov 2019, Raul E Rangel wrote: > >> If the i2c-cros-ec-tunnel driver is compiled into the kernel, it is >> possible that i2c-cros-ec-tunnel could be probed before cros_ec_XXX >> has finished initializing and setting the drvdata. This would cause a >> NULL pointer panic. >> >> Converting this driver over to an MFD solves the problem and aligns with >> where the cros_ec is going. >> >> Signed-off-by: Raul E Rangel >> --- >> You can now see the device node lives under the mfd device. >> >> $ find /sys/bus/platform/devices/cros-ec-dev.0.auto/cros-ec-i2c-tunnel.12.auto/ -iname firmware_node -exec ls -l '{}' \; >> /sys/bus/platform/devices/cros-ec-dev.0.auto/cros-ec-i2c-tunnel.12.auto/firmware_node -> ../../../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c/PNP0C09:00/GOOG0004:00/GOOG0012:00 >> /sys/bus/platform/devices/cros-ec-dev.0.auto/cros-ec-i2c-tunnel.12.auto/i2c-9/firmware_node -> ../../../../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c/PNP0C09:00/GOOG0004:00/GOOG0012:00 >> /sys/bus/platform/devices/cros-ec-dev.0.auto/cros-ec-i2c-tunnel.12.auto/i2c-9/i2c-10EC5682:00/firmware_node -> ../../../../../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c/PNP0C09:00/GOOG0004:00/GOOG0012:00/10EC5682:00 >> >> drivers/i2c/busses/i2c-cros-ec-tunnel.c | 36 +++++++++---------------- >> drivers/mfd/cros_ec_dev.c | 19 +++++++++++++ > > For my own reference: > Acked-for-MFD-by: Lee Jones > Note that there is a v2 for this patch and I did some comments [1] Thanks, Enric [1] https://patchwork.ozlabs.org/patch/1200560/