[ibm-acpi-devel] [PATCH v1 2/3] platform/x86: thinkpad_acpi: Join string literals back

2017-05-10 Thread Andy Shevchenko
intended. Signed-off-by: Andy Shevchenko --- drivers/platform/x86/thinkpad_acpi.c | 182 +-- 1 file changed, 65 insertions(+), 117 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 7740b5e1b998..e6fbb2579dd9

Re: [ibm-acpi-devel] [PATCH v1 2/3] platform/x86: thinkpad_acpi: Join string literals back

2017-05-10 Thread Andy Shevchenko
On Tue, 2017-05-09 at 21:24 -0300, Henrique de Moraes Holschuh wrote: > On Tue, May 9, 2017, at 14:33, Andy Shevchenko wrote: > > On Tue, 2017-05-09 at 14:10 -0300, Henrique de Moraes Holschuh > > wrote: > > > > While here, print negative error without changin

Re: [ibm-acpi-devel] [PATCH v1 2/3] platform/x86: thinkpad_acpi: Join string literals back

2017-05-10 Thread Andy Shevchenko
On Tue, 2017-05-09 at 14:10 -0300, Henrique de Moraes Holschuh wrote: Thanks for review, my comments below. > On Tue, 09 May 2017, Andy Shevchenko wrote: > > There is no point to keep string literal split. It even makes > > slightly > > harder to maintain and debug. > &

[ibm-acpi-devel] [PATCH v1 1/3] platform/x86: thinkpad_acpi: Make logic straight in hotkey_exit()

2017-05-10 Thread Andy Shevchenko
ned-off-by: Andy Shevchenko --- drivers/platform/x86/thinkpad_acpi.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 7b6cb0c69b02..7740b5e1b998 100644 --- a/drivers/platform/x86/think

Re: [ibm-acpi-devel] [PATCH v1 1/3] platform/x86: thinkpad_acpi: Make logic straight in hotkey_exit()

2017-05-10 Thread Andy Shevchenko
On Tue, 2017-05-09 at 14:02 -0300, Henrique de Moraes Holschuh wrote: Thanks for review, my comments below. > On Tue, 09 May 2017, Andy Shevchenko wrote: > > The commit 4be73005e4dc > > > > ("thinkpad-acpi: remove uneeded tp_features.hotkey tests in > > hotke

[ibm-acpi-devel] [PATCH v1 3/3] platform/x86: thinkpad_acpi: Add a comment about 0 in module_param_call()

2017-05-10 Thread Andy Shevchenko
://patchwork.ozlabs.org/patch/713245/ Cc: Richard Weinberger Signed-off-by: Andy Shevchenko --- 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 e6fbb2579dd9..f5bc888b2ef4 100644

Re: [ibm-acpi-devel] [PATCH 09/11] platform: thinkpad_acpi: convert to use DRIVER_ATTR_RO/RW

2017-06-09 Thread Andy Shevchenko
immutable tag / branch. P.S. Change is good to me, though let's give a chance to Darren and Henrique to comment. > Cc: Henrique de Moraes Holschuh > Cc: Darren Hart > Cc: Andy Shevchenko > Cc: > Cc: > Signed-off-by: Greg Kroah-Hartman > --- >

Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Implement tablet mode resolving using GMMS method

2017-10-01 Thread Andy Shevchenko
ode. I dunno why this one didn't appear in our patchwork database. I'll go to apply manually soon. Sorry for the delay. -- With Best Regards, Andy Shevchenko -- Check out the vibran

Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Implement tablet mode resolving using GMMS method

2017-10-01 Thread Andy Shevchenko
On Sun, Oct 1, 2017 at 12:31 PM, Andy Shevchenko wrote: > On Mon, Sep 18, 2017 at 7:00 PM, Lyude Paul wrote: >> Reviewed-by: Lyude Paul >> >> On Fri, 2017-09-15 at 15:20 +0200, Benjamin Berg wrote: >>> Many thinkpad laptops and convertibles provide the GMMS met

Re: [ibm-acpi-devel] [PATCHv2] thinkpad_acpi: Implement tablet mode resolving using GMMS method

2017-10-14 Thread Andy Shevchenko
in_tablet_mode = hotkey_gmms_get_tablet_mode(res, > + > &has_tablet_mode); > + if (has_tablet_mode) > + tp_features.hotkey_tablet = > TP_HOTKEY_TABLET_USES_GMMS; > + type = "GMMS&

Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Accept flat mode for type 4 multi mode status

2017-11-14 Thread Andy Shevchenko
_FLAT | > TP_ACPI_MULTI_MODE_TABLET | > TP_ACPI_MULTI_MODE_STAND | > TP_ACPI_MULTI_MODE_TENT; > break; -- With Best Regards, Andy Shevchenko -

Re: [ibm-acpi-devel] [PATCH 0/1] Use checkpatch.pl to make thinkpad_acpi.c error free: octal permissions

2017-11-15 Thread Andy Shevchenko
ot understand the ABI of this module. So, obvious NAK for this patch. -- With Best Regards, Andy Shevchenko -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! ht

Re: [ibm-acpi-devel] [PATCH 1/1] Use checkpatch.pl to make thinkpad_acpi.c error free: add parenthesis to complex macros

2017-11-15 Thread Andy Shevchenko
On Wed, Nov 15, 2017 at 1:14 AM, Simranjit Singh wrote: > From: Simranjit Singh > > Added parentheses around complex macros following checkpatch.pl for > thinkpad_acpi.c Same story. -- With Best Regards, And

Re: [ibm-acpi-devel] [PATCH 1/3 v5] battery: Add the battery hooking API

2017-12-12 Thread Andy Shevchenko
On Sun, Dec 10, 2017 at 8:01 PM, Ognjen Galic wrote: > drivers/acpi/battery.h | 11 > include/acpi/battery.h | 21 Just a hint to the future: use -M -C (with perhaps some non-default thresholds in some cases) to avoid above. -- With Best Regards, Andy Shev

Re: [ibm-acpi-devel] [PATCH 3/3 v5] thinkpad_acpi: Add support for battery thresholds

2017-12-12 Thread Andy Shevchenko
(&battery->dev, &battery_start)) > + return -ENODEV; > + > + if (device_create_file(&battery->dev, &battery_stop)) > + return -ENODEV; Shouldn't be done via group attribures? > + > + return 0; > +

Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Accept flat mode for type 4 multi mode status

