From: Jon Hunter <jonathanh@nvidia.com>
To: Akhil R <akhilrajeev@nvidia.com>,
christian.koenig@amd.com, digetx@gmail.com, ldewangan@nvidia.com,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-tegra@vger.kernel.org, sumit.semwal@linaro.org,
thierry.reding@gmail.com, wsa@kernel.org
Cc: Zubair Waheed <zwaheed@nvidia.com>
Subject: Re: [PATCH] i2c: tegra: Set ACPI node as primary fwnode
Date: Fri, 18 Nov 2022 09:38:52 +0000 [thread overview]
Message-ID: <29db0e24-4f7c-e3dc-91ce-2decf6a253a5@nvidia.com> (raw)
In-Reply-To: <20221117100415.20457-1-akhilrajeev@nvidia.com>
On 17/11/2022 10:04, Akhil R wrote:
> Set ACPI node as the primary fwnode of I2C adapter to allow
> enumeration of child devices from the ACPI table
>
> Signed-off-by: Zubair Waheed <zwaheed@nvidia.com>
> Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
> ---
> drivers/i2c/busses/i2c-tegra.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index 954022c04cc4..69c9ae161bbe 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -1826,6 +1826,7 @@ static int tegra_i2c_probe(struct platform_device *pdev)
> i2c_dev->adapter.class = I2C_CLASS_DEPRECATED;
> i2c_dev->adapter.algo = &tegra_i2c_algo;
> i2c_dev->adapter.nr = pdev->id;
> + ACPI_COMPANION_SET(&i2c_dev->adapter.dev, ACPI_COMPANION(&pdev->dev));
>
> if (i2c_dev->hw->supports_bus_clear)
> i2c_dev->adapter.bus_recovery_info = &tegra_i2c_recovery_info;
Do we always want to set as the primary fwnode even when booting with
device-tree? I some other drivers do, but I also see some others ...
if (has_acpi_companion(dev))
ACPI_COMPANION_SET(&i2c_dev->adapter.dev,
ACPI_COMPANION(&pdev->dev));
It would be nice to know why it is OK to always do this even for
device-tree because it is not clear to me.
Jon
--
nvpublic
next prev parent reply other threads:[~2022-11-18 9:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 10:04 [PATCH] i2c: tegra: Set ACPI node as primary fwnode Akhil R
2022-11-17 22:01 ` Thierry Reding
2022-11-18 9:38 ` Jon Hunter [this message]
2022-11-18 10:18 ` Thierry Reding
2022-11-18 11:06 ` Jon Hunter
2022-11-18 14:27 ` Akhil R
2022-11-18 14:39 ` Jon Hunter
2022-12-01 23:03 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29db0e24-4f7c-e3dc-91ce-2decf6a253a5@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=akhilrajeev@nvidia.com \
--cc=christian.koenig@amd.com \
--cc=digetx@gmail.com \
--cc=ldewangan@nvidia.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
--cc=thierry.reding@gmail.com \
--cc=wsa@kernel.org \
--cc=zwaheed@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox