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]
Message-ID: <d3c77a86-f152-cad3-6087-6167656c4c9e@linaro.org>
Date:   Thu, 27 Jul 2023 11:03:57 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Okan Sahin <okan.sahin@...log.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        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
Subject: Re: [PATCH v4 2/2] gpio: ds4520: Add ADI DS4520 GPIO Expander Support

On 27/07/2023 10:52, Okan Sahin wrote:
> The DS4520 is a 9-bit nonvolatile (NV) I/O expander.
> It offers users a digitally programmable alternative
> to hardware jumpers and mechanical switches that are
> being used to control digital logic node.
> 
> Signed-off-by: Okan Sahin <okan.sahin@...log.com>

...

> +static int ds4520_gpio_probe(struct i2c_client *client)
> +{
> +	struct gpio_regmap_config config = { };
> +	struct device *dev = &client->dev;
> +	struct regmap *regmap;
> +	u32 ngpio;
> +	u32 base;
> +	int ret;
> +
> +	ret = device_property_read_u32(dev, "reg", &base);
> +	if (ret) {
> +		dev_err_probe(dev, ret,
> +			  "Missing 'reg' property.\n");
> +		return -EINVAL;

Nope.

> +	}
> +
> +	ret = device_property_read_u32(dev, "ngpios", &ngpio);
> +	if (ret) {
> +		dev_err_probe(dev, ret,
> +			  "Missing 'ngpios' property.\n");
> +		return -EINVAL;

Nope.

> +	}
> +
> +	regmap = devm_regmap_init_i2c(client, &ds4520_regmap_config);
> +	if (IS_ERR(regmap)) {
> +		ret = PTR_ERR(regmap);
> +		dev_err_probe(dev, ret,
> +			      "Failed to allocate register map\n");
> +		return ret;

That's not correct syntax. What did you receive in previous
comments/feedback?

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