2017-12-18 Thread Andy Shevchenko
LTI_MODE_TENT; > break; > default: > pr_err("Unknown multi mode status type %d with value 0x%04X, > please report this to %s\n", >type, value, TPACPI_MAIL); > return 0; > -- > 2.13.6 >

Re: [ibm-acpi-devel] [PATCH 2/3 v6] battery: Add the ThinkPad "Not Charging" quirk

2017-12-18 Thread Andy Shevchenko
tchset for it > to get merged? Through which tree it's supposed to go? -- With Best Regards, Andy Shevchenko -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdo

Re: [ibm-acpi-devel] [PATCH 2/3 v6] battery: Add the ThinkPad "Not Charging" quirk

2017-12-19 Thread Andy Shevchenko
On Mon, Dec 18, 2017 at 7:31 PM, Rafael J. Wysocki wrote: > On Mon, Dec 18, 2017 at 1:36 PM, Andy Shevchenko > wrote: >> On Mon, Dec 18, 2017 at 12:21 PM, Ognjen Galić wrote: >>> On 16/12/2017, Rafael J. Wysocki wrote: >> >>>> I would reorder it as the f

Re: [ibm-acpi-devel] [PATCH 0/2] platform/x86/thinkpad_acpi: Adjustments for four function implementations

2017-12-19 Thread Andy Shevchenko
orth at this point. Sorry, but NAK for both. -- With Best Regards, Andy Shevchenko -- Check out the vibrant tech community on one of the world's most engaging tech sites

Re: [ibm-acpi-devel] platform/x86/thinkpad_acpi: Adjustments for four function implementations

2017-12-19 Thread Andy Shevchenko
лоб расшибёт. Which has English equivalent: Give a man enough rope and he’ll hang himself. -- With Best Regards, Andy Shevchenko -- Check out the vibrant tech community on one of

Re: [ibm-acpi-devel] [PATCH 2/3 v8] thinkpad_acpi: Add support for battery thresholds

