From: Dipen Patel <dipenp@nvidia.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: jonathanh@nvidia.com, linux-kernel@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-gpio@vger.kernel.org,
linus.walleij@linaro.org, devicetree@vger.kernel.org,
linux-doc@vger.kernel.org, robh+dt@kernel.org,
timestamp@lists.linux.dev
Subject: Re: [PATCH 2/7] hte: Add Tegra234 provider
Date: Tue, 27 Dec 2022 16:43:48 -0800 [thread overview]
Message-ID: <2cc8378a-3f74-d4b5-613d-f9112806ec92@nvidia.com> (raw)
In-Reply-To: <1a186be2-498a-a63b-a383-c165a9f8e732@nvidia.com>
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@nvidia.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
>
next prev parent reply other threads:[~2022-12-28 0:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 17:45 [PATCH 0/7] Add Tegra234 HTE support Dipen Patel
2022-11-03 17:45 ` [PATCH 1/7] MAINTAINERS: Add HTE/timestamp subsystem details Dipen Patel
2022-11-11 15:59 ` Thierry Reding
2022-11-03 17:45 ` [PATCH 2/7] hte: Add Tegra234 provider Dipen Patel
2022-11-11 16:01 ` Thierry Reding
2022-11-30 3:00 ` Dipen Patel
2022-12-28 0:43 ` Dipen Patel [this message]
2023-02-09 9:02 ` Thierry Reding
2022-11-03 17:45 ` [PATCH 3/7] gpio: tegra186: Add Tegra234 hte support Dipen Patel
2022-11-11 16:02 ` Thierry Reding
2022-11-03 17:45 ` [PATCH 4/7] dt-bindings: timestamp: Add Tegra234 support Dipen Patel
2022-11-07 20:06 ` Rob Herring
2022-11-30 2:55 ` Dipen Patel
2022-11-11 16:04 ` Thierry Reding
2022-11-03 17:45 ` [PATCH 5/7] hte: Re-phrase tegra API document Dipen Patel
2022-11-05 3:33 ` Bagas Sanjaya
2022-11-30 3:34 ` Dipen Patel
2022-11-30 3:43 ` Bagas Sanjaya
2022-11-03 17:45 ` [PATCH 6/7] arm64: tegra: Enable GTE nodes Dipen Patel
2022-11-03 17:45 ` [PATCH 7/7] arm64: defconfig: Enable HTE config Dipen Patel
2022-11-11 15:56 ` [PATCH 0/7] Add Tegra234 HTE support Thierry Reding
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=2cc8378a-3f74-d4b5-613d-f9112806ec92@nvidia.com \
--to=dipenp@nvidia.com \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=timestamp@lists.linux.dev \
/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
all inboxes | Powered by JetHome®