X86 platform drivers
 help / color / mirror / Atom feed
* [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Fix a max_brightness of thinklight
@ 2022-10-08 18:49 Michał Szczepaniak
  2022-11-07 12:48 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Szczepaniak @ 2022-10-08 18:49 UTC (permalink / raw)
  To: ibm-acpi-devel; +Cc: hmh, platform-driver-x86

Thinklight has only two values, on/off so it's reasonable for 
max_brightness to be 0 and 1 as if you write anything between 0 and 255 
it will be 255 anyway so there's no point for it to be 255.

Also sorry for repeated messages, I got no reply so I'm trying to figure 
out what I did wrong.


---
  drivers/platform/x86/thinkpad_acpi.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/thinkpad_acpi.c 
b/drivers/platform/x86/thinkpad_acpi.c
index 22d4e8633e30e9..775c2f327dc3a8 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -5562,6 +5562,7 @@ static enum led_brightness light_sysfs_get(struct 
led_classdev *led_cdev)
  static struct tpacpi_led_classdev tpacpi_led_thinklight = {
      .led_classdev = {
          .name        = "tpacpi::thinklight",
+        .max_brightness    = 1,
          .brightness_set_blocking = &light_sysfs_set,
          .brightness_get    = &light_sysfs_get,
      }





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Fix a max_brightness of thinklight
  2022-10-08 18:49 [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Fix a max_brightness of thinklight Michał Szczepaniak
@ 2022-11-07 12:48 ` Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2022-11-07 12:48 UTC (permalink / raw)
  To: Michał Szczepaniak, ibm-acpi-devel; +Cc: hmh, platform-driver-x86

Hi Michał,

On 10/8/22 20:49, Michał Szczepaniak wrote:
> Thinklight has only two values, on/off so it's reasonable for max_brightness to be 0 and 1 as if you write anything between 0 and 255 it will be 255 anyway so there's no point for it to be 255.
> 
> Also sorry for repeated messages, I got no reply so I'm trying to figure out what I did wrong.

Your patch is missing a Signed-off-by line in the commit-message. I can only
accept patches with a Signed-off-by line in the commit-message like this:

Signed-off-by: Your Real Name <email@your.domain>

See:

https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin

Also your patch is malformed (it has been reflowed by your email client)
and it does not apply properly.

Since this is only a trivial single line change I've just manually recreated
the patch myself, with me as author to avoid the S-o-b problem.

I have given you credit by adding:

Reported-by: Michał Szczepaniak <m.szczepaniak.000@gmail.com>

to the commit message of the patch.

Regards,

Hans



> 
> 
> ---
>  drivers/platform/x86/thinkpad_acpi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index 22d4e8633e30e9..775c2f327dc3a8 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -5562,6 +5562,7 @@ static enum led_brightness light_sysfs_get(struct led_classdev *led_cdev)
>  static struct tpacpi_led_classdev tpacpi_led_thinklight = {
>      .led_classdev = {
>          .name        = "tpacpi::thinklight",
> +        .max_brightness    = 1,
>          .brightness_set_blocking = &light_sysfs_set,
>          .brightness_get    = &light_sysfs_get,
>      }
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-07 12:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-08 18:49 [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Fix a max_brightness of thinklight Michał Szczepaniak
2022-11-07 12:48 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox