[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <69d464d3-ef42-484f-8c68-9ed0e22ee6fd@kernel.org>
Date: Wed, 1 Nov 2023 11:44:05 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: "larry.lai" <larry.lai@...jingtech.com>, lee@...nel.org,
andriy.shevchenko@...ux.intel.com, linus.walleij@...aro.org,
pavel@....cz
Cc: linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-leds@...r.kernel.org, GaryWang@...on.com.tw,
musa.lin@...jingtech.com, jack.chang@...jingtech.com,
noah.hung@...jingtech.com
Subject: Re: [PATCH V7 3/3] leds: Add support for UP board CPLD onboard LEDS
On 31/10/2023 02:51, larry.lai wrote:
> The UP boards come with a few FPGA-controlled onboard LEDs:
> * UP Board: yellow, green, red
> * UP Squared: blue, yellow, green, red
>
> This patch depends on patch "mfd: Add support for UP board CPLD/FPGA".
Your commit msg should not describe dependencies within patches. Cover
letter or --- changelog should. This is totally irrelevant for the git
history.
>
> Signed-off-by: Gary Wang <garywang@...on.com.tw>
> Signed-off-by: larry.lai <larry.lai@...jingtech.com>
...
> +
> +static int __init upboard_led_probe(struct platform_device *pdev)
Same problems.
> +{
> + struct upboard_fpga * const cpld = dev_get_drvdata(pdev->dev.parent);
> + struct reg_field fldconf = {
> + .reg = UPFPGA_REG_FUNC_EN0,
> + };
> + struct upboard_led_data * const pdata = pdev->dev.platform_data;
> + struct upboard_led *led;
> +
> + /* check & register GPIO LEDs */
> + if (strstr(pdata->colour, "gpio"))
> + return upboard_led_gpio_register(cpld);
> +
> + led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL);
> + if (!led)
> + return -ENOMEM;
> +
> + fldconf.lsb = pdata->bit;
> + fldconf.msb = pdata->bit;
> + led->field = devm_regmap_field_alloc(&pdev->dev, cpld->regmap, fldconf);
> + if (IS_ERR(led->field))
> + return PTR_ERR(led->field);
> +
> + led->cdev.brightness_get = upboard_led_brightness_get;
> + led->cdev.brightness_set = upboard_led_brightness_set;
> + led->cdev.name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "upboard:%s:", pdata->colour);
> + if (!led->cdev.name)
> + return -ENOMEM;
> +
> + return devm_led_classdev_register(&pdev->dev, &led->cdev);
> +};
> +
> +static struct platform_driver upboard_led_driver = {
> + .driver = {
> + .name = "upboard-led",
> + },
> +};
> +module_platform_driver_probe(upboard_led_driver, upboard_led_probe);
> +
> +MODULE_AUTHOR("Gary Wang <garywang@...on.com.tw>");
> +MODULE_DESCRIPTION("UP Board LED driver");
> +MODULE_LICENSE("GPL v2");
> +MODULE_ALIAS("platform:upboard-led");
Same problem.
Best regards,
Krzysztof
Powered by blists - more mailing lists