From: Petri Karhula <petri.karhula@novatron.fi>
To: "danielt@kernel.org" <danielt@kernel.org>,
"lee@kernel.org" <lee@kernel.org>,
"thomas.richard@bootlin.com" <thomas.richard@bootlin.com>,
"deller@gmx.de" <deller@gmx.de>,
"jingoohan1@gmail.com" <jingoohan1@gmail.com>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] backlight: Add Congatec Board Controller (CGBC) backlight support
Date: Mon, 24 Nov 2025 14:10:41 +0000 [thread overview]
Message-ID: <029807169cc8913abd8f5948cc025e9ef5f37c11.camel@novatron.fi> (raw)
In-Reply-To: <f40abf01-46f2-41e6-a21f-c58c21d653c4@bootlin.com>
Hello Thomas and Krzysztof,
Thanks for the comments. I have fixed most of them, but I disagree
about removing the error messages. I think that those would be needed.
Without those the kernel does not seem to print any errors to the logs
if the operation fails. It would be then the responsible of the calling
user space program to print the error to the log. But that also could
be missing due to the bug or bad design. This is targeted to be running
in the embedded device that is possibly used in places without internet
coverage. If the user is in such case calling to the support and
complains that backlight control is not working, the only way to get
further information are the logs that the device will send to the cloud
when it happens to be in the coverage of the network. When the log is
the only source of information, it would be really nice to be able to
read clear error messages if the oration has been failed in the driver.
>
> + bl_data->current_brightness = reply_buf[0] &
BLT_PWM_DUTY_MASK;
> +
> + /* Verify the setting was applied correctly */
> + if (bl_data->current_brightness != brightness) {
> + dev_err(bl_data->dev,
> + "Brightness setting verification failed\n");
> + return -EIO;
> + }
>
> Do we really need to check the brightness returned by the board
> controller? Have you ever run into a situation where cbgc_command
> completed without errors, but the brightness level didn’t match what
> you
> expected? Maybe we could assume that if the cbgc_command returned
> successfully the brightness value is correct?
>
> I'm not against checking the backlight value. I looked at Congatec's
> implementation and they also check it.
>
You are absolutely right. It is extremely unlikely that the brightness
level wouldn't match to what is expected. A bug in the Congatec's
firmware could be one possibility. But then that extremely unlikely
situation will happen, I definitely would like to see it in the log.
Best Regards,
Petri
next prev parent reply other threads:[~2025-11-24 14:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 8:25 [PATCH v2 0/2] Backlight driver to control backlight behind Congatec Board Controller Petri Karhula via B4 Relay
2025-11-19 8:25 ` [PATCH v2 1/2] backlight: Add Congatec Board Controller (CGBC) backlight support Petri Karhula via B4 Relay
2025-11-20 9:09 ` Thomas Richard
2025-11-24 14:10 ` Petri Karhula [this message]
2025-11-20 14:09 ` Krzysztof Kozlowski
2025-11-19 8:25 ` [PATCH v2 2/2] mfd: cgbc: Add support for backlight Petri Karhula via B4 Relay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=029807169cc8913abd8f5948cc025e9ef5f37c11.camel@novatron.fi \
--to=petri.karhula@novatron.fi \
--cc=danielt@kernel.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=jingoohan1@gmail.com \
--cc=lee@kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.richard@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®