mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yinbo Zhu <zhuyinbo@loongson.cn>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	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>,
	zhuyinbo@loongson.cn
Subject: Re: [PATCH v3 1/2] pinctrl: pinctrl-loongson2: add pinctrl driver support
Date: Wed, 26 Oct 2022 14:40:39 +0800	[thread overview]
Message-ID: <841bad76-e19c-e400-e46a-2a83986c29eb@loongson.cn> (raw)
In-Reply-To: <a5a5c18f-476c-2f45-8cd0-3c88b3aa509d@linaro.org>



在 2022/10/26 上午12:07, Krzysztof Kozlowski 写道:
> On 23/10/2022 21:42, Yinbo Zhu wrote:
>> The loongson2 SoC has a few pins that can be used as GPIOs or take
>> multiple other functions. Add a driver for the pinmuxing.
>>
>> There is currently no support for GPIO pin pull-up and pull-down.
> 
> Thank you for your patch. There is something to discuss/improve.
> 
>> +static const struct pinmux_ops loongson2_pmx_ops = {
>> +	.set_mux = loongson2_pmx_set_mux,
>> +	.get_functions_count = loongson2_pmx_get_funcs_count,
>> +	.get_function_name = loongson2_pmx_get_func_name,
>> +	.get_function_groups = loongson2_pmx_get_groups,
>> +};
>> +
>> +static int loongson2_pinctrl_probe(struct platform_device *pdev)
>> +{
>> +	struct device *dev = &pdev->dev;
>> +	struct loongson2_pinctrl *pctrl;
>> +	struct resource *res;
>> +
>> +	pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL);
>> +	if (!pctrl)
>> +		return -ENOMEM;
>> +
>> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> +	pctrl->reg_base = devm_ioremap_resource(dev, res);
> 
> This is still not fixed.
sorry, I don't get your meaning about "Use combined helper for this."
please you tell me more specific.

Thanks.

BRs
Yinbo
> 
>> +	if (IS_ERR(pctrl->reg_base))
>> +		return dev_err_probe(pctrl->dev, PTR_ERR(pctrl->reg_base),
>> +				     "unable to map I/O memory");
> 
> 
> Best regards,
> Krzysztof
> 


  reply	other threads:[~2022-10-26  6:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24  1:42 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 [this message]
2022-10-26 14:11     ` Krzysztof Kozlowski
2022-10-27  8:20       ` Yinbo Zhu
2022-10-27 12:50         ` Krzysztof Kozlowski

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=841bad76-e19c-e400-e46a-2a83986c29eb@loongson.cn \
    --to=zhuyinbo@loongson.cn \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@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 \
    /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®