2017-12-21 Thread Andy Shevchenko
ws(struct device *parent, > extern void power_supply_unregister(struct power_supply *psy); > extern int power_supply_powers(struct power_supply *psy, struct device *dev); > > +#define to_power_supply(device) container_of(device, struc

Re: [ibm-acpi-devel] [PATCH 1/3 v8] battery: Add the battery hooking API

2017-12-21 Thread Andy Shevchenko
or_each for the module > exit function where deletion of nodes occurs Just two workflow / style comments: - usually we put changelog under --- line; - when you prepare patch series you may use -v to create a version automatically. -- With Best Regards, Andy Shevchenko ---

Re: [ibm-acpi-devel] [PATCH 2/3 v8] thinkpad_acpi: Add support for battery thresholds

2017-12-21 Thread Andy Shevchenko
On Thu, Dec 21, 2017 at 5:24 PM, Ognjen Galić wrote: > On 21 Dec 2017 2:53 pm, "Andy Shevchenko" wrote: > On Thu, Dec 21, 2017 at 12:00 PM, Ognjen Galic wrote: You need stop using HTML as well. >> +DEVICE_ATTR(charge_start_threshold, 0644, >> +

Re: [ibm-acpi-devel] [PATCH v10 2/4] pm: add to_power_supply macro to the API

2017-12-28 Thread Andy Shevchenko
ges in this patch in v10 > > Signed-off-by: Ognjen Galic Missed: Suggested-by: Andy Shevchenko > --- > drivers/power/supply/power_supply_core.c | 2 +- > include/linux/power_supply.h | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/

Re: [ibm-acpi-devel] [PATCH v10 2/4] pm: add to_power_supply macro to the API

2017-12-31 Thread Andy Shevchenko
On Sat, Dec 30, 2017 at 1:49 AM, Ognjen Galić wrote: > On Čet, 2017-12-28 at 10:19 +0200, Andy Shevchenko wrote: >> On Sat, Dec 23, 2017 at 12:53 PM, Ognjen Galic >> wrote: >> > >> > This patch adds the to_power_supply macro to upcast >> > a device t

Re: [ibm-acpi-devel] [PATCH v10 2/4] pm: add to_power_supply macro to the API

2017-12-31 Thread Andy Shevchenko
On Sun, Dec 31, 2017 at 1:17 PM, Rafael J. Wysocki wrote: > On Sun, Dec 31, 2017 at 10:37 AM, Andy Shevchenko > wrote: >> On Sat, Dec 30, 2017 at 1:49 AM, Ognjen Galić wrote: >> You definitely need to send a new revision with all comments >> addressed. So far you didn&

Re: [ibm-acpi-devel] [PATCH v11 1/5] battery: Add the battery hooking API

2018-01-01 Thread Andy Shevchenko
gt; + hook = list_entry(position, struct acpi_battery_hook, list); Ditto. > + list_for_each_safe(position, temp, &battery_hook_list) { > + hook = list_entry(position, struct acpi_battery_hook, list); Ditto. > --- a/drivers/acpi/battery.h > +++

Re: [ibm-acpi-devel] [PATCH v11 2/5] pm: add to_power_supply macro to the API

2018-01-01 Thread Andy Shevchenko
w-level operations via a macro. The patch 5 must be folded into this one. I told you that. Otherwise you will leave bisectability issue. > Suggested-by: Andy Shevchenko > Signed-off-by: Ognjen Galic > > v9: > * Split the pm changes from the thinkpad_acpi patch > into its own p

Re: [ibm-acpi-devel] [PATCH v11 5/5] pm: Remove to_power_supply impl in ds278*

2018-01-01 Thread Andy Shevchenko
the ds278* battery modules that does the > same thing, thus clashing and producing build errors. > > This patch removes that private implementation. Must be folded into patch 2. -- With Best Regards, Andy Shevchenko -

Re: [ibm-acpi-devel] [PATCH v11 3/5] thinkpad_acpi: Add support for battery thresholds

2018-01-01 Thread Andy Shevchenko
y %s, assuming primary", battery_name); > + return BAT_PRIMARY; > +} > + > +/* sysfs interface */ > + > +static ssize_t tpacpi_battery_store(int what, > + s

Re: [ibm-acpi-devel] [PATCH v12 1/4] battery: Add the battery hooking API

2018-01-03 Thread Andy Shevchenko
utex_destroy(&hook_mutex); > +} > battery->bat = power_supply_register_no_ws(&battery->device->dev, > &battery->bat_desc, &psy_cfg); > > +

Re: [ibm-acpi-devel] [PATCH v12 2/4] pm: add to_power_supply macro to the API

2018-01-03 Thread Andy Shevchenko
w-level operations via a macro. > > Suggested-by: Andy Shevchenko > Signed-off-by: Ognjen Galic It took me a while to understand if those private implementations are equivalent to what you introduced. Looks so sysfs_create_group() adds the attributes to power supply device kobject, thus t

Re: [ibm-acpi-devel] [PATCH v12 3/4] thinkpad_acpi: Add support for battery thresholds

2018-01-03 Thread Andy Shevchenko
suggested to use plain int. One more question: why don't you use dev_err()/dev_*() macros instead of pr_*() ones? (Note, it's a question, needs a bit of discussion, I would like to hear a rationale of this, I think it might be one) -- With Best Regards, Andy Shevchenko -

Re: [ibm-acpi-devel] [PATCH v12 4/4] battery: Add the ThinkPad "Not Charging" quirk

2018-01-03 Thread Andy Shevchenko
rk has been added to also report correctly. > > Now the "status" attribute returns "Not Charging" when the > battery on ThinkPads is not physicaly charging. > > Signed-off-by: Ognjen Galic Reviewed-by: Andy Shevchenko > --- > > Notes: > v7: >

Re: [ibm-acpi-devel] [PATCH v12 1/4] battery: Add the battery hooking API

2018-01-03 Thread Andy Shevchenko
On Wed, Jan 3, 2018 at 4:53 PM, Ognjen Galić wrote: > On Wed, Jan 03, 2018 at 04:25:42PM +0200, Andy Shevchenko wrote: >> On Wed, Jan 3, 2018 at 1:58 PM, Ognjen Galic wrote: >> Thanks for an update. I have couple of minors. Otherwise look pretty much >> good! >> &

Re: [ibm-acpi-devel] ThinkPad Yoga 370 thinkpad_acpi unhandled events

2018-02-15 Thread Andy Shevchenko
happened to > ibm-acpi-devel@lists.sourceforge.net > thinkpad_acpi: unknown possible thermal alarm or keyboard event received > thinkpad_acpi: unhandled HKEY event 0x60f0 > thinkpad_acpi: please report the conditions when this event happened to > ibm-acpi-devel@lists.sourceforge.

Re: [ibm-acpi-devel] [PATCH v13 3/4] thinkpad_acpi: Add support for battery thresholds

2018-02-23 Thread Andy Shevchenko
send a new version which addresses comments. -- With Best Regards, Andy Shevchenko -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://s

Re: [ibm-acpi-devel] [PATCH] Add Second Fan Support for Thinkpad P50

2018-04-02 Thread Andy Shevchenko
), > TPACPI_FAN_QI('7', '6', TPACPI_FAN_Q1), > TPACPI_FAN_QI('7', '0', TPACPI_FAN_Q1), > TPACPI_FAN_QL('7', 'M', TPACPI_FAN_2FAN), > + TPACPI_FAN_QL_BIOS('N', '1', TPACPI_FAN_2FAN) /

