lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <29db0e24-4f7c-e3dc-91ce-2decf6a253a5@nvidia.com>
Date:   Fri, 18 Nov 2022 09:38:52 +0000
From:   Jon Hunter <jonathanh@...dia.com>
To:     Akhil R <akhilrajeev@...dia.com>, christian.koenig@....com,
        digetx@...il.com, ldewangan@...dia.com, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
        sumit.semwal@...aro.org, thierry.reding@...il.com, wsa@...nel.org
Cc:     Zubair Waheed <zwaheed@...dia.com>
Subject: Re: [PATCH] i2c: tegra: Set ACPI node as primary fwnode


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@...dia.com>
> Signed-off-by: Akhil R <akhilrajeev@...dia.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