Re: [PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-20 Thread Chris Chiu
On Wed, Jun 20, 2018 at 12:46 AM, Daniel Drake wrote: > Hi, > > On Thu, Jun 14, 2018 at 1:58 AM, Chris Chiu wrote: >> >> On Wed, Jun 13, 2018 at 8:49 PM, Andy Shevchenko >> wrote: >> > On Mon, Jun 11, 2018 at 10:18 AM, Chris Chiu wrote: >> >> Make asus-wmi notify on hotkey kbd brightness

Re: [PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-20 Thread Chris Chiu
On Wed, Jun 20, 2018 at 12:46 AM, Daniel Drake wrote: > Hi, > > On Thu, Jun 14, 2018 at 1:58 AM, Chris Chiu wrote: >> >> On Wed, Jun 13, 2018 at 8:49 PM, Andy Shevchenko >> wrote: >> > On Mon, Jun 11, 2018 at 10:18 AM, Chris Chiu wrote: >> >> Make asus-wmi notify on hotkey kbd brightness

Re: [PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-19 Thread Andy Shevchenko
On Tue, Jun 19, 2018 at 7:46 PM, Daniel Drake wrote: >> > Can we avoid those ugly castings? > Now kbd_led_set can continue being a correctly typed function pointer > for led_classdev.brightness_set. And from the code you are adding here > you can call __kbd_led_set directly with signed integer

Re: [PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-19 Thread Andy Shevchenko
On Tue, Jun 19, 2018 at 7:46 PM, Daniel Drake wrote: >> > Can we avoid those ugly castings? > Now kbd_led_set can continue being a correctly typed function pointer > for led_classdev.brightness_set. And from the code you are adding here > you can call __kbd_led_set directly with signed integer

Re: [PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-19 Thread Daniel Drake
Hi, On Thu, Jun 14, 2018 at 1:58 AM, Chris Chiu wrote: > > On Wed, Jun 13, 2018 at 8:49 PM, Andy Shevchenko > wrote: > > On Mon, Jun 11, 2018 at 10:18 AM, Chris Chiu wrote: > >> Make asus-wmi notify on hotkey kbd brightness changes, listen for > >> brightness events and update the brightness

Re: [PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-19 Thread Daniel Drake
Hi, On Thu, Jun 14, 2018 at 1:58 AM, Chris Chiu wrote: > > On Wed, Jun 13, 2018 at 8:49 PM, Andy Shevchenko > wrote: > > On Mon, Jun 11, 2018 at 10:18 AM, Chris Chiu wrote: > >> Make asus-wmi notify on hotkey kbd brightness changes, listen for > >> brightness events and update the brightness

Re: [PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-19 Thread Chris Chiu
On Thu, Jun 14, 2018 at 2:58 PM, Chris Chiu wrote: > On Wed, Jun 13, 2018 at 8:49 PM, Andy Shevchenko > wrote: >> On Mon, Jun 11, 2018 at 10:18 AM, Chris Chiu wrote: >>> Make asus-wmi notify on hotkey kbd brightness changes, listen for >>> brightness events and update the brightness directly in

Re: [PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-19 Thread Chris Chiu
On Thu, Jun 14, 2018 at 2:58 PM, Chris Chiu wrote: > On Wed, Jun 13, 2018 at 8:49 PM, Andy Shevchenko > wrote: >> On Mon, Jun 11, 2018 at 10:18 AM, Chris Chiu wrote: >>> Make asus-wmi notify on hotkey kbd brightness changes, listen for >>> brightness events and update the brightness directly in

Re: [PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-14 Thread Chris Chiu
On Wed, Jun 13, 2018 at 8:49 PM, Andy Shevchenko wrote: > On Mon, Jun 11, 2018 at 10:18 AM, Chris Chiu wrote: >> Make asus-wmi notify on hotkey kbd brightness changes, listen for >> brightness events and update the brightness directly in the driver. > >> For this purpose, bound check on

Re: [PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-14 Thread Chris Chiu
On Wed, Jun 13, 2018 at 8:49 PM, Andy Shevchenko wrote: > On Mon, Jun 11, 2018 at 10:18 AM, Chris Chiu wrote: >> Make asus-wmi notify on hotkey kbd brightness changes, listen for >> brightness events and update the brightness directly in the driver. > >> For this purpose, bound check on

Re: [PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-13 Thread Andy Shevchenko
On Mon, Jun 11, 2018 at 10:18 AM, Chris Chiu wrote: > Make asus-wmi notify on hotkey kbd brightness changes, listen for > brightness events and update the brightness directly in the driver. > For this purpose, bound check on brightness in kbd_led_set must be > based on the same data type to

Re: [PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-13 Thread Andy Shevchenko
On Mon, Jun 11, 2018 at 10:18 AM, Chris Chiu wrote: > Make asus-wmi notify on hotkey kbd brightness changes, listen for > brightness events and update the brightness directly in the driver. > For this purpose, bound check on brightness in kbd_led_set must be > based on the same data type to

Re: [PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-13 Thread Chris Chiu
On Mon, Jun 11, 2018 at 3:18 PM, Chris Chiu wrote: > Make asus-wmi notify on hotkey kbd brightness changes, listen for > brightness events and update the brightness directly in the driver. > For this purpose, bound check on brightness in kbd_led_set must be > based on the same data type to

Re: [PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-13 Thread Chris Chiu
On Mon, Jun 11, 2018 at 3:18 PM, Chris Chiu wrote: > Make asus-wmi notify on hotkey kbd brightness changes, listen for > brightness events and update the brightness directly in the driver. > For this purpose, bound check on brightness in kbd_led_set must be > based on the same data type to

[PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-11 Thread Chris Chiu
Make asus-wmi notify on hotkey kbd brightness changes, listen for brightness events and update the brightness directly in the driver. For this purpose, bound check on brightness in kbd_led_set must be based on the same data type to prevent illegal value been set. Update the brightness by

[PATCH v2 1/2] platform/x86: asus-wmi: Call led hw_changed API on kbd brightness change

2018-06-11 Thread Chris Chiu
Make asus-wmi notify on hotkey kbd brightness changes, listen for brightness events and update the brightness directly in the driver. For this purpose, bound check on brightness in kbd_led_set must be based on the same data type to prevent illegal value been set. Update the brightness by