Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4312440pxv; Tue, 29 Jun 2021 04:11:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxO40Cytp5/EY/TXYGeY0h8bqu302QKg1rjSp3XRNbCSwU7qzAYkGx8UN6KU1pOQz/9vP5T X-Received: by 2002:a17:906:680f:: with SMTP id k15mr28942638ejr.75.1624965102275; Tue, 29 Jun 2021 04:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624965102; cv=none; d=google.com; s=arc-20160816; b=0VmGjUmQBqMvQYKb4Lqv1CJTeYuJ6Hh5JmL4ioZmhSNH3Ef9OIlpHMbIDb9oXigVRN 5yXlAFtV+231iVssMQyW9/xrTU2y+SDuJ8Ikx5uN2VB8eUoQAitzkN7ltC5fJF1jCJPn laA58k6o8CRVA4R8DO/PG++2kf+Fg9JHD96lfmQa55PBo5BKtOwftc0ndhWFYRPSNY8x TA10c7Z2yR5wFFAkoyAKeSzisnTGU+xUQrseMNYkxE3t0shVtlnEKenT0N0irFhkcEPB xq/2y9SvhgWUJmdjl665a0b1DfMemHcoxnxmVOa29Hzq6s8KHzYDa3qWKya3cVvrVDRX LkyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Ak/3bb0l9MdxbSnvo2Kh8v3tqSW9fCqyQPxY9ygFbE8=; b=diO5ED0dEbiatNZAq0TiZZP0UexHoldPqfTjewq36HYNXbJzx2TR782/iavmJ/h36O CIwxbnU4e8f/QfkAWKUnSFZmQ85j/MCjYqw2perY7Z9junpjz7Xp8aZu/dt8A06TIhTk LeuuWn9TYoQuZcNSwRj9Nj51YraXtgAvWkmyCdG8XfZulZkODAnSdPjNAjAgxni7dUv4 H+dAtTcS8SKOHGRGj48BXaSkn/yCkjOrvbN8d2w3IqT6ZF4NJU+z8bpcO/aLeZjyICrS tsLR5Zb3jxqFNa+TI4eX27WiBNMPiOw6mI8St7dRGgzpIOyQKNN/zSaIkwqXyBzrip3S ZEjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RDGtg3+r; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kl25si16893191ejc.370.2021.06.29.04.11.18; Tue, 29 Jun 2021 04:11:42 -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=@kernel.org header.s=k20201202 header.b=RDGtg3+r; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233162AbhF2LMb (ORCPT + 99 others); Tue, 29 Jun 2021 07:12:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:55826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233096AbhF2LMa (ORCPT ); Tue, 29 Jun 2021 07:12:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3FD8361402; Tue, 29 Jun 2021 11:10:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624965003; bh=aDuuW2GEzASRK/JOBa8fF+QifZw6Yrwn9e43amoOVeM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RDGtg3+rYXZHprE7+5lMsMKUlfwqhudy0J/dPTvseRK0Jue4MR9Wyu9y0L9E1YgRi yzBItVBX6HjNNZGGA7b5iAJr+pMtR83cWot4i9ej/YZqOuK9q6N/dm5qTyVWVRadln r7FdsrpFhNUSf35jZ/wZ9bn4znxPMJabr/3iWJDZyIrelNXjeVOMhhMMzbIv/tYczX qlYz2m+Geabrghmn3e3kt3+pr3xkpodw4iwPsCg/75kirmd5W7piVkNI2giPhuX7j5 ukXoIHgEpinS+MlsYqcKENZjhTNYw51k6GglzImtEmDy6ldLtuz8dQus9jtI17yWEF nTrcsr3absYbw== Date: Tue, 29 Jun 2021 13:09:57 +0200 From: Mauro Carvalho Chehab To: Axel Lin Cc: Greg Kroah-Hartman , linuxarm@huawei.com, mauro.chehab@huawei.com, Lee Jones , Arnd Bergmann , Liam Girdwood , Mark Brown , LKML , linux-staging@lists.linux.dev Subject: Re: [PATCH v10 2/5] regulator: hi6421v600-regulator: fix platform drvdata Message-ID: <20210629130957.484f5c43@coco.lan> In-Reply-To: References: X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, 29 Jun 2021 18:48:31 +0800 Axel Lin escreveu: > Mauro Carvalho Chehab =E6=96=BC 2021=E5=B9=B4= 6=E6=9C=8829=E6=97=A5 =E9=80=B1=E4=BA=8C =E4=B8=8B=E5=8D=886:31=E5=AF=AB=E9= =81=93=EF=BC=9A >=20 > > platform drvdata can't be used inside the regulator driver, > > as this is already used by the MFD and SPMI drivers. > > =20 >=20 > Could you point out which part of the code set the platform drvdata? > My understanding is the mfd only set dev->platform_data rather than > dev->driver_data. > If you mean the dev_set_drvdata() call in hi6421_spmi_pmic_probe, it's the > parent device of the regulator pdev. It needs to be double-checked, but I guess the SPMI or the SPMI controller driver already uses it. See, there are 5 drivers involved, all of them using private data and passing data to child drivers, called on the order below: spmi hisi-spmi-controller hi6421-spmi-pmic mfd drivers: hi6421v600-irq hi6421-regulator If you're in doubt, try to apply this series, and then change the driver again to use platform data. You'll see that it will stop booting after initializing the first regulator. Thanks, Mauro