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]
Date:   Tue, 27 Dec 2022 16:43:48 -0800
From:   Dipen Patel <dipenp@...dia.com>
To:     Thierry Reding <thierry.reding@...il.com>
Cc:     jonathanh@...dia.com, linux-kernel@...r.kernel.org,
        linux-tegra@...r.kernel.org, linux-gpio@...r.kernel.org,
        linus.walleij@...aro.org, devicetree@...r.kernel.org,
        linux-doc@...r.kernel.org, robh+dt@...nel.org,
        timestamp@...ts.linux.dev
Subject: Re: [PATCH 2/7] hte: Add Tegra234 provider

On 11/29/22 7:00 PM, Dipen Patel wrote:
> On 11/11/22 8:01 AM, Thierry Reding wrote:
>> On Thu, Nov 03, 2022 at 10:45:18AM -0700, Dipen Patel wrote:
>>> The Tegra234 AON GPIO instance and LIC IRQ support HTE. For the GPIO
>>> HTE support, it requires to add mapping between GPIO and HTE framework.
>>>
>>> Signed-off-by: Dipen Patel <dipenp@...dia.com>
>>> ---
>>>  drivers/hte/hte-tegra194-test.c |   2 +-
>>>  drivers/hte/hte-tegra194.c      | 124 ++++++++++++++++++++++++++++++--
>>>  2 files changed, 121 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/hte/hte-tegra194-test.c b/drivers/hte/hte-tegra194-test.c
>>> index 5d776a185bd6..d79c28a80517 100644
>>> --- a/drivers/hte/hte-tegra194-test.c
>>> +++ b/drivers/hte/hte-tegra194-test.c
>>> @@ -16,7 +16,7 @@
>>>  #include <linux/hte.h>
>>>  
<snip>
>>>  MODULE_DEVICE_TABLE(of, tegra_hte_of_match);
>>> @@ -635,8 +742,17 @@ static int tegra_hte_probe(struct platform_device *pdev)
>>>  
>>>  		gc->match_from_linedata = tegra_hte_match_from_linedata;
>>>  
>>> -		hte_dev->c = gpiochip_find("tegra194-gpio-aon",
>>> -					   tegra_get_gpiochip_from_name);
>>> +		if (of_device_is_compatible(dev->of_node,
>>> +					    "nvidia,tegra194-gte-aon"))
>>> +			hte_dev->c = gpiochip_find("tegra194-gpio-aon",
>>> +						tegra_get_gpiochip_from_name);
>>> +		else if (of_device_is_compatible(dev->of_node,
>>> +						 "nvidia,tegra234-gte-aon"))
>>> +			hte_dev->c = gpiochip_find("tegra234-gpio-aon",
>>> +						tegra_get_gpiochip_from_name);
>>> +		else
>>> +			return -ENODEV;
>>
>> I'm wondering: instead of doing this cumbersome lookup, perhaps it would
>> be easier to create a direct link to the right GPIO controller with a
>> phandle?
> Possible, need to see if gpiod framework has API exposed to get the gpiochip from
> the phandle.

Thierry, I can not find any API which can help retrieve gpio_chip from the GPIO controller
phandle. I need gpio_chip->base to map GPIO line to GTE mapping.

>>
>> Thierry
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