From: Andy Shevchenko <andy@kernel.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] platform/x86: x86-android-tablets: Adjust Xiaomi Pad 2 bottom bezel touch buttons LED
Date: Mon, 16 Sep 2024 15:05:35 +0300 [thread overview]
Message-ID: <ZugfD9O7UqR-Ielp@smile.fi.intel.com> (raw)
In-Reply-To: <20240916090255.35548-1-hdegoede@redhat.com>
On Mon, Sep 16, 2024 at 11:02:55AM +0200, Hans de Goede wrote:
> The "input-events" LED trigger used to turn on the backlight LEDs had to
> be rewritten to use led_trigger_register_simple() + led_trigger_event()
> to fix a serious locking issue.
>
> This means it no longer supports using blink_brightness to set a per LED
> brightness for the trigger and it no longer sets LED_CORE_SUSPENDRESUME.
>
> Adjust the MiPad 2 bottom bezel touch buttons LED class device to match:
>
> 1. Make LED_FULL the maximum brightness to fix the LED brightness
> being very low when on.
> 2. Set flags = LED_CORE_SUSPENDRESUME.
...
> #define XIAOMI_MIPAD2_LED_PERIOD_NS 19200
> -#define XIAOMI_MIPAD2_LED_DEFAULT_DUTY 6000 /* From Android kernel */
> +#define XIAOMI_MIPAD2_LED_MAX_DUTY 6000 /* From Android kernel */
Perhaps + suffix at the same time? _NS? _US?
...
> - .duty_cycle = val,
> + .duty_cycle = XIAOMI_MIPAD2_LED_MAX_DUTY * val / LED_FULL,
I haven't checked, just to be sure there is no overflow and 64-bit div on
32-bit machines...
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-09-16 12:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 9:02 [PATCH] platform/x86: x86-android-tablets: Adjust Xiaomi Pad 2 bottom bezel touch buttons LED Hans de Goede
2024-09-16 9:06 ` Hans de Goede
2024-09-16 12:05 ` Andy Shevchenko [this message]
2024-09-16 13:10 ` Hans de Goede
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=ZugfD9O7UqR-Ielp@smile.fi.intel.com \
--to=andy@kernel.org \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
/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