Re: [ibm-acpi-devel] [PATCH] Add Second Fan Support for Thinkpad P50

2018-04-03 Thread Andy Shevchenko
_FAN_Q1), > TPACPI_FAN_QI('7', '6', TPACPI_FAN_Q1), > TPACPI_FAN_QI('7', '0', TPACPI_FAN_Q1), > TPACPI_FAN_QL('7', 'M', TPACPI_FAN_2FAN), > + TPACPI_FAN_QL_BIOS('N', '1', TPACPI_FAN_

Re: [ibm-acpi-devel] ThinkPad Yoga 370 thinkpad_acpi unhandled events

2018-04-24 Thread Andy Shevchenko
to respin the patches with the tested-by and without the > untested prefix, or can you take them directly? Yes, please. It will make our life easier. -- With Best Regards, Andy Shevchenko -- Check out the vibrant tech

Re: [ibm-acpi-devel] [PATCH 3/3] thinkpad-acpi: silence false-positive-prone pr_warn

2018-04-25 Thread Andy Shevchenko
received\n"); > - known = false; > + /* report simply as unknown, no sensor dump */ > + return false; > } > > thermal_dump_all_sensors(); > - > - return known; > + r

Re: [ibm-acpi-devel] [PATCH 1/3] thinkpad_acpi: add support for inhibit_charge

2018-05-14 Thread Andy Shevchenko
e nice to have just kstrtobool() called instead for such options, but see above. It would need a (huge) refactoring of the driver first. -- With Best Regards, Andy Shevchenko -- Check out the vibrant tech

Re: [ibm-acpi-devel] ThinkPad T480s & thinkpad_acpi.ko

2018-06-08 Thread Andy Shevchenko
t likely our case) - by DMI matching (only for old BIOS'es) - by ACPI ID So, does the ACPI contain one of the listed IDs? #define TPACPI_ACPI_IBM_HKEY_HID"IBM0068" #define TPACPI_ACPI_LENOVO_HKEY_HID "LEN0068&quo

Re: [ibm-acpi-devel] [PATCH v2 1/2] platform/x86: thinkpad_acpi: Proper model/release matching

2018-08-01 Thread Andy Shevchenko
h. The patches you submitted before had been applied. Please, rebase your stuff against our for-next branch and resend. -- With Best Regards, Andy Shevchenko -- Check out the vibrant tech community on one of

Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Extend battery quirk coverage

2018-08-01 Thread Andy Shevchenko
tion that the quirk is needed, however. I see. Care to Cc that guy (if they wish, of course, to be Cc:ed)? > - TPACPI_Q_LNV3('R', '0', 'C', true), /* Thinkpad 13 */ > + TPACPI_Q_LNV3('R', '0', 'C', true), /* 13 */ P

Re: [ibm-acpi-devel] [PATCH v2] platform/x86: thinkpad_acpi: Fix multi-battery bug

2018-08-06 Thread Andy Shevchenko
t tpacpi_battery_init(struct ibm_init_struct *ibm) > { > + memset(&battery_info, 0, sizeof(battery_info)); > + > tp_features.battery_force_primary = tpacpi_check_quirks( > battery_quirk_table, >

Re: [ibm-acpi-devel] [PATCH v2] platform/x86: thinkpad_acpi: extend battery quirk coverage

2018-08-06 Thread Andy Shevchenko
/* Thinkpad 11e */ > + TPACPI_Q_LNV3('R', '0', 'B', true), /* Thinkpad 11e gen 3 */ > TPACPI_Q_LNV3('R', '0', 'C', true), /* Thinkpad 13 */

Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Change the keymap for Favorites hotkey

2018-10-29 Thread Andy Shevchenko
init hotkey_init(struct ibm_init_struct > *iibm) > KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, > KEY_UNKNOWN, > -KEY_FAVORITES, /* Favorite app, 0x311 */ > +KEY_BOOKMARKS, /* Favorite app, 0x311 */ > KEY_RESERVED,/* Clipping tool */ > KE

Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: add unsafe_leds parameter

2018-10-29 Thread Andy Shevchenko
Ah, last but not least, you forgot to include subsystem/driver maintainers in the Cc list (in my mailbox it's even got directly to a spam). On Mon, Oct 29, 2018 at 4:05 PM Andy Shevchenko wrote: > > On Sat, Oct 27, 2018 at 9:15 PM Milan Hauth wrote: > > Thank you for the

Re: [ibm-acpi-devel] [PATCH 1/6] leds: trigger: Introduce audio mute LED trigger

2018-11-26 Thread Andy Shevchenko
new stuff will be used by HD-audio codec driver and some platform > drivers (thinkpad_acpi and dell-laptop, also upcoming huawei-wmi). > +#include > +#include Only on of above is needed, I think you meant module.h. -- With Best Regards, Andy Shevchenko _

Re: [ibm-acpi-devel] [PATCH 3/6] platform/x86: thinkpad_acpi: Add audio mute LED classdev support

2018-11-26 Thread Andy Shevchenko
while (--i >= 0) Needs { } due to two liner below. Might be converted to simple while (i--) { ... } btw. > + if (led_tables[i].state >= 0) > + > led_classdev_unregister(&am

Re: [ibm-acpi-devel] [PATCH 0/6] Introduce audio-mute LED trigger (and conversions to it)

2018-11-26 Thread Andy Shevchenko
have some piece of changes for huawei-wmi, so > please ping me if needed. > > I checked briefly on my Dell laptop, and a Thinkpad model. > Wider tests are appreciated, of course. > Few minor comments, otherwise I like this series. Acked-by: Andy Shevchenko for PDx86 bits. > >

Re: [ibm-acpi-devel] [PATCH 0/6] Introduce audio-mute LED trigger (and conversions to it)

2018-11-28 Thread Andy Shevchenko
te whole system. > > OK, I'll wait for more comments in today and update accordingly. sys sounds plausible to me. In any case we may revisit in the future if something happens to it. OTOH it would be part of ABI, right? -- With Best Regards, Andy Shevchenko __

Re: [ibm-acpi-devel] [PATCH 0/6] Introduce audio-mute LED trigger (and conversions to it)

2018-11-30 Thread Andy Shevchenko
1.1.2.4.3) + '::' + name ? -- With Best Regards, Andy Shevchenko ___ 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] platform/x86: thinkpad_acpi: add unsafe_leds parameter

2018-12-03 Thread Andy Shevchenko
gt; Signed-off-by: Milan Hauth > > > > I am not confortable signing-off on this one. ...I'm not familiar with this interface and I rely on Henrique's opinion, so, I can't take it. Sorry. -- With Best Regards, Andy Shevchenko ___

Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Cleanup quirks macros

2018-12-03 Thread Andy Shevchenko
ACPI_FAN_QB('N', '1', TPACPI_FAN_2FAN), > + TPACPI_QEC_IBM('1', 'Y', TPACPI_FAN_Q1), > + TPACPI_QEC_IBM('7', '8', TPACPI_FAN_Q1), > + TPACPI_QEC_IBM('7', &

Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Cleanup quirks macros

2018-12-04 Thread Andy Shevchenko
On Tue, Dec 4, 2018 at 1:20 PM Henrique de Moraes Holschuh wrote: > > On Mon, 03 Dec 2018, Andy Shevchenko wrote: > > On Fri, Nov 16, 2018 at 3:18 PM Jouke Witteveen > > wrote: > > > > Please, submit a new version with changelog. > > > > Though, before

Re: [ibm-acpi-devel] [PATCH v2] platform/x86: thinkpad_acpi: Cleanup quirks macros

2018-12-11 Thread Andy Shevchenko
7;, TPACPI_FAN_Q1), > + TPACPI_QEC_IBM('7', '6', TPACPI_FAN_Q1), > + TPACPI_QEC_IBM('7', '0', TPACPI_FAN_Q1), > + TPACPI_QEC_LNV('7', 'M', TPACPI_FAN_2FAN), > + TPACPI_Q_LNV('N', '1', TPACPI_FAN_2FAN), > }; > > -#undef TPACPI_FAN_QL > -#undef TPACPI_FAN_QI > -#undef TPACPI_FAN_QB > - > static int __init fan_init(struct ibm_init_struct *iibm) > { > int rc; > -- > 2.19.2 > -- With Best Regards, Andy Shevchenko ___ 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] platform/x86: thinkpad_acpi: disable bluetooth for some machines

2019-03-07 Thread Andy Shevchenko
/* bluetooth not supported on 570, 600e/x, 770e, 770x, A21e, A2xm/p, G4x, R30, R31, R40e, R50e, T20-22, X20-21 */ tp_features.bluetooth = hkey_handle && acpi_evalf(hkey_handle, &status, "GBDC", "qd"); Is it possible to integrate your

Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: disable bluetooth for some machines

2019-03-07 Thread Andy Shevchenko
>> Probe these models by DMI match and disable bluetooth subdriver > >> if specified Intel wireless card exist. > Thanks for remind. > > Should I resend this patch in correct way? It still needs a bit of work, and as I told you, we are now

Re: [ibm-acpi-devel] Bugfix thinkpad_acpi.c / proper fanquirk-matching for P50 series

2019-03-27 Thread Andy Shevchenko
BM('7', '0', TPACPI_FAN_Q1), > TPACPI_QEC_LNV('7', 'M', TPACPI_FAN_2FAN), > - TPACPI_Q_LNV('N', '1', TPACPI_FAN_2FAN), > + TPACPI_Q_LNV3('N', '1', 'E', TPACPI_FAN_2FAN), > }; > > static int _

Re: [ibm-acpi-devel] [PATCH] fix fan-quirk macro for Lenovo P50

2019-03-27 Thread Andy Shevchenko
V('7', 'M', TPACPI_FAN_2FAN), > - TPACPI_Q_LNV('N', '1', TPACPI_FAN_2FAN), > + TPACPI_Q_LNV3('N', '1', 'E', TPACPI_FAN_2FAN), > }; > > static int __init fan_init(struct ibm_init_struct *iibm) >

Re: [ibm-acpi-devel] Question about thinkpad_acpi

2019-03-28 Thread Andy Shevchenko
gt; > am I screwed with this machine and have to wait for Lenovo to patch this? > > You see this really bugs me :-) and I'm looking forward to your council. > > > > Greetings, > > Sebastian Dörner > > > -- With Best Regards, Andy Shevchenko ___ 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] platform/x86: thinkpad_acpi: Read EC information on newer models

2019-04-05 Thread Andy Shevchenko
e_fw_id(ec_fw_string, > +&tp->ec_model, &tp->ec_release); > + if (t != 'H') { > + pr_notice("ThinkPad firmware release %s doesn't match > the known patterns\n", > + ec_fw_string);

Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: fix spelling mistake "capabilites" -> "capabilities"

2019-05-06 Thread Andy Shevchenko
=auto, 1=volume and mute, > > 2=mute only"); > > > > module_param_named(volume_control, volume_control_allowed, bool, 0444); > > MODULE_PARM_DESC(volume_control, -- With Best Regards, Andy Shevchenko ___ 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] platform/x86: thinkpad_acpi: Mark expected switch fall-throughs

2019-05-06 Thread Andy Shevchenko
to enable > >>> -Wimplicit-fallthrough. > >>> > >>> Signed-off-by: Gustavo A. R. Silva > >> > >> Reviewed-by: Kees Cook > > > > Acked-by: Henrique de Moraes Holschuh > > > > Thank you both, Kees and Henrique.

Re: [ibm-acpi-devel] [PATCH] leds: tpacpi: cleanup for Thinkpad ACPI led

2019-05-06 Thread Andy Shevchenko
if (!rc) > > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) > http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- With Best Regards, Andy Shevchenko ___ 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] Add Lenovo PrivacyGuard feature found in T480s, T490, T490s

2019-05-24 Thread Andy Shevchenko
hwork.kernel.org/project/platform-driver-x86/list/ -- With Best Regards, Andy Shevchenko ___ 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] Add Lenovo PrivacyGuard feature found in T480s, T490, T490s

2019-06-29 Thread Andy Shevchenko
****** > > * > @@ -10210,6 +10314,10 @@ static struct ibm_init_struct ibms_init[] __initdata > = { > .init = tpacpi_battery_init, > .data = &battery_driver_data, > }, > + { > + .init = tpacpi_lcdshadow_init, > + .data = &lcdshadow_driver_data, > + }, > }; > > static int __init set_ibm_param(const char *val, const struct kernel_param > *kp) > -- > 2.20.1 > -- With Best Regards, Andy Shevchenko ___ 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 19/30] platform/x86: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Andy Shevchenko
acpi_keymaps[keymap_id], > + TPACPI_HOTKEY_MAP_SIZE, GFP_KERNEL); > + if (!hotkey_keycode_map) { > + pr_err("failed to allocate memory for key map\n"); > + res = -ENOMEM; &g

Re: [ibm-acpi-devel] [PATCH v2 21/35] platform/x86/thinkpad: Use kmemdup rather than duplicating its implementation

2019-07-25 Thread Andy Shevchenko
EY_MAP_SIZE, GFP_KERNEL); > + if (!hotkey_keycode_map) { > + pr_err("failed to allocate memory for key map\n"); > + res = -ENOMEM; > + goto err_exit; > + } > > input_set_capability(tpacpi_inputdev, EV_MSC, MSC_SCAN); >

Re: [ibm-acpi-devel] [PATCH] platform/x86: Add Lenovo ThinkPad PrivacyGuard.

2019-07-25 Thread Andy Shevchenko
; > + > + return lcdshadow_set(state); > +} > + > +static struct ibm_struct lcdshadow_driver_data = { > + .name = "lcdshadow", > + .resume = lcdshadow_resume, > + .read = lcdshadow_read, > + .write = lcdshadow_write, > +}; > + &g

Re: [ibm-acpi-devel] [PATCH] platform/x86: Add Lenovo ThinkPad PrivacyGuard.

2019-09-07 Thread Andy Shevchenko
; + > + return lcdshadow_set(state); > +} > + > +static struct ibm_struct lcdshadow_driver_data = { > + .name = "lcdshadow", > + .resume = lcdshadow_resume, > + .read = lcdshadow_read, > + .write = lcdshadow_write, > +}; > + > /*

Re: [ibm-acpi-devel] [PATCH] platform/x86: Add Lenovo ThinkPad PrivacyGuard.

2019-10-25 Thread Andy Shevchenko
API to this kind of devices somewhere in GPU mailing lists. This interface is custom and probably shall never have been appeared. However no-one prevented this from happening. -- With Best Regards, Andy Shevchenko ___ 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 sysfs entry for lcdshadow feature

2020-02-20 Thread Andy Shevchenko
ay to cover other possible users. I Cc this to people from that discussion. [1]: https://lore.kernel.org/dri-devel/cal_quvrknssvvxn3q_se0hrziw2otns3ennoehyhvcicrq9...@mail.gmail.com/ -- With Best Regards, Andy Shevchenko ___ ibm-acpi-devel maili

Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for dual fan control on select models

2020-04-17 Thread Andy Shevchenko
an_init(struct ibm_init_struct *iibm) > @@ -8813,8 +8835,7 @@ static int __init fan_init(struct ibm_init_struct *iibm) > fan_quirk1_setup(); > if (quirks & TPACPI_FAN_2FAN) { > tp_features.second_fan = 1; > -dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_FAN, > -"secondary fan support enabled\n"); > +pr_info("secondary fan support enabled\n"); > } > } else { > pr_err("ThinkPad ACPI EC access misbehaving, fan status and > control unavailable\n"); -- With Best Regards, Andy Shevchenko ___ 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 dual fan control on select models

2020-04-20 Thread Andy Shevchenko
ixed them, no need to resend) with this. Commit message lines are too long and... > (In the first version my mail client botched the white-spacing - my > apologies, this is my first Kernel patch. Used git send-email and gmail this > time.) ...this kind of comments should go after cut li

Re: [ibm-acpi-devel] [PATCH v2] thinkpad_acpi: Add support for dual fan control on select models

2020-04-22 Thread Andy Shevchenko
8812,8 +8834,7 @@ static int __init fan_init(struct ibm_init_struct *iibm) > fan_quirk1_setup(); > if (quirks & TPACPI_FAN_2FAN) { > tp_features.second_fan = 1; > - dbg_printk(TPACPI_DBG_

Re: [ibm-acpi-devel] [PATCH v3] thinkpad_acpi: Add support for dual fan control on select models

2020-04-23 Thread Andy Shevchenko
+ TPACPI_Q_LNV3('N', '2', 'E', TPACPI_FAN_2CTL), /* X1 Extreme (1st > gen) */ > + TPACPI_Q_LNV3('N', '2', 'O', TPACPI_FAN_2CTL), /* X1 Extreme (2nd > gen) */ This has been expanded, but commit message still old, p

Re: [ibm-acpi-devel] [PATCH v4] thinkpad_acpi: Add support for dual fan control on select models

2020-04-24 Thread Andy Shevchenko
fan_init(struct ibm_init_struct > *iibm) > fan_quirk1_setup(); > if (quirks & TPACPI_FAN_2FAN) { > tp_features.second_fan = 1; > - dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_FAN, &

Re: [ibm-acpi-devel] [PATCH v4] thinkpad_acpi: Add support for dual fan control on select models

2020-04-24 Thread Andy Shevchenko
rs your real name here? [1] [1]: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin -- With Best Regards, Andy Shevchenko ___ 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 v4] thinkpad_acpi: Add support for dual fan control on select models

2020-04-27 Thread Andy Shevchenko
ars > > On Friday, April 24, 2020, 4:12:05 AM PDT, Andy Shevchenko > wrote: > > > > > > On Fri, Apr 24, 2020 at 12:57 AM Lars wrote: > > > > This adds dual fan control for the following models: > > P50, P51, P52, P70, P71, P72, P1 gen1, X1E gen1, P

Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Remove always false 'value < 0' statement

2020-04-29 Thread Andy Shevchenko
, so doesn't the patch. -- With Best Regards, Andy Shevchenko ___ ibm-acpi-devel mailing list ibm-acpi-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

Re: [ibm-acpi-devel] Low Latency Tolerance preventing Intel Package from entering deep sleep states

2020-05-15 Thread Andy Shevchenko
ns): 0Snoop(ns): 0 > CURRENT_PLATFORMLTR: RAW: 0x40201 > Non-Snoop(ns): 0Snoop(ns): 0 > AGGREGATED_SYSTEM LTR: RAW: 0x904824 > Non-Snoop(ns): 0

Re: [ibm-acpi-devel] Low Latency Tolerance preventing Intel Package from entering deep sleep states

2020-05-22 Thread Andy Shevchenko
by reading the associated files in > the power folder. > > If this doesn't work, then it's possible that your device doesn't > support runtime pm. This may be purposely for reliability reasons or > the driver may just lack support. Check forums discussing issue

Re: [ibm-acpi-devel] [PATCH v4] platform/x86: thinkpad_acpi: lap or desk mode interface

2020-07-02 Thread Andy Shevchenko
tc_attr_group); > + > + return res; return ...(...); So, we create a group for all possible error cases but ENODEV. Why? > +} ... > + sysfs_remove_group(&tpacpi_pdev->dev.kobj, > + &dytc_attr_group); One line? ... > +static struct

Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: not loading brightness_init when _BCL invalid

2020-07-02 Thread Andy Shevchenko
ot;thinkpad_acpi native brightness control enabled\n"); 'notice' level is quite high, why do we spam users with this? -- With Best Regards, Andy Shevchenko ___ ibm-acpi-devel mailing list ibm-acpi-devel@lists.sourceforge.net https://lists.s

Re: [ibm-acpi-devel] [External] Re: [PATCH v4] platform/x86: thinkpad_acpi: lap or desk mode interface

2020-07-02 Thread Andy Shevchenko
On Thu, Jul 2, 2020 at 1:45 PM Mark Pearson wrote: > On 7/2/2020 5:29 AM, Andy Shevchenko wrote: > > On Mon, Jun 29, 2020 at 10:23 PM Mark Pearson > > wrote: ... > > You specifically added a new ABI, where is documentation? It's a show > > stopper. > Ah -

Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: not loading brightness_init when _BCL invalid

2020-07-02 Thread Andy Shevchenko
On Thu, Jul 2, 2020 at 1:51 PM Aaron Ma wrote: > On 7/2/20 5:30 PM, Andy Shevchenko wrote: > > On Thu, Jul 2, 2020 at 11:55 AM Aaron Ma wrote: > >> > >> When _BCL invalid, disable thinkpad_acpi backlight brightness control. > >> > >> brightne

Re: [ibm-acpi-devel] [PATCH v5] platform/x86: thinkpad_acpi: lap or desk mode interface

2020-07-09 Thread Andy Shevchenko
viewed-by: Sugumaran > Reviewed-by: Bastien Nocera > Signed-off-by: Mark Pearson > --- > Changes in v5: > - Updated with review changes from Andy Shevchenko > - Added ABI information to thinkpad-acpi.rst > - improved error handling and parameter passing as recommended >

Re: [ibm-acpi-devel] [v2][PATCH] platform/x86: thinkpad_acpi: not loading brightness_init when _BCL invalid

2020-07-09 Thread Andy Shevchenko
d_acpi native brightness control enabled\n"); In both cases don't you see the duplication of module name in the messages? -- With Best Regards, Andy Shevchenko ___ 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 v5] platform/x86: thinkpad_acpi: lap or desk mode interface

2020-07-10 Thread Andy Shevchenko
On Fri, Jul 10, 2020 at 11:00 AM Hans de Goede wrote: > > Hi, > > On 7/9/20 8:02 PM, Andy Shevchenko wrote: > > On Fri, Jul 3, 2020 at 4:24 AM Mark Pearson wrote: > >> > >> Newer Lenovo Thinkpad platforms have support to identify whether the > >> sys

Re: [ibm-acpi-devel] [v3][PATCH] platform/x86: thinkpad_acpi: not loading brightness_init when _BCL invalid

2020-07-10 Thread Andy Shevchenko
interface not available\n"); > + return 1; > } > > + pr_notice("ACPI native brightness control enabled\n"); > + > /* > * Check for module parameter bogosity, note that we > * init brightness_mode to TPACPI_BRGHT_

Re: [ibm-acpi-devel] [PATCH v5] platform/x86: thinkpad_acpi: lap or desk mode interface

2020-07-10 Thread Andy Shevchenko
gt; --- > Changes in v5: > - Updated with review changes from Andy Shevchenko > - Added ABI information to thinkpad-acpi.rst > - improved error handling and parameter passing as recommended > - code cleanup as recommended > - added review tag from bnocera > Changes i

Re: [ibm-acpi-devel] [PATCH 5.8 regression fix] platform/x86: thinkpad_acpi: Revert: Use strndup_user() in dispatch_proc_write()

2020-07-14 Thread Andy Shevchenko
rts the change to use strndup_user() fixing the > buffer being passed to the ibm_struct.write() call back containing extra > junk at the end. Can we simply use memdup_user()? And thanks for catching this up! -- With Best Regards, Andy Shevchenko _

Re: [ibm-acpi-devel] [PATCH 5.8 regression fix] platform/x86: thinkpad_acpi: Revert: Use strndup_user() in dispatch_proc_write()

2020-07-14 Thread Andy Shevchenko
On Tue, Jul 14, 2020 at 11:21 AM Andy Shevchenko wrote: > On Tue, Jul 14, 2020 at 11:15 AM Hans de Goede wrote: > > > > Commit 35d13c7a0512 ("platform/x86: thinkpad_acpi: Use strndup_user() > > in dispatch_proc_write()") cleaned up dispatch_proc_write() by rep

[ibm-acpi-devel] [PATCH v1] platform/x86: thinkpad_acpi: Limit size when call strndup_user()

2020-07-14 Thread Andy Shevchenko
d13c7a0512 ("platform/x86: thinkpad_acpi: Use strndup_user() in dispatch_proc_write()") Reported-by: Hans de Goede Signed-off-by: Andy Shevchenko --- drivers/platform/x86/thinkpad_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/thinkp

Re: [ibm-acpi-devel] [PATCH 5.8 regression fix] platform/x86: thinkpad_acpi: Revert: Use strndup_user() in dispatch_proc_write()

2020-07-14 Thread Andy Shevchenko
On Tue, Jul 14, 2020 at 12:33 PM Hans de Goede wrote: > On 7/14/20 10:27 AM, Andy Shevchenko wrote: > > On Tue, Jul 14, 2020 at 11:21 AM Andy Shevchenko > > wrote: > >> On Tue, Jul 14, 2020 at 11:15 AM Hans de Goede wrote: > >>> > >>> Commit

Re: [ibm-acpi-devel] [PATCH v1] platform/x86: thinkpad_acpi: Limit size when call strndup_user()

2020-07-15 Thread Andy Shevchenko
On Tue, Jul 14, 2020 at 4:30 PM Hans de Goede wrote: > On 7/14/20 12:42 PM, Andy Shevchenko wrote: ... > > + kernbuf = strndup_user(userbuf, min_t(long, count, PAGE_SIZE)); > This is not going to work: You are right! > Can we please just go with the revert for now? Yes,

Re: [ibm-acpi-devel] [PATCH 0/3] Add 3 new keycodes and use them for 3 new hotkeys on new Lenovo Thinkpads

2020-07-27 Thread Andy Shevchenko
es by the input > >>> maintainers: > >>> > >>> Acked-by: Henrique de Moraes Holschuh > >> > >> Do you want me to merge all 3 through input tree? > > > > Hans, Daren, Andy, what do you prefer? > &

  1   2   >