Re: [PATCH v2 2/2] backlight: Add support for Orient Chip OCP8178

Krzysztof Kozlowski <[email protected]>
Newsgroups org.kernel.vger.linux-fbdev,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-leds
Message-ID <20260814-peculiar-mega-mandrill-3a3148@quoll>
On Wed, Aug 12, 2026 at 09:21:47PM +0200, Wim de With wrote:
> +	props = (typeof(props)){
> +		.type = BACKLIGHT_RAW,
> +		.brightness = brightness,
> +		.max_brightness = max_brightness,
> +		.power = BACKLIGHT_POWER_ON,
> +		.scale = BACKLIGHT_SCALE_NON_LINEAR,
> +	};
> +
> +	bl = devm_backlight_device_register(dev, dev_name(dev), dev, ocp8178,
> +					    &ocp8178_bl_ops, &props);
> +	if (IS_ERR(bl))
> +		return dev_err_probe(dev, PTR_ERR(bl),
> +				     "failed to register backlight\n");
> +
> +	platform_set_drvdata(pdev, bl);
> +	backlight_update_status(bl);
> +
> +	dev_dbg(dev, "probed, brightness=%u/%u\n", brightness, max_brightness);

You should not have probe success messages even as debug. It's not
printing anything useful as brightness is fixed (comes from DTB) and
devices appear in sysfs thus you can check them. Printing debug probe
success messages applies for core SoC drivers which might fail before
reaching initramfs mount and starting init.

Best regards,
Krzysztof
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.