[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86521cdf-1dc6-4b37-b356-160142674285@wanadoo.fr>
Date: Tue, 31 Dec 2024 18:31:07 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: mathieu.dubois-briand@...tlin.com, Lee Jones <lee@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Kamel Bouhara
<kamel.bouhara@...tlin.com>, Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Uwe Kleine-König <ukleinek@...nel.org>
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-gpio@...r.kernel.org, linux-input@...r.kernel.org,
linux-pwm@...r.kernel.org, Grégory Clement
<gregory.clement@...tlin.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v2 3/7] pwm: max7360: Add MAX7360 PWM support
Le 23/12/2024 à 17:42, mathieu.dubois-briand@...tlin.com a écrit :
> From: Kamel Bouhara <kamel.bouhara@...tlin.com>
>
> Add driver for Maxim Integrated MAX7360 PWM controller, supporting up to
> 8 independent PWM outputs.
>
> Signed-off-by: Kamel Bouhara <kamel.bouhara@...tlin.com>
> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@...tlin.com>
...
> +static int max7360_pwm_probe(struct platform_device *pdev)
> +{
> + struct max7360_pwm *max7360_pwm;
> + struct pwm_chip *chip;
> + int ret;
> +
> + if (!pdev->dev.parent)
> + return dev_err_probe(&pdev->dev, -ENODEV, "no parent device\n");
> +
> + chip = devm_pwmchip_alloc(pdev->dev.parent, MAX7360_NUM_PWMS,
> + sizeof(*max7360_pwm));
> + if (IS_ERR(chip))
> + return PTR_ERR(chip);
> + chip->ops = &max7360_pwm_ops;
> +
> + max7360_pwm = to_max7360_pwm(chip);
> + max7360_pwm->parent = pdev->dev.parent;
> +
> + max7360_pwm->regmap = dev_get_regmap(pdev->dev.parent, NULL);
> + if (!max7360_pwm->regmap)
> + return dev_err_probe(&pdev->dev, -ENODEV,
> + "could not get parent regmap\n");
> +
> + ret = devm_pwmchip_add(&pdev->dev, chip);
> + if (ret != 0)
> + dev_err_probe(&pdev->dev, ret, "failed to add PWM chip");
Missing return, or done on purpose?
> +
> + return 0;
> +}
Powered by blists - more mailing lists