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:   Wed, 26 Oct 2022 14:40:39 +0800
From:   Yinbo Zhu <zhuyinbo@...ngson.cn>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        linux-gpio@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        zhanghongchen <zhanghongchen@...ngson.cn>, zhuyinbo@...ngson.cn
Subject: Re: [PATCH v3 1/2] pinctrl: pinctrl-loongson2: add pinctrl driver
 support



在 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
> 

Powered by blists - more mailing lists