[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0b6a7895-bd87-4edb-b392-5000124ad133@linaro.org>
Date: Mon, 22 Jan 2024 14:14:25 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Philipp Zabel <p.zabel@...gutronix.de>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Banajit Goswami <bgoswami@...cinc.com>, Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, Peter Rosin <peda@...ntia.se>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
linux-arm-msm@...r.kernel.org, alsa-devel@...a-project.org,
linux-sound@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org
Cc: Bartosz Golaszewski <brgl@...ev.pl>,
Chris Packham <chris.packham@...iedtelesis.co.nz>,
Sean Anderson <sean.anderson@...o.com>
Subject: Re: [PATCH v3 2/5] reset: Instantiate reset GPIO controller for
shared reset-gpios
On 17/01/2024 12:26, Philipp Zabel wrote:
> On Fr, 2024-01-12 at 17:36 +0100, Krzysztof Kozlowski wrote:
> [...]
>> struct reset_control *
>> __of_reset_control_get(struct device_node *node, const char *id, int index,
>> bool shared, bool optional, bool acquired)
>> {
>> + struct of_phandle_args args = {0};
>> + bool gpio_fallback = false;
>> struct reset_control *rstc;
>> - struct reset_controller_dev *r, *rcdev;
>> - struct of_phandle_args args;
>> + struct reset_controller_dev *rcdev;
>> int rstc_id;
>> int ret;
>>
>> @@ -839,39 +1028,49 @@ __of_reset_control_get(struct device_node *node, const char *id, int index,
>> index, &args);
>> if (ret == -EINVAL)
>> return ERR_PTR(ret);
>> - if (ret)
>> - return optional ? NULL : ERR_PTR(ret);
>> + if (ret) {
>
> I think this should continue to return optional ? NULL : ERR_PTR(ret)
> if !IS_ENABLED(CONFIG_RESET_GPIO), for example by just skipping the
> of_parse_phandle_with_args(). That should allow the GPIO fallback in
> patch 5 to work as expected.
>
ack
Best regards,
Krzysztof
Powered by blists - more mailing lists