Re: [PATCH v2 5/8] Add Advantech EIO Backlight driver
From: Daniel Thompson
Date: Mon Aug 10 2026 - 06:49:13 EST
On Tue, Jul 14, 2026 at 05:54:19PM +0200, Ramiro Oliveira wrote:
> diff --git a/drivers/video/backlight/eio_bl.c b/drivers/video/backlight/eio_bl.c
> new file mode 100644
> index 000000000000..c2826400de45
> --- /dev/null
> +++ b/drivers/video/backlight/eio_bl.c
> @@ -0,0 +1,243 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Backlight driver for Advantech EIO Embedded controller.
> + *
> + * Copyright (C) 2025 Advantech Corporation. All rights reserved.
> + */
> +
> +#include <linux/backlight.h>
> +#include <linux/errno.h>
> +#include <linux/mfd/core.h>
> +#include <linux/mfd/eio.h>
> +#include <linux/module.h>
> +#include <linux/uaccess.h>
> +
> +#define PMC_BL_WRITE 0x20
> +#define PMC_BL_READ 0x21
> +
> +#define BL_CTRL_STATUS 0x00
> +#define BL_CTRL_ENABLE 0x12
> +#define BL_CTRL_ENABLE_INVERT 0x13
> +#define BL_CTRL_DUTY 0x14
> +#define BL_CTRL_INVERT 0x15
> +#define BL_CTRL_FREQ 0x16
> +
> +#define BL_MAX 2
> +
> +#define BL_STATUS_AVAIL 0x01
> +#define BL_ENABLE_OFF 0x00
> +#define BL_ENABLE_ON 0x01
> +#define BL_ENABLE_AUTO BIT(1)
> +
> +#define USE_DEFAULT -1
> +#define THERMAL_MAX 100
> +
> +static uint bri_freq = USE_DEFAULT;
> +module_param(bri_freq, uint, 0444);
> +MODULE_PARM_DESC(bri_freq, "Setup backlight PWM frequency.\n");
> +
> +static int bri_invert = USE_DEFAULT;
> +module_param(bri_invert, int, 0444);
> +MODULE_PARM_DESC(bri_invert, "Setup backlight PWM polarity.\n");
> +
> +static int bl_power_invert = USE_DEFAULT;
> +module_param(bl_power_invert, int, 0444);
> +MODULE_PARM_DESC(bl_power_invert, "Setup backlight enable pin polarity.\n");
There is still pending feedback on the module parameters and I can't see
any reaction anywhere.
: Module parameters are not really expected these days and are
: pretty user hostile.
:
: Are they really needed? AFAICT this is a firmware based device. Why
: doesn't the firmware provide this information if the drivers need it
: (either directly or via PNP ID and a lookup table)?
Please don't ignore feedback!
Daniel.