All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Yinbo Zhu <zhuyinbo@loongson.cn>,
	Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	zhanghongchen <zhanghongchen@loongson.cn>
Subject: Re: [PATCH v3 1/2] pinctrl: pinctrl-loongson2: add pinctrl driver support
Date: Thu, 27 Oct 2022 08:50:34 -0400	[thread overview]
Message-ID: <bfeefd8a-4ffa-70a3-b0df-48bfb8cd7124@linaro.org> (raw)
In-Reply-To: <542e661c-5aa3-a855-889f-6deb8a74584f@loongson.cn>

On 27/10/2022 04:20, Yinbo Zhu wrote:
> You can find these code has a change in this code conext.  I have a 
> feedback on this code.  but I mistakenly thought helper is dev_err_probe.
>          res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>          pctrl->reg_base = devm_ioremap_resource(dev, res);
>          if (IS_ERR(pctrl->reg_base))
> -               return PTR_ERR(pctrl->reg_base);
> +               return dev_err_probe(pctrl->dev, PTR_ERR(pctrl->reg_base),
> +                               "unable to map I/O memory");
> 
>          raw_spin_lock_init(&pctrl->lock);
> 
>>
>> There is a helper combining two calls into one. Grep for it in headers
>> and use it.
>>
> You said is that use "devm_platform_get_and_ioremap_resource" as a 
> helper? sorry, I will do it.

I believe the helper is devm_platform_ioremap_resource(), but I never
remember the names so just check in the sources.

Best regards,
Krzysztof


      reply	other threads:[~2022-10-27 12:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24  1:42 [PATCH v3 1/2] pinctrl: pinctrl-loongson2: add pinctrl driver support Yinbo Zhu
2022-10-24  1:42 ` [PATCH v3 2/2] dt-bindings: pinctrl: add loongson2 pinctrl Yinbo Zhu
2022-10-25 16:06   ` Krzysztof Kozlowski
2022-10-25 16:07 ` [PATCH v3 1/2] pinctrl: pinctrl-loongson2: add pinctrl driver support Krzysztof Kozlowski
2022-10-26  6:40   ` Yinbo Zhu
2022-10-26 14:11     ` Krzysztof Kozlowski
2022-10-27  8:20       ` Yinbo Zhu
2022-10-27 12:50         ` Krzysztof Kozlowski [this message]

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=bfeefd8a-4ffa-70a3-b0df-48bfb8cd7124@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=zhanghongchen@loongson.cn \
    --cc=zhuyinbo@loongson.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.