[ibm-acpi-devel] [PATCH] Remove logging for "Unsupported brightness interface"

2016-02-04 Thread Eric Curtin
Message gets logged on machines that are well supported. Fixed one
checkpatch.pl ERROR and ran the file through checkpatch.pl --fix to fix other
problems and reviewed the changes the script made.

Signed-off-by: Eric Curtin 
---
 drivers/platform/x86/thinkpad_acpi.c | 357 ---
 1 file changed, 162 insertions(+), 195 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c
b/drivers/platform/x86/thinkpad_acpi.c
index 0bed473..200a6b0 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -31,11 +31,11 @@
  *  2007-10-20 changelog trimmed down
  *
  *  2007-03-27  0.14 renamed to thinkpad_acpi and moved to
- *   drivers/misc.
+ * drivers/misc.
  *
  *  2006-11-22 0.13 new maintainer
- *   changelog now lives in git commit history, and will
- *   not be updated further in-file.
+ * changelog now lives in git commit history, and will
+ * not be updated further in-file.
  *
  *  2005-03-17 0.11 support for 600e, 770x
  *thanks to Jamie Lentin 
@@ -260,7 +260,7 @@ struct tp_acpi_drv_struct {
  const struct acpi_device_id *hid;
  struct acpi_driver *driver;

- void (*notify) (struct ibm_struct *, u32);
+ void (*notify)(struct ibm_struct *, u32);
  acpi_handle *handle;
  u32 type;
  struct acpi_device *device;
@@ -269,12 +269,12 @@ struct tp_acpi_drv_struct {
 struct ibm_struct {
  char *name;

- int (*read) (struct seq_file *);
- int (*write) (char *);
- void (*exit) (void);
- void (*resume) (void);
- void (*suspend) (void);
- void (*shutdown) (void);
+ int (*read)(struct seq_file *);
+ int (*write)(char *);
+ void (*exit)(void);
+ void (*resume)(void);
+ void (*suspend)(void);
+ void (*shutdown)(void);

  struct list_head all_drivers;

@@ -292,7 +292,7 @@ struct ibm_struct {
 struct ibm_init_struct {
  char param[32];

- int (*init) (struct ibm_init_struct *);
+ int (*init)(struct ibm_init_struct *);
  umode_t base_procfs_mode;
  struct ibm_struct *data;
 };
@@ -574,6 +574,7 @@ static int acpi_evalf(acpi_handle handle,
  va_start(ap, fmt);
  while (*fmt) {
  char c = *(fmt++);
+
  switch (c) {
  case 'd': /* int */
  in_objs[params.count].integer.value = va_arg(ap, int);
@@ -581,8 +582,8 @@ static int acpi_evalf(acpi_handle handle,
  break;
  /* add more types as needed */
  default:
- pr_err("acpi_evalf() called "
-   "with invalid format character '%c'\n", c);
+ pr_err("acpi_evalf() called with invalid format character '%c'\n",
+   c);
  va_end(ap);
  return 0;
  }
@@ -610,8 +611,8 @@ static int acpi_evalf(acpi_handle handle,
  break;
  /* add more types as needed */
  default:
- pr_err("acpi_evalf() called "
-   "with invalid format character '%c'\n", res_type);
+ pr_err("acpi_evalf() called with invalid format character '%c'\n",
+   res_type);
  return 0;
  }

@@ -699,6 +700,7 @@ static acpi_status __init
tpacpi_acpi_handle_locate_callback(acpi_handle handle,
  u32 level, void *context, void **return_value)
 {
  struct acpi_device *dev;
+
  if (!strcmp(context, "video")) {
  if (acpi_bus_get_device(handle, ))
  return AE_OK;
@@ -781,8 +783,8 @@ static int __init setup_acpi_notify(struct ibm_struct *ibm)
  ibm->acpi->type, dispatch_acpi_notify, ibm);
  if (ACPI_FAILURE(status)) {
  if (status == AE_ALREADY_EXISTS) {
- pr_notice("another device driver is already "
-  "handling %s events\n", ibm->name);
+ pr_notice("another device driver is already handling %s events\n",
+  ibm->name);
  } else {
  pr_err("acpi_install_notify_handler(%s) failed: %s\n",
ibm->name, acpi_format_exception(status));
@@ -1086,8 +1088,7 @@ static void printk_deprecated_attribute(const
char * const what,
  const char * const details)
 {
  tpacpi_log_usertask("deprecated sysfs attribute");
- pr_warn("WARNING: sysfs attribute %s is deprecated and "
- "will be removed. %s\n",
+ pr_warn("WARNING: sysfs attribute %s is deprecated and will be removed. %s\n",
  what, details);
 }

@@ -1371,7 +1372,7 @@ static ssize_t
tpacpi_rfk_sysfs_enable_store(const enum tpacpi_rfk_id id,
 static int tpacpi_rfk_procfs_read(const enum tpacpi_rfk_id id, struct
seq_file *m)
 {
  if (id >= TPACPI_RFK_SW_MAX)
- seq_printf(m, "status:\t\tnot supported\n");
+ seq_puts(m, "status:\t\tnot supported\n");
  else {
  int status;

@@ -1388,7 +1389,7 @@ static int tpacpi_rfk_procfs_read(const enum
tpacpi_rfk_id id, struct seq_file *
  seq_printf(m, "status:\t\t%s\n",
  (status == TPACPI_RFK_RADIO_ON) ?
  "enabled" : "disabled");
- seq_printf(m, "commands:\tenable, disable\n");
+ seq_puts(m, "commands:\tenable, disable\n");
  }

  return 0;
@@ -1819,8 +1820,7 @@ static void __init tpacpi_check_outdated_fw(void)
  * best if the user upgrades the firmware anyway.
  */
  pr_warn("WARNING: Outdated ThinkPad BIOS/EC firmware\n");
- pr_warn("WARNING: This firmware may be missing critical bug "
- "fixes and/or important features\n");
+ pr_warn("WARNING: This firmware may be missing critical bug fixes
and/or important 

Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight

2016-02-04 Thread Pali Rohár
On Wednesday 13 January 2016 20:10:30 Pavel Machek wrote:
> On Wed 2016-01-13 20:07:36, Pavel Machek wrote:
> > On Wed 2016-01-13 09:54:55, Pali Rohár wrote:
> > > On Tuesday 12 January 2016 22:58:04 Pavel Machek wrote:
> > > > Hi!
> > > > 
> 
> > > > Next question is.. apparently there are some keyboards that have
> > > > per-key RGB backlight... but maybe we can just call that "weird
> > > > enough" and ignore...
> > > 
> > > First we need to defines stable kernel ABI for keyboard backlight. And I
> > > suggest to use existing convention used by upower/console-kit and other
> > > userspace apps...
> > 
> > Hmm... I'm not sure that can be done. What were the masks used by
> > upower again? Will upower write to all 6 leds if we present them?
> 
> Got it...
> 
> It has function up_kbd_backlight_find() which do:
> 
> /* find a led device that is a keyboard device */
>   while ((filename = g_dir_read_name (dir)) != NULL) {
>   if (g_strstr_len (filename, -1, 
> "kbd_backlight") != NULL) {
>   dir_path = g_build_filename 
> ("/sys/class/leds",
>   filename,
>   
> NULL);
>   break;
>   
> That suggests that it stops at the first matching device. Adding new
> "virtual" led controlling 6 physical leds would be ugly. So... new
> interface should be done.
> 
>   Pavel

Yes, it would be ugly, but lp5523 is already ugly... it can accept
numeric value, trigger and also program in bytecode either via sysfs or
via request_firmware... Another virtual led control should not be
problem for this :-)

-- 
Pali Rohár
pali.ro...@gmail.com

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] Remove logging for "Unsupported brightness interface"

2016-02-04 Thread Eric Curtin
Message gets logged on machines that are well supported.

Signed-off-by: Eric Curtin 
---
 drivers/platform/x86/thinkpad_acpi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c
b/drivers/platform/x86/thinkpad_acpi.c
index a268a7a..4eb41aa 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -6661,7 +6661,6 @@ static void __init
tpacpi_detect_brightness_capabilities(void)
pr_info("detected a 8-level brightness capable ThinkPad\n");
break;
default:
-   pr_info("Unsupported brightness interface\n");
tp_features.bright_unkfw = 1;
bright_maxlvl = b - 1;
}
-- 
2.5.0
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


[ibm-acpi-devel] adaptive keyboard off after suspend on linux kernel 4.4 and 4.5, (thinkpad x1 gen2)

2016-02-04 Thread Sindre Fjogstad
Hi,

After upgrading my kernel to version 4.4 and then 4.5.RC1 from 4.2 my
adaptive keyboard is off when the laptop wakes up after suspend. The
adaptive keyboard works as expected before the suspend.

How do you want me to debug this and what kind of information do you
need for me to provide you?

from dmesg:
[   11.181209] thinkpad_acpi: ThinkPad ACPI Extras v0.25
[   11.181212] thinkpad_acpi: http://ibm-acpi.sf.net/
[   11.181214] thinkpad_acpi: ThinkPad BIOS GRET37WW (1.14 ), EC unknown
[   11.181215] thinkpad_acpi: Lenovo ThinkPad X1 Carbon 2nd, model 20A8S0WT16

I have attached my kern.log filtered for acpi which contains hints on
additional issues:
 - unhandled HKEY event 0x60c0
 - unknown version of the HKEY interface: 0x200

Thanks,
Sindre Fjogstad
Jan 24 18:31:16 sfjx1 kernel: [0.00] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
Jan 24 18:31:16 sfjx1 kernel: [0.00] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
Jan 24 18:31:16 sfjx1 kernel: [0.207359] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
Jan 24 18:31:16 sfjx1 kernel: [0.270283] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
Jan 24 18:31:16 sfjx1 kernel: [0.270547] acpi PNP0A08:00: _OSC: platform does not support [PCIeCapability]
Jan 24 18:31:16 sfjx1 kernel: [0.270663] acpi PNP0A08:00: _OSC: not requesting control; platform does not support [PCIeCapability]
Jan 24 18:31:16 sfjx1 kernel: [0.270669] acpi PNP0A08:00: _OSC: OS requested [PCIeHotplug PME AER PCIeCapability]
Jan 24 18:31:16 sfjx1 kernel: [0.270674] acpi PNP0A08:00: _OSC: platform willing to grant [PCIeHotplug PME AER]
Jan 24 18:31:16 sfjx1 kernel: [0.270678] acpi PNP0A08:00: _OSC failed (AE_SUPPORT); disabling ASPM
Jan 24 18:31:16 sfjx1 kernel: [0.317731] clocksource: acpi_pm: mask: 0xff max_cycles: 0xff, max_idle_ns: 2085701024 ns
Jan 24 18:31:16 sfjx1 kernel: [  123.079155] thinkpad_acpi: ThinkPad ACPI Extras v0.25
Jan 24 18:31:16 sfjx1 kernel: [  123.079158] thinkpad_acpi: http://ibm-acpi.sf.net/
Jan 24 18:31:16 sfjx1 kernel: [  123.079159] thinkpad_acpi: ThinkPad BIOS GRET37WW (1.14 ), EC unknown
Jan 24 18:31:16 sfjx1 kernel: [  123.079161] thinkpad_acpi: Lenovo ThinkPad X1 Carbon 2nd, model 20A8S0WT16
Jan 24 18:31:16 sfjx1 kernel: [  123.081845] thinkpad_acpi: Unsupported brightness interface
Jan 24 18:31:16 sfjx1 kernel: [  123.081869] thinkpad_acpi: unknown version of the HKEY interface: 0x200
Jan 24 18:31:16 sfjx1 kernel: [  123.081871] thinkpad_acpi: please report this to ibm-acpi-devel@lists.sourceforge.net
Jan 24 18:31:16 sfjx1 kernel: [  123.081877] thinkpad_acpi: radio switch found; radios are enabled
Jan 24 18:31:16 sfjx1 kernel: [  123.081890] thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver
Jan 24 18:31:16 sfjx1 kernel: [  123.081891] thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
Jan 24 18:31:16 sfjx1 kernel: [  123.088137] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is unblocked
Jan 24 18:31:16 sfjx1 kernel: [  123.122451] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input8
Jan 24 19:43:05 sfjx1 kernel: [0.00] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
Jan 24 19:43:05 sfjx1 kernel: [0.00] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
Jan 24 19:43:05 sfjx1 kernel: [0.207337] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
Jan 24 19:43:05 sfjx1 kernel: [0.270321] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
Jan 24 19:43:05 sfjx1 kernel: [0.270586] acpi PNP0A08:00: _OSC: platform does not support [PCIeCapability]
Jan 24 19:43:05 sfjx1 kernel: [0.270701] acpi PNP0A08:00: _OSC: not requesting control; platform does not support [PCIeCapability]
Jan 24 19:43:05 sfjx1 kernel: [0.270707] acpi PNP0A08:00: _OSC: OS requested [PCIeHotplug PME AER PCIeCapability]
Jan 24 19:43:05 sfjx1 kernel: [0.270712] acpi PNP0A08:00: _OSC: platform willing to grant [PCIeHotplug PME AER]
Jan 24 19:43:05 sfjx1 kernel: [0.270716] acpi PNP0A08:00: _OSC failed (AE_SUPPORT); disabling ASPM
Jan 24 19:43:05 sfjx1 kernel: [0.317726] clocksource: acpi_pm: mask: 0xff max_cycles: 0xff, max_idle_ns: 2085701024 ns
Jan 24 19:43:05 sfjx1 kernel: [   11.384151] thinkpad_acpi: ThinkPad ACPI Extras v0.25
Jan 24 19:43:05 sfjx1 kernel: [   11.384153] thinkpad_acpi: http://ibm-acpi.sf.net/
Jan 24 19:43:05 sfjx1 kernel: [   11.384155] thinkpad_acpi: ThinkPad BIOS GRET37WW (1.14 ), EC unknown
Jan 24 19:43:05 sfjx1 kernel: [   11.384156] thinkpad_acpi: Lenovo ThinkPad X1 Carbon 2nd, model 20A8S0WT16
Jan 24 19:43:05 sfjx1 kernel: [   11.384750] thinkpad_acpi: Unsupported brightness interface
Jan 24 19:43:05 sfjx1 kernel: [   11.384774] thinkpad_acpi: unknown version of the HKEY interface: 0x200
Jan 24 19:43:05 sfjx1 kernel: [   11.384777] thinkpad_acpi: please report 

Re: [ibm-acpi-devel] [PATCH v2] thinkpad_acpi: Add support for keyboard backlight

2016-02-04 Thread Pali Rohár
On Monday 04 January 2016 21:04:25 Darren Hart wrote:
> On Wed, Dec 30, 2015 at 11:27:41PM +0100, Pali Rohár wrote:
> > This patch adds support for controlling keyboard backlight via
> > standard linux led class interface (::kbd_backlight). It uses ACPI
> > HKEY device with MLCG and MLCS methods.
> 
> Which laptops is this intended to support?

Thinkpad ??30 series and new which have backlight keyboard.

-- 
Pali Rohár
pali.ro...@gmail.com


signature.asc
Description: This is a digitally signed message part.
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH 4/4] Revert "thinkpad_acpi: Use acpi_video_handles_brightness_key_presses()"

2016-02-04 Thread Rafael J. Wysocki
On Thursday, January 14, 2016 03:18:56 PM Darren Hart wrote:
> On Thu, Jan 14, 2016 at 09:41:48AM +0100, Hans de Goede wrote:
> > acpi_video_handles_brightness_key_presses()'s may return false if the i915
> > driver is not loaded yet when thinkpad_acpi loads, and then return true
> > after the i915 driver has loaded. This means that thinkpad_acpi cannot
> > use it as is since thinkpad_acpi caches the return value.
> > 
> > This reverts commit 7714687a2b2d ("thinkpad_acpi: Use
> > acpi_video_handles_brightness_key_presses()").
> > 
> 
> Rafael, I presume this would go through your tree?

Yes, I'll take care of this, thanks!

> No objection from me. Henrique?
> 
> Acked-by: Darren Hart 
> 
> > Signed-off-by: Hans de Goede 
> > ---
> >  drivers/platform/x86/thinkpad_acpi.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/platform/x86/thinkpad_acpi.c 
> > b/drivers/platform/x86/thinkpad_acpi.c
> > index f453d5d..0bed473 100644
> > --- a/drivers/platform/x86/thinkpad_acpi.c
> > +++ b/drivers/platform/x86/thinkpad_acpi.c
> > @@ -3488,7 +3488,7 @@ static int __init hotkey_init(struct ibm_init_struct 
> > *iibm)
> > /* Do not issue duplicate brightness change events to
> >  * userspace. tpacpi_detect_brightness_capabilities() must have
> >  * been called before this point  */
> > -   if (acpi_video_handles_brightness_key_presses()) {
> > +   if (acpi_video_get_backlight_type() != acpi_backlight_vendor) {
> > pr_info("This ThinkPad has standard ACPI backlight "
> > "brightness control, supported by the ACPI "
> > "video driver\n");
> 
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight

2016-02-04 Thread Johannes Stezenbach
On Mon, Jan 11, 2016 at 09:03:01PM +0100, Pali Rohár wrote:
> On Monday 11 January 2016 20:28:00 Henrique de Moraes Holschuh wrote
> > The two features are not the same (and are handled differently by the
> > firmware, for whatever reason), although they do serve the same
> > purpose. I don't think a thinkpad will ever have both features at
> > the same time, so I have no idea why they changed the firmware
> > interface.
...
> And more important, I was told that ThinkPad x230 comes in variant with 
> both ThinkLight (that LED upper the display) and keyboard backlight 
> (under they keyboard).

I can confirm this, my x230 has both.  FWIW, BIOS hotkey
Fn+Space cycles through off, dim backlight, full backlight
and full thinklight. /sys/class/leds/tpacpi::thinklight/brightness
can be read (showing either 0 or 255) but writes are ignored.
Dito for /proc/acpi/ibm/light.

Johannes

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: don't yell on unsupported brightness interfaces

2016-02-04 Thread Eric Curtin
On 8 January 2016 at 11:55, David Herrmann  wrote:
> Hi
>
> On Thu, Jan 7, 2016 at 2:03 AM, Eric Curtin  wrote:
>> Also another query, could be a mini-side project for me as I'm a
>> beginner kernel dev when I have some spare time. Could we change the
>> minimum brightness value not to be off? 0 does not have to mean
>> backlight off from reading various things around the web:
>>
>> http://www.x.org/wiki/Events/XDC2014/XDC2014GoedeBacklight/backlight.pdf
>>
>> And to be honest having the ability to completely turn off the
>> backlight is a useless function and is probably unintended as discussed
>> in the github thread above also. You would need night vision googles to
>> read the screen in this state! I'm pretty sure the Windows driver does
>> not completely turn off the screen on minimum brightness either, no
>> need to have different functionality on different platforms especially
>> when this functionality isn't very useful.
>
> Whether '0' means 'off' or 'lowest brightness level' has been
> discussed several times. Sadly, we cannot change semantics without
> breaking user-space, so you better work around it. There have been
> several proposals to fix it, but I guess no-one cared so far.
>
> Anyway, both features (turning backlight off *and* lowest backlight
> level) _are_ used actively by user-space. Hence, both should be
> supported.
>
> Thanks
> David

As regards the "Unsupported brightness interface" log message will I
add 101 to the switch statement so it doesn't get reported on my device
or just remove it? This seems to be reporting many false positives (or
negatives whatever way you want to look at it) on different machines so
can I remove this logging?

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] Remove ambiguous logging for "Unsupported brightness interface"

2016-02-04 Thread Eric Curtin
On 28 January 2016 at 00:43, Joe Perches  wrote:
> On Thu, 2016-01-28 at 00:36 +, Eric Curtin wrote:
>> On 27 January 2016 at 23:26, Joe Perches  wrote:
>> > On Wed, 2016-01-27 at 22:14 +, Eric Curtin wrote:
>> > > Message gets logged on machines that are well supported.
> []
>> > diff --git a/drivers/platform/x86/thinkpad_acpi.c 
>> > b/drivers/platform/x86/thinkpad_acpi.c
> []
>> > +   pr_info("detected %u brightness levels\n", bright_maxlvl + 1);
>> >  }
>> >
>> >  static int __init brightness_init(struct ibm_init_struct *iibm)
>>
>> Maybe, but the other logging issues kinda mean something. There are
>> many, many reports of people thinking their brightness interface is
>> broken because of this logging message, when in reality the i915 driver
>> supports their devices just fine as previously stated.
>
> That's why I suggest changing it to show the number
> of brightness levels detected on any device.
>

Sorry, I missed that line. Looks like a better fix! +1

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight

2016-02-04 Thread Johannes Stezenbach
On Tue, Jan 12, 2016 at 02:07:10PM -0200, Henrique de Moraes Holschuh wrote:
> On Mon, Jan 11, 2016, at 19:12, Johannes Stezenbach wrote:
> > 
> > I can confirm this, my x230 has both.  FWIW, BIOS hotkey
> > Fn+Space cycles through off, dim backlight, full backlight
> > and full thinklight. /sys/class/leds/tpacpi::thinklight/brightness
> > can be read (showing either 0 or 255) but writes are ignored.
> > Dito for /proc/acpi/ibm/light.
> 
> We likely need to integrate better (future work) the new backlight
> control with the thinklight control and the firmware interface in the
> x230.
> 
> Is the ACPI AML for fn+space readable enough, or is it trapping directly
> into SMM?  Because if it interacts with the traditional higher-level
> ACPI AML we already use to talk to the thinklight (and now to the
> backlight), it should be relatively easy to fix the driver to better
> support the x230.

I have no clue about ACPI, do you have some hints
how to get the info you want?  I found this:

  sudo acpidump > acpidata.dat
  acpixtract -sSSDT acpidata.dat
  acpixtract -sDSDT acpidata.dat
  iasl -d DSDT.dat SSDT*.dat

  ..and then look at the .dsl files that contain the AML assembler. 

But what to look out for?

PS: failed to mention my x230 kernel was still 4.2.x in case it matters

Thanks,
Johannes

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH v2] thinkpad_acpi: Add support for keyboard backlight

2016-02-04 Thread Pali Rohár
On Monday 04 January 2016 21:40:20 Darren Hart wrote:
> On Mon, Jan 04, 2016 at 09:26:19PM +0100, Pali Rohár wrote:
> > On Monday 04 January 2016 21:04:25 Darren Hart wrote:
> > > On Wed, Dec 30, 2015 at 11:27:41PM +0100, Pali Rohár wrote:
> > > > This patch adds support for controlling keyboard backlight via
> > > > standard linux led class interface (::kbd_backlight). It uses
> > > > ACPI HKEY device with MLCG and MLCS methods.
> > > 
> > > Which laptops is this intended to support?
> > 
> > Thinkpad ??30 series and new which have backlight keyboard.
> 
> Thanks, we should include that in the commit message as well as the
> comments surrounding the driver section.

??30 is probably not good characteristic, but I mean all those Thinkpad 
laptops like T430, x230, E430, X1 (1st) and their successors (T440, 
T450, X1 3rd, ...) All those which are from Ivy Bridge processor 
generation (and new).

But basically it cover all Thinkpad laptops which have backlight 
keyboard. Older Thinkpad laptops had only light in bezel.

So if you have better idea for commit message, feel free to change it.

-- 
Pali Rohár
pali.ro...@gmail.com


signature.asc
Description: This is a digitally signed message part.
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


[ibm-acpi-devel] Unsupported brightness interface - Lenovo ThinkPad X1 Carbon 3rd, model 20BTS1N70E

2016-02-04 Thread Yaniv Kaul
[   11.060213] thinkpad_acpi: ThinkPad ACPI Extras v0.25
[   11.060215] thinkpad_acpi: http://ibm-acpi.sf.net/
[   11.060217] thinkpad_acpi: ThinkPad BIOS N14ET31W (1.09 ), EC unknown
[   11.060218] thinkpad_acpi: Lenovo ThinkPad X1 Carbon 3rd, model
20BTS1N70E
[   11.061048] thinkpad_acpi: Unsupported brightness interface, please
contact ibm-acpi-devel@lists.sourceforge.net
[   11.061074] thinkpad_acpi: radio switch found; radios are enabled
[   11.061088] thinkpad_acpi: This ThinkPad has standard ACPI backlight
brightness control, supported by the ACPI video driver
[   11.061089] thinkpad_acpi: Disabling thinkpad-acpi brightness events by
default...
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


[ibm-acpi-devel] Advertisement on SF lists

2016-02-04 Thread Yves-Alexis Perez
Hi,

I just noticed that SourceForge was now adding advertisement to the list
emails (not sure when it started, I have to admit). Is there a way to drop
that from the list configuration?

Thanks!
-- 
Yves-Alexis



signature.asc
Description: This is a digitally signed message part
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


[ibm-acpi-devel] linux-4.4-rc8/drivers/platform/x86/thinkpad_acpi.c: 2 * bad shift ?

2016-02-04 Thread David Binderman
hello there,

1.

[linux-4.4-rc8/drivers/platform/x86/thinkpad_acpi.c:2297] -> 
[linux-4.4-rc8/drivers/platform/x86/thinkpad_acpi.c:3694]: (warning) Shifting 
32-bit value by 51 bits is undefined behaviour. See condition at line 3694.

Source code at line 2297 is

    if (hotkey_user_mask & (1 << scancode))

and at 3694 is

    if (scancode> 0 && scancode <= TPACPI_HOTKEY_MAP_LEN) {

Maybe new code

    if (hotkey_user_mask & (1UL << scancode))

is better.

2.

[linux-4.4-rc8/drivers/platform/x86/thinkpad_acpi.c:3696] -> 
[linux-4.4-rc8/drivers/platform/x86/thinkpad_acpi.c:3694]: (warning) Shifting 
32-bit value by 51 bits is undefined behaviour. See condition at line 3694.

Duplicate.

Regards

David Binderman
  
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


[ibm-acpi-devel] unhandled HKEY event 0x6060

2016-02-04 Thread pirprg-lp
Hi, i have a lenovo T440p, and i saw the message in my dmesg
thinkpad_acpi: unknown possible thermal alarm or keyboard event 
receivedthinkpad_acpi: unhandled HKEY event 0x6060thinkpad_acpi: please report 
the conditions when this event happened...
And i know what i did : i pressed Fn + Esc, which is used to get the Fn lock, 
so the functions keys (F1 - F12) are by default function keys instead of being 
thinkpad features like mute, sound up, sound down, mic mute...

Pierre--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] linux-4.4-rc8/drivers/platform/x86/thinkpad_acpi.c: 2 * bad shift ?

2016-02-04 Thread Henrique de Moraes Holschuh
On Mon, 04 Jan 2016, David Binderman wrote:
> 1.
> 
> [linux-4.4-rc8/drivers/platform/x86/thinkpad_acpi.c:2297] -> 
> [linux-4.4-rc8/drivers/platform/x86/thinkpad_acpi.c:3694]: (warning) Shifting 
> 32-bit value by 51 bits is undefined behaviour. See condition at line 3694.
> 
> Source code at line 2297 is
> 
>     if (hotkey_user_mask & (1 << scancode))
> 
> and at 3694 is
> 
>     if (scancode> 0 && scancode <= TPACPI_HOTKEY_MAP_LEN) {
> 
> Maybe new code
> 
>     if (hotkey_user_mask & (1UL << scancode))
> 
> is better.

You are correct that this is buggy.  Thank you for the report!

Scancodes 32 (0x20) and above were added to the keymap to support the
adaptative keyboard in the X1 carbon (which Lenovo has since abandoned).
They are not present in the legacy firmware event mask (which is what that
shift addresses).

We could just always issue the hotkey event for these scan codes, and if the
user doesn't want such an event, he can use the standard interfaces to set
the keycode in the keymap to KEY_RESERVED.

I will just read up a bit on the patches and ML discussions that resulted in
this change to check if there is a new firmware event mask we should be
checking, and prepare a fix.

I will need help from someone that has an adaptative keyboard to test the
patches, though.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight

2016-02-04 Thread Pali Rohár
On Monday 04 January 2016 21:12:31 Pavel Machek wrote:
> Hi1
> 
> > This patch adds support for controlling keyboard backlight via
> > standard linux led class interface (::kbd_backlight). It uses ACPI
> > HKEY device with MLCG and MLCS methods.
> > 
> > Signed-off-by: Pali Rohár 
> > Tested-by: Fabio D'Urso 
> 
> On my thinkpad, keyboard light is controlled by
> 
> /sys/class/leds/tpacpi\:\:thinklight/brightness
> 
> (that's a bad name).

Hi!

That is light in upper case of bezel/display, right? Thinklight is 
probably official marketing name for that by IBM/Lenovo.

My patch adds support for keyboard backlight (light under the keyboard).

> On n900, it is .../leds/kb0..kb6. Now we'd have kbd_backlight. I
> guess we should standartize on one name for this light, so that
> userspace has the chance to handle it automatically...

Looks like userspace already uses /sys/class/leds/*::kbd_backlight for 
keyboard backlight (light under the keyboard). At least other drivers 
uses this name and my KDE desktop recognized "dell::kbd_backlight" (from 
dell-laptop.ko) and "tpacpi::kbd_backlight" too.

So really for keyboard backlight use *::kbd_backlight it is already 
handled by existing userspace applications.

> Also, neccessity of workqueues for LED setting is slowly being
> removed from the kernel, see LED mailing list for details.

My patch uses kbd_backlight LED in same as as other LEDs in thinkpad 
acpi driver.

-- 
Pali Rohár
pali.ro...@gmail.com


signature.asc
Description: This is a digitally signed message part.
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


[ibm-acpi-devel] [PATCH] Remove logging for "Unsupported brightness interface"

2016-02-04 Thread Eric Curtin
Message gets logged on machines that are well supported.
Fixed one checkpatch.pl ERROR also.

Signed-off-by: Eric Curtin 
---
 drivers/platform/x86/thinkpad_acpi.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c
b/drivers/platform/x86/thinkpad_acpi.c
index 0bed473..b149dec 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -6434,7 +6434,7 @@ static const struct tpacpi_quirk
brightness_quirk_table[] __initconst = {
  */
 static void __init tpacpi_detect_brightness_capabilities(void)
 {
- unsigned int b;
+ const unsigned int b = tpacpi_check_std_acpi_brightness_support();

  vdbg_printk(TPACPI_DBG_INIT,
 "detecting firmware brightness interface capabilities\n");
@@ -6447,7 +6447,6 @@ static void __init
tpacpi_detect_brightness_capabilities(void)
  * Lenovo Vista BIOS to ACPI brightness mode even if we are not
  * going to publish a backlight interface
  */
- b = tpacpi_check_std_acpi_brightness_support();
  switch (b) {
  case 16:
  bright_maxlvl = 15;
@@ -6459,7 +6458,6 @@ static void __init
tpacpi_detect_brightness_capabilities(void)
  pr_info("detected a 8-level brightness capable ThinkPad\n");
  break;
  default:
- pr_info("Unsupported brightness interface\n");
  tp_features.bright_unkfw = 1;
  bright_maxlvl = b - 1;
  }
@@ -7440,7 +7438,7 @@ static struct ibm_struct volume_driver_data = {

 #define alsa_card NULL

-static void inline volume_alsa_notify_change(void)
+static inline void volume_alsa_notify_change(void)
 {
 }

-- 
2.5.0

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight

2016-02-04 Thread Johannes Stezenbach
On Tue, Jan 12, 2016 at 03:56:07PM -0200, Henrique de Moraes Holschuh wrote:
> On Tue, Jan 12, 2016, at 14:35, Johannes Stezenbach wrote:
> > But what to look out for?
> 
> Well, you should familiarize yourself with ACPI AML a bit. Then, look
> for the ACPI methods that thinkpad-acpi (and the patch to add backlight
> support) calls, and try to work out how they work in your thinkpad.
> 
> Typical thinkpad firmware behavior is to sometimes have a lower level
> implementation, a higher level ACPI API that the O.S. is supposed to
> call (and which will call into the lower level implementation, or to the
> work itself).
> 
> We want to stick to the higher level API, as it is more stable.  Use of
> lower-level APIs or direct EC access must be whitelist-restricted.

So if I interpret this correctly it calls SMI BIOS on x230, too:

Method (MLCG, 1, NotSerialized)
{
Local0 = \KBLS (0x00, 0x00)
Return (Local0)
}

Method (MLCS, 1, NotSerialized)
{
Local0 = \KBLS (0x01, Arg0)
If (!(Local0 & 0x8000))
{
If ((Arg0 & 0x0001))
{
\_SB.PCI0.LPC.EC.HKEY.MHKQ (0x6001)
}
ElseIf (\_SB.PCI0.LPC.EC.HKEY.MHKK (0x0002))
{
\_SB.PCI0.LPC.EC.HKEY.MHKQ (0x1012)
}
}

Return (Local0)
}


Method (KBLS, 2, NotSerialized)
{
Return (SMI (0x14, 0x09, Arg0, Arg1, 0x00))
}

FWIW, full dump is here:
https://linuxtv.org/~js/ahSheaw0eezahqu1aethohLae4MeiPhe/

Johannes

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: don't yell on unsupported brightness interfaces

2016-02-04 Thread David Herrmann
Hi

On Thu, Jan 7, 2016 at 2:03 AM, Eric Curtin  wrote:
> Also another query, could be a mini-side project for me as I'm a
> beginner kernel dev when I have some spare time. Could we change the
> minimum brightness value not to be off? 0 does not have to mean
> backlight off from reading various things around the web:
>
> http://www.x.org/wiki/Events/XDC2014/XDC2014GoedeBacklight/backlight.pdf
>
> And to be honest having the ability to completely turn off the
> backlight is a useless function and is probably unintended as discussed
> in the github thread above also. You would need night vision googles to
> read the screen in this state! I'm pretty sure the Windows driver does
> not completely turn off the screen on minimum brightness either, no
> need to have different functionality on different platforms especially
> when this functionality isn't very useful.

Whether '0' means 'off' or 'lowest brightness level' has been
discussed several times. Sadly, we cannot change semantics without
breaking user-space, so you better work around it. There have been
several proposals to fix it, but I guess no-one cared so far.

Anyway, both features (turning backlight off *and* lowest backlight
level) _are_ used actively by user-space. Hence, both should be
supported.

Thanks
David

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight

2016-02-04 Thread Pali Rohár
On Tuesday 12 January 2016 22:58:04 Pavel Machek wrote:
> Hi!
> 
> On Mon 2016-01-11 21:03:01, Pali Rohár wrote:
> > On Monday 11 January 2016 20:28:00 Henrique de Moraes Holschuh wrote
> > > The two features are not the same (and are handled differently by the
> > > firmware, for whatever reason), although they do serve the same
> > > purpose. I don't think a thinkpad will ever have both features at
> > > the same time, so I have no idea why they changed the firmware
> > > interface.
> > 
> > Maybe we should decide if ::kbd_backlight LED suffix could be used also 
> > for other LED devices and not only for those which are physically under 
> > the keyboard.
> 
> Another problem is that N900 has _6_ backlight LEDs. Named
> lp5523::kb1..6. ... Which does means desktop software will probably
> not pick them up :-(. 
> 
> I guess we could have "/sys/class/kbd_light/brightness" that would
> control all of them with one write.

Probably... But there is problem that lp5523 is not ordinary on/off
light, it can be programmed to execute own "light" application.

> Next question is.. apparently there are some keyboards that have
> per-key RGB backlight... but maybe we can just call that "weird
> enough" and ignore...

First we need to defines stable kernel ABI for keyboard backlight. And I
suggest to use existing convention used by upower/console-kit and other
userspace apps...

-- 
Pali Rohár
pali.ro...@gmail.com

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight

2016-02-04 Thread Pali Rohár
On Wednesday 30 December 2015 23:28:48 Pali Rohár wrote:
> On Monday 28 December 2015 15:48:14 Pali Rohár wrote:
> > > Also, is it working properly across suspend+resume?
> > 
> > When doing resume from suspend or hibernate BIOS turning keyboard
> > backlight automatically off.
> 
> Fixed in v2.
> 

Now I see that BIOS try to be too intelligent and automatically turn of
keyboard backlight when LID is closed. When LID is open again then
keyboard backlight stay turned off. Sysfs show correct state (brightness
is zero).

Should thinkpad acpi driver do something? Or let BIOS do that job?

-- 
Pali Rohár
pali.ro...@gmail.com

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] Remove logging for "Unsupported brightness interface"

2016-02-04 Thread Eric Curtin
On 23 January 2016 at 00:28, Eric Curtin  wrote:
> Message gets logged on machines that are well supported.
>
> Signed-off-by: Eric Curtin 
> ---
>  drivers/platform/x86/thinkpad_acpi.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/platform/x86/thinkpad_acpi.c
> b/drivers/platform/x86/thinkpad_acpi.c
> index a268a7a..4eb41aa 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -6661,7 +6661,6 @@ static void __init
> tpacpi_detect_brightness_capabilities(void)
> pr_info("detected a 8-level brightness capable ThinkPad\n");
> break;
> default:
> -   pr_info("Unsupported brightness interface\n");
> tp_features.bright_unkfw = 1;
> bright_maxlvl = b - 1;
> }
> --
> 2.5.0
>

Hi Guys,

This patch doesn't appear on any of the Linux kernel archive sites.
Could somebody enlighten me why this is so?

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


[ibm-acpi-devel] ibm-acpi developers not responding despite serious bugs and debuggers

2016-02-04 Thread jono
Dear Rafael,
Sorry to trouble you, but a number of us are having lots of grief
getting a response from ibm/lenovo regarding acpi bugs in newer models
like the Helix 2. The bugs make these machines difficult to use, and
there are various reports of this on the internet, along with people
willing to debug patches. But it's impossible to contact anyone on the
ibm-acpi team to help with this. Do you know who we can contact to
help sort these bugs out? Myself and others are polite, fairly tech
savy, and willing to help, so I'm a bit puzzled by the silence from
this team.

The example is the Helix 2, see:
https://bugzilla.kernel.org/show_bug.cgi?id=100171

and various repetitions of this...
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1424088
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1520965?comments=all

Best,
Jonathan

On Fri, Jan 29, 2016 at 9:51 PM, Rafael J. Wysocki  wrote:
> Hi Linus,
>
> Please pull from
>
>  git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>  pm+acpi-4.5-rc2
>
> to receive the second batch of power management and ACPI updates for
> v4.5-rc2 with top-most commit ad1ac94767aa9d74c6533e33e768a14d2715162f
>
>  Merge branches 'pm-cpuidle', 'pm-cpufreq', 'pm-domains' and 'pm-sleep'
>
> on top of commit 92e963f50fc74041b5e9e744c330dca48e04f08d
>
>  Linux 4.5-rc1
>
> These are: cpuidle fixes (including one fix for a recent regression),
> cpufreq fixes (including fixes for two issues introduced during the
> 4.2 cycle), generic power domains framework fixes (two locking
> fixes and one cleanup), one locking fix in the ACPI-based PCI
> hotplug framework (ACPIPHP), removal of one ACPI backlight
> blacklist entry that isn't necessary any more and a PM Kconfig
> cleanup.
>
> Specifics:
>
>  - Fix a recent cpuidle core regression that broke suspend-to-idle
>on all systems where cpuidle drivers don't provide ->enter_freeze
>callbacks for any states (Sudeep Holla).
>
>  - Drop an unnecessary symbol definition from the cpuidle core code
>handling coupled CPU cores (Anders Roxell).
>
>  - Fix a race condition related to governor initialization and removal
>in the cpufreq core (Viresh Kumar).
>
>  - Clean up the cpufreq core to use list_is_last() for checking if
>the given policy object is the last element of a list instead of
>open coding that in a clumsy way (Gautham R Shenoy).
>
>  - Fix compiler warnings in the pxa2xx and cpufreq-dt cpufreq drivers
>(Arnd Bergmann).
>
>  - Fix two locking issues and clean up a comment in the generic power
>domains framework (Ulf Hansson, Marek Szyprowski, Moritz Fischer).
>
>  - Fix the error code path of one function in the ACPI-based PCI
>hotplug framework (ACPIPHP) that forgets to release a lock
>acquired previously (Insu Yun).
>
>  - Drop the ACPI backlight blacklist entry for Dell Inspiron 5737
>that is not necessary any more (Hans de Goede).
>
>  - Clean up the top-level PM Kconfig to stop requiring APM emulation
>to depend on PM which in fact isn't necessary (Arnd Bergmann).
>
> Thanks!
>
>
> ---
>
> Anders Roxell (1):
>   cpuidle: coupled: remove unused define cpuidle_coupled_lock
>
> Arnd Bergmann (3):
>   PM: APM_EMULATION does not depend on PM
>   cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype
>   cpufreq: cpufreq-dt: avoid uninitialized variable warnings:
>
> Gautham R Shenoy (1):
>   cpufreq: Use list_is_last() to check last entry of the policy list
>
> Hans de Goede (1):
>   ACPI: Revert "ACPI / video: Add Dell Inspiron 5737 to the blacklist"
>
> Insu Yun (1):
>   ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot()
>
> Marek Szyprowski (1):
>   PM / domains: fix lockdep issue for all subdomains
>
> Moritz Fischer (1):
>   PM / Domains: Fix typo in comment
>
> Sudeep Holla (1):
>   cpuidle: fix fallback mechanism for suspend to idle in absence
> of enter_freeze
>
> Ulf Hansson (1):
>   PM / Domains: Fix potential deadlock while adding/removing subdomains
>
> Viresh Kumar (1):
>   cpufreq: Fix NULL reference crash while accessing policy->governor_data
>
> ---
>
>  drivers/acpi/video_detect.c|  8 
>  drivers/base/power/domain.c| 37 -
>  drivers/cpufreq/cpufreq-dt.c   | 15 +++
>  drivers/cpufreq/cpufreq.c  |  6 +++---
>  drivers/cpufreq/cpufreq_governor.c | 11 ---
>  drivers/cpufreq/pxa2xx-cpufreq.c   |  2 +-
>  drivers/cpuidle/coupled.c  |  1 -
>  drivers/cpuidle/cpuidle.c  |  2 +-
>  drivers/pci/hotplug/acpiphp_glue.c |  4 +++-
>  kernel/power/Kconfig   |  2 +-
>  kernel/sched/idle.c|  2 +-
>  11 files changed, 45 insertions(+), 45 deletions(-)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  

Re: [ibm-acpi-devel] ibm-acpi developers not responding despite serious bugs and debuggers

2016-02-04 Thread Rafael J. Wysocki
Hi,

On Saturday, January 30, 2016 01:22:27 PM jono wrote:
> Dear Rafael,
> Sorry to trouble you, but a number of us are having lots of grief
> getting a response from ibm/lenovo regarding acpi bugs in newer models
> like the Helix 2. The bugs make these machines difficult to use, and
> there are various reports of this on the internet, along with people
> willing to debug patches. But it's impossible to contact anyone on the
> ibm-acpi team to help with this. Do you know who we can contact to
> help sort these bugs out? Myself and others are polite, fairly tech
> savy, and willing to help, so I'm a bit puzzled by the silence from
> this team.

This is a tough one, unfortunately.

I can't tell you today, let me see if I can find out anything.

> The example is the Helix 2, see:
> https://bugzilla.kernel.org/show_bug.cgi?id=100171

Thanks for the pointer.

Take care,
Rafael


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] adaptive keyboard off after suspend on linux kernel 4.4 and 4.5, (thinkpad x1 gen2)

2016-02-04 Thread Henrique de Moraes Holschuh
On Wed, 27 Jan 2016, Sindre Fjogstad wrote:
> After upgrading my kernel to version 4.4 and then 4.5.RC1 from 4.2 my
> adaptive keyboard is off when the laptop wakes up after suspend. The
> adaptive keyboard works as expected before the suspend.

Suspend to RAM, or hibernation (suspend to disk) ?

> How do you want me to debug this and what kind of information do you
> need for me to provide you?
> 
> from dmesg:
> [   11.181209] thinkpad_acpi: ThinkPad ACPI Extras v0.25
> [   11.181212] thinkpad_acpi: http://ibm-acpi.sf.net/
> [   11.181214] thinkpad_acpi: ThinkPad BIOS GRET37WW (1.14 ), EC unknown
> [   11.181215] thinkpad_acpi: Lenovo ThinkPad X1 Carbon 2nd, model 20A8S0WT16
> 
> I have attached my kern.log filtered for acpi which contains hints on
> additional issues:
>  - unhandled HKEY event 0x60c0
>  - unknown version of the HKEY interface: 0x200

Those are known harmless conditions, and HKEY 0x200 interface *is* the
adaptative keyboard version of the HKEY event interface, but it is only
"partially" known...

And as you can see, it apparently still has some rough edges ;-)

I will need your help to fix this, I don't have any thinkpad with an
adaptative keyboard to test.  In fact, the adaptative keyboard code was a
contribution by Bastien Nocera.  Added him to the CC.

Bastien, can you help debug this issue?

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


[ibm-acpi-devel] [PATCH] Remove ambiguous logging for "Unsupported brightness interface"

2016-02-04 Thread Eric Curtin
Message gets logged on machines that are well supported.

Signed-off-by: Eric Curtin 
---
 drivers/platform/x86/thinkpad_acpi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c
b/drivers/platform/x86/thinkpad_acpi.c
index a268a7a..4eb41aa 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -6661,7 +6661,6 @@ static void __init
tpacpi_detect_brightness_capabilities(void)
pr_info("detected a 8-level brightness capable ThinkPad\n");
break;
default:
-   pr_info("Unsupported brightness interface\n");
tp_features.bright_unkfw = 1;
bright_maxlvl = b - 1;
}
-- 
2.5.0

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] Remove ambiguous logging for "Unsupported brightness interface"

2016-02-04 Thread Eric Curtin
On 27 January 2016 at 23:26, Joe Perches  wrote:
> On Wed, 2016-01-27 at 22:14 +, Eric Curtin wrote:
>> Message gets logged on machines that are well supported.
>>
>> Signed-off-by: Eric Curtin 
>> ---
>>  drivers/platform/x86/thinkpad_acpi.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/platform/x86/thinkpad_acpi.c
>> b/drivers/platform/x86/thinkpad_acpi.c
>> index a268a7a..4eb41aa 100644
>> --- a/drivers/platform/x86/thinkpad_acpi.c
>> +++ b/drivers/platform/x86/thinkpad_acpi.c
>> @@ -6661,7 +6661,6 @@ static void __init
>> tpacpi_detect_brightness_capabilities(void)
>> pr_info("detected a 8-level brightness capable
>> ThinkPad\n");
>> break;
>> default:
>> -   pr_info("Unsupported brightness interface\n");
>> tp_features.bright_unkfw = 1;
>> bright_maxlvl = b - 1;
>> }
>
> Perhaps this should be something like this instead:
> ---
>  drivers/platform/x86/thinkpad_acpi.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/thinkpad_acpi.c 
> b/drivers/platform/x86/thinkpad_acpi.c
> index a268a7a..bd12c71 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -6653,18 +6653,16 @@ static void __init 
> tpacpi_detect_brightness_capabilities(void)
> switch (b) {
> case 16:
> bright_maxlvl = 15;
> -   pr_info("detected a 16-level brightness capable ThinkPad\n");
> break;
> case 8:
> case 0:
> bright_maxlvl = 7;
> -   pr_info("detected a 8-level brightness capable ThinkPad\n");
> break;
> default:
> -   pr_info("Unsupported brightness interface\n");
> tp_features.bright_unkfw = 1;
> bright_maxlvl = b - 1;
> }
> +   pr_info("detected %u brightness levels\n", bright_maxlvl + 1);
>  }
>
>  static int __init brightness_init(struct ibm_init_struct *iibm)

Maybe, but the other logging issues kinda mean something. There are
many, many reports of people thinking their brightness interface is
broken because of this logging message, when in reality the i915 driver
supports their devices just fine as previously stated.

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] Remove logging for "Unsupported brightness interface"

2016-02-04 Thread Eric Curtin
On 16 January 2016 at 23:43, Eric Curtin  wrote:
> Message gets logged on machines that are well supported.
> Fixed one checkpatch.pl ERROR also.
>
> Signed-off-by: Eric Curtin 
> ---
>  drivers/platform/x86/thinkpad_acpi.c | 6 ++
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/platform/x86/thinkpad_acpi.c
> b/drivers/platform/x86/thinkpad_acpi.c
> index 0bed473..b149dec 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -6434,7 +6434,7 @@ static const struct tpacpi_quirk
> brightness_quirk_table[] __initconst = {
>   */
>  static void __init tpacpi_detect_brightness_capabilities(void)
>  {
> - unsigned int b;
> + const unsigned int b = tpacpi_check_std_acpi_brightness_support();
>
>   vdbg_printk(TPACPI_DBG_INIT,
>  "detecting firmware brightness interface capabilities\n");
> @@ -6447,7 +6447,6 @@ static void __init
> tpacpi_detect_brightness_capabilities(void)
>   * Lenovo Vista BIOS to ACPI brightness mode even if we are not
>   * going to publish a backlight interface
>   */
> - b = tpacpi_check_std_acpi_brightness_support();
>   switch (b) {
>   case 16:
>   bright_maxlvl = 15;
> @@ -6459,7 +6458,6 @@ static void __init
> tpacpi_detect_brightness_capabilities(void)
>   pr_info("detected a 8-level brightness capable ThinkPad\n");
>   break;
>   default:
> - pr_info("Unsupported brightness interface\n");
>   tp_features.bright_unkfw = 1;
>   bright_maxlvl = b - 1;
>   }
> @@ -7440,7 +7438,7 @@ static struct ibm_struct volume_driver_data = {
>
>  #define alsa_card NULL
>
> -static void inline volume_alsa_notify_change(void)
> +static inline void volume_alsa_notify_change(void)
>  {
>  }
>
> --
> 2.5.0

Hi Guys,

Sorry to be bugging you. Is this going to be accepted or not? Just a poke! :)

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] adaptive keyboard off after suspend on linux kernel 4.4 and 4.5, (thinkpad x1 gen2)

2016-02-04 Thread Bastien Nocera
Hey,

I'm afraid that I'm laptop-less as that X1 Carbon 2nd is dying of MCE errors 
and switching off after 5 minutes of use.

I didn't write the adaptive keyboard support, I exposed it through sysfs and 
added support for more keys.

The original author is somebody else (which I can't check for because of my 
dead laptop...)

Cheers

PS: the keyboard still works fine with the latest 4.3 kernels and 
suspend/resume FWIW

> On 4 Feb 2016, at 14:32, Henrique de Moraes Holschuh  wrote:
> 
>> On Wed, 27 Jan 2016, Sindre Fjogstad wrote:
>> After upgrading my kernel to version 4.4 and then 4.5.RC1 from 4.2 my
>> adaptive keyboard is off when the laptop wakes up after suspend. The
>> adaptive keyboard works as expected before the suspend.
> 
> Suspend to RAM, or hibernation (suspend to disk) ?
> 
>> How do you want me to debug this and what kind of information do you
>> need for me to provide you?
>> 
>> from dmesg:
>> [   11.181209] thinkpad_acpi: ThinkPad ACPI Extras v0.25
>> [   11.181212] thinkpad_acpi: http://ibm-acpi.sf.net/
>> [   11.181214] thinkpad_acpi: ThinkPad BIOS GRET37WW (1.14 ), EC unknown
>> [   11.181215] thinkpad_acpi: Lenovo ThinkPad X1 Carbon 2nd, model 20A8S0WT16
>> 
>> I have attached my kern.log filtered for acpi which contains hints on
>> additional issues:
>> - unhandled HKEY event 0x60c0
>> - unknown version of the HKEY interface: 0x200
> 
> Those are known harmless conditions, and HKEY 0x200 interface *is* the
> adaptative keyboard version of the HKEY event interface, but it is only
> "partially" known...
> 
> And as you can see, it apparently still has some rough edges ;-)
> 
> I will need your help to fix this, I don't have any thinkpad with an
> adaptative keyboard to test.  In fact, the adaptative keyboard code was a
> contribution by Bastien Nocera.  Added him to the CC.
> 
> Bastien, can you help debug this issue?
> 
> -- 
>  "One disk to rule them all, One disk to find them. One disk to bring
>  them all and in the darkness grind them. In the Land of Redmond
>  where the shadows lie." -- The Silicon Valley Tarot
>  Henrique Holschuh

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel