Re: [PATCH v4 1/2] leds: flash: add driver to support flash LED module in QCOM PMICs
From: Luca Weiss
Date: Mon Oct 31 2022 - 09:56:59 EST
Hi Fenglin,
On Tue Oct 25, 2022 at 9:38 AM CEST, Fenglin Wu wrote:
> Add initial driver to support flash LED module found in Qualcomm
> Technologies, Inc. PMICs. The flash module can have 3 or 4 channels
> and each channel can be controlled indepedently and support full scale
> current up to 1.5 A. It also supports connecting two channels together
> to supply one LED component with full scale current up to 2 A. In that
> case, the current will be split on each channel symmetrically and the
> channels will be enabled and disabled at the same time.
>
> Signed-off-by: Fenglin Wu <quic_fenglinw@xxxxxxxxxxx>
> Tested-by: Luca Weiss <luca.weiss@xxxxxxxxxxxxx> # sm7225-fairphone-fp4 + pm6150l
> ---
> drivers/leds/flash/Kconfig | 15 +
> drivers/leds/flash/Makefile | 1 +
> drivers/leds/flash/leds-qcom-flash.c | 700 +++++++++++++++++++++++++++
> 3 files changed, 716 insertions(+)
> create mode 100644 drivers/leds/flash/leds-qcom-flash.c
>
<snip>
> +static const struct of_device_id qcom_flash_led_match_table[] = {
> + { .compatible = "qcom,spmi-flash-led" },
> + { }
> +};
Dylan has noticed that auto-loading the module based on dt match doesn't
work currently. It seems that this line is missing here to enable that:
MODULE_DEVICE_TABLE(of, qcom_flash_led_match_table);
Please add it for v5!
Regards
Luca
> +
> +static struct platform_driver qcom_flash_led_driver = {
> + .driver = {
> + .name = "leds-qcom-flash",
> + .of_match_table = qcom_flash_led_match_table,
> + },
> + .probe = qcom_flash_led_probe,
> + .remove = qcom_flash_led_remove,
> +};
> +
> +module_platform_driver(qcom_flash_led_driver);
> +
> +MODULE_DESCRIPTION("QCOM Flash LED driver");
> +MODULE_LICENSE("GPL");
> --
> 2.25.1