eeepc-laptop: Skip unknown key messages 0x50 0x51
PATCH 1/1 eeepc-laptop: Skip unknown key messages 0x50 0x51
Otherwise those are printed several times when (un)plugging the AC connector.
--- drivers/platform/x86/eeepc-laptop.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/platform/x86/eeepc-laptop.c +2 -0
@@ -150,6 +150,8 @@ static const struct key_entry eeepc_keymap[] = { { KE_KEY, 0x32, { KEY_SWITCHVIDEOMODE } }, { KE_KEY, 0x37, { KEY_F13 } }, /* Disable Touchpad */ { KE_KEY, 0x38, { KEY_F14 } }, + { KE_IGNORE, 0x50, { KEY_RESERVED } }, /* AC plugged */ + { KE_IGNORE, 0x51, { KEY_RESERVED } }, /* AC unplugged */ { KE_END, 0 }, };
Signature · 1 line
2.11.1
Quoted 2 lines · Pau Espin Pedrol
Otherwise those are printed several times when (un)plugging the AC connector.
If we have a user space tool that supports them better not to ignore.
Signature · 2 lines
With Best Regards, Andy Shevchenko
A message that is not in the archive (sent off-list or not yet received): CAEGpDuaw3uJoxbyOuTWyBodM-JgMd2hSqZUgg_wbyJa+9sJOjw@mail.gmail.com
Hi, resending as I initially replied from my mobile phone and it seem plain text support is not enabled:
Hi,
If we have user space tools supporting and using this type of event, then what about adding them properly with a define + entry in the structure array so that it can be standardized and on top get rid of those kernel message every time I (un)plug the charger? Would that be welcomed? I could send a new patch as specified above, adding the KEY_CHARING_ON/OFF defines + add entries to eeepc_keymap.
Quoted 14 lines · Andy Shevchenko
Quoted 2 lines · Pau Espin Pedrol
Otherwise those are printed several times when (un)plugging the AC connector.
If we have a user space tool that supports them better not to ignore.
--
With Best Regards,
Andy Shevchenko
Quoted 6 lines · Pau Espin Pedrol
If we have user space tools supporting and using this type of event, then what about adding them properly with a define + entry in the structure array so that it can be standardized and on top get rid of those kernel message every time I (un)plug the charger? Would that be welcomed? I could send a new patch as specified above, adding the KEY_CHARING_ON/OFF defines + add entries to
eeepc_keymap.
Please, do not top posting.
Dmitry, do we have special events for AC (un)plug? What is the best approach in your opinion?
Quoted 8 lines
Quoted 8 lines · Andy Shevchenko
Quoted 2 lines · Pau Espin Pedrol
Otherwise those are printed several times when (un)plugging the AC connector.
If we have a user space tool that supports them better not to ignore.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 9 lines · Andy Shevchenko
Quoted 6 lines · Pau Espin Pedrol
If we have user space tools supporting and using this type of event, then what about adding them properly with a define + entry in the structure array so that it can be standardized and on top get rid of those kernel message every time I (un)plug the charger? Would that be welcomed? I could send a new patch as specified above, adding the KEY_CHARING_ON/OFF defines + add entries to
eeepc_keymap.
Quoted 4 lines
Please, do not top posting.
Dmitry, do we have special events for AC (un)plug? What is the best approach in your opinion?
Not route them through input as they not input events would be the best.
I'd look into hooking up power_supply class.
Thanks.
Signature · 1 line
Dmitry
Quoted 5 lines
Quoted 2 lines
Dmitry, do we have special events for AC (un)plug? What is the best approach in your opinion?
Not route them through input as they not input events would be the best.
Is my patch good enough for this or would you recommend doing it another way?
Quoted 2 lines
I'd look into hooking up
power_supplyclass.
Whys is this necessay? All the related information required is already present in my system.
I already have two power_supply instances:
* /sys/class/power_supply/AC0/ (provided by module "ac"), contains property "online" which is correctly updated to 1 when AC is plugged and 0 when AC is unplugged.
* /sys/class/power_supply/BAT0/ (provided by module "battery"), contains property "status" which is correctly updated to "Charging" when AC is plugged and "Discharging" when AC is unplugged.
Quoted 6 lines · Pau Espin Pedrol
Quoted 5 lines
Quoted 2 lines
Dmitry, do we have special events for AC (un)plug? What is the best approach in your opinion?
Not route them through input as they not input events would be the best.
Is my patch good enough for this or would you recommend doing it another way?
Corentin, do you have any opinion regarding the change?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 6 lines · Pau Espin Pedrol
Quoted 5 lines
Quoted 2 lines
Dmitry, do we have special events for AC (un)plug? What is the best approach in your opinion?
Not route them through input as they not input events would be the best.
Is my patch good enough for this or would you recommend doing it another way?
From input POV your patch makes sense.
Quoted 12 lines
Quoted 3 lines
I'd look into hooking up
power_supplyclass.Whys is this necessay? All the related information required is already present in my system.
I already have twopower_supplyinstances:
*/sys/class/power_supply/AC0/(provided by module "ac"), contains property "online" which is correctly updated to 1 when AC is plugged and 0 when AC is unplugged.
*/sys/class/power_supply/BAT0/(provided by module "battery"), contains property "status" which is correctly updated to "Charging" when AC is plugged and "Discharging" when AC is unplugged.
If everything is already working then it is not necessary. I was trying to say that if it does not quite work, then you shoudl look into integrating it better with power supply subsystem, instead of trying to shoehorn it into input.
Thanks.
Signature · 1 line
Dmitry
Quoted 10 lines · Dmitry Torokhov
Quoted 6 lines · Pau Espin Pedrol
Quoted 5 lines
Quoted 2 lines
Dmitry, do we have special events for AC (un)plug? What is the best approach in your opinion?
Not route them through input as they not input events would be the best.
Is my patch good enough for this or would you recommend doing it another way?
From input POV your patch makes sense.
Could you give your tag?
Quoted 18 lines
Quoted 4 lines
Quoted 4 lines
I'd look into hooking up
power_supplyclass.Quoted 9 lines
Whys is this necessay? All the related information required is already present in my system.
I already have twopower_supplyinstances:
*/sys/class/power_supply/AC0/(provided by module "ac"), contains property "online" which is correctly updated to 1 when AC is plugged and 0 when AC is unplugged.
*/sys/class/power_supply/BAT0/(provided by module "battery"), contains property "status" which is correctly updated to "Charging" when AC is plugged and "Discharging" when AC is unplugged.If everything is already working then it is not necessary. I was trying to say that if it does not quite work, then you shoudl look into integrating it better with power supply subsystem, instead of trying to shoehorn it into input.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 6 lines · Andy Shevchenko
Quoted 4 lines · Dmitry Torokhov
Quoted 3 lines · Pau Espin Pedrol
Quoted 3 lines
Quoted 2 lines
Dmitry, do we have special events for AC (un)plug? What is the best approach in your opinion?
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
Not route them through input as they not input events would be the best.
Is my patch good enough for this or would you recommend doing it another way?
From input POV your patch makes sense.
Could you give your tag?
Based on this discussion and no additional input from Dmitry or Corentin, and my own review, I have queued this patch to testing. Thanks.
Signature · 2 lines
Darren Hart VMware Open Source Technology Center
Dmitry Torokhov
Acked-byQuoted 6 lines · Andy Shevchenko
Quoted 4 lines · Dmitry Torokhov
Quoted 3 lines · Pau Espin Pedrol
Quoted 3 lines
Quoted 2 lines
Dmitry, do we have special events for AC (un)plug? What is the best approach in your opinion?
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
Not route them through input as they not input events would be the best.
Is my patch good enough for this or would you recommend doing it another way?
From input POV your patch makes sense.
Could you give your tag?
Sorry for the delay, I was out of service for a couple of days. I see that Darren already picked up the patch, anyway, for the record:
Signature · 1 line
Dmitry