Re: [PATCH 2/2 v6] HID: gt683r: move mode attribute to led-class devices

2014-07-03 Thread Janne Kanniainen
2014-07-03 21:17 GMT+03:00 Bryan Wu : > On Thu, Jul 3, 2014 at 10:40 AM, Johan Hovold wrote: >> On Thu, Jul 03, 2014 at 08:17:09PM +0300, Janne Kanniainen wrote: >>> Move led_mode attribute from HID device to led-class devices and rename >>> it msi_mode. This will also

[PATCH 2/2 v6] HID: gt683r: move mode attribute to led-class devices

2014-07-03 Thread Janne Kanniainen
Move led_mode attribute from HID device to led-class devices and rename it msi_mode. This will also fix race condition by using attribute-groups. Signed-off-by: Janne Kanniainen --- Changes in v3: - Style fixes - Rename sysfs-class-hid-driver-gt683r to sysfs-class-leds-driver

[PATCH 1/2 v6] HID: gt683r: fix race condition

2014-07-03 Thread Janne Kanniainen
This will fix race condition noticed by Oliver Neukum. Sysfs files are created before mutex and work are initialized. Signed-off-by: Janne Kanniainen --- drivers/hid/hid-gt683r.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-gt683r.c b/drivers/hid/hid

[PATCH 2/2 v5] HID: leds: move led_mode attribute to led-class devices in MSI GT683R driver

2014-07-02 Thread Janne Kanniainen
Move led_mode attribute from HID device to led-class devices. This will also fix race condition by using attribute-groups. Signed-off-by: Janne Kanniainen --- Changes in v3: - Style fixes - Rename sysfs-class-hid-driver-gt683r to sysfs-class-leds-driver-gt683r Changes in v4

Re: [PATCH 2/2 v2] HID: leds: Use attribute-groups in MSI GT683R driver

2014-07-01 Thread Janne Kanniainen
> Great, I just cherry-picked and applied to my tree > http://git.kernel.org/cgit/linux/kernel/git/cooloney/linux-leds.git/commit/?h=for-next&id=f471d9480275796dea2ac7ec249b050e70a2888d > > Thanks, > -Bryan Ok, thank you! Janne -- To unsubscribe from this list: send the line "unsubscribe linux-ke

[PATCH 2/2 v4] HID: leds: move led_mode attribute to led-class devices in MSI GT683R driver

2014-07-01 Thread Janne Kanniainen
Move led_mode attribute from HID device to led-class devices and rename it msi_mode. This will also fix race condition by using attribute-groups. Signed-off-by: Janne Kanniainen --- Changes in v3: - Style fixes - Rename sysfs-class-hid-driver-gt683r to sysfs-class-leds-driver

[PATCH 2/2 v3] HID: leds: move led_mode attribute to led-class devices in MSI GT683R driver

2014-06-25 Thread Janne Kanniainen
Move led_mode attribute from HID device to led-class devices and rename it msi_mode. This will also fix race condition by using attribute-groups. Signed-off-by: Janne Kanniainen --- Changes in v3: - Style fixes - Rename sysfs-class-hid-driver-gt683r to sysfs-class-leds-driver

[PATCH 2/2 v2] HID: leds: Use attribute-groups in MSI GT683R driver

2014-06-25 Thread Janne Kanniainen
Use attribute-groups to fix race condition. Signed-off-by: Janne Kanniainen --- .../ABI/testing/sysfs-class-hid-driver-gt683r | 6 +++-- drivers/hid/hid-gt683r.c | 31 +- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a

[PATCH 2/2] HID: leds: move led_mode attribute to led-class devices in MSI GT683R driver

2014-06-24 Thread Janne Kanniainen
Move led_mode attribute from HID device to led-class devices and rename it msi_mode. Signed-off-by: Janne Kanniainen --- .../ABI/testing/sysfs-class-hid-driver-gt683r | 6 ++- drivers/hid/hid-gt683r.c | 50 +- 2 files changed, 43 insertions

[PATCH 1/2] HID: leds: fix race condition in MSI GT683R driver

2014-06-24 Thread Janne Kanniainen
This will fix race condition noticed by Oliver Neukum. Sysfs files are created before mutex and work are initialized. Signed-off-by: Janne Kanniainen --- drivers/hid/hid-gt683r.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-gt683r.c b/drivers/hid/hid

[PATCH v10] leds: USB: HID: Add support for MSI GT683R led panels

2014-06-23 Thread Janne Kanniainen
This driver adds support for USB controlled led panels that exists in MSI GT683R laptop Signed-off-by: Janne Kanniainen --- Changes in v2: - sorted headers to alphabetic order - using devm_kzalloc - using BIT(n) - using usb_control_msg instead of usb_submit_urb

Re: [PATCH v9] leds: USB: HID: Add support for MSI GT683R led panels

2014-06-23 Thread Janne Kanniainen
>> Sorry for noticing this thread late. No problem. Good that you noticed it now! Thank you. > Just move the initialisation of the lock and work to the other private > data initialisations directly after it's allocated. > > Can you send a follow up patch, Janne? Yes I can. Just a moment. Janne

Re: [PATCH v9] leds: USB: HID: Add support for MSI GT683R led panels

2014-06-18 Thread Janne Kanniainen
>> This driver adds support for USB controlled led panels that exists in >> MSI GT683R laptop >> >> Signed-off-by: Janne Kanniainen > > Reviewed-by: Johan Hovold > > Thanks, Janne! > > Johan Thank you for reviewing my patch :) I sure learnt a lot from

[PATCH v9] leds: USB: HID: Add support for MSI GT683R led panels

2014-06-18 Thread Janne Kanniainen
This driver adds support for USB controlled led panels that exists in MSI GT683R laptop Signed-off-by: Janne Kanniainen --- Changes in v2: - sorted headers to alphabetic order - using devm_kzalloc - using BIT(n) - using usb_control_msg instead of usb_submit_urb

[PATCH v8] leds: USB: HID: Add support for MSI GT683R led panels

2014-06-17 Thread Janne Kanniainen
: - some cleanups and bugs fixed Signed-off-by: Janne Kanniainen --- .../ABI/testing/sysfs-class-hid-driver-gt683r | 14 + drivers/hid/Kconfig| 14 + drivers/hid/Makefile | 1 + drivers/hid/hid-core.c

[PATCH v6] leds: USB: HID: Add support for MSI GT683R led panels

2014-06-16 Thread Janne Kanniainen
This driver adds support for USB controlled led panels that exists in MSI GT683R laptop Signed-off-by: Janne Kanniainen --- Changes in v2: - sorted headers to alphabetic order - using devm_kzalloc - using BIT(n) - using usb_control_msg instead of usb_submit_urb

[PATCH v6] leds: USB: HID: Add support for MSI GT683R led panels

2014-06-16 Thread Janne Kanniainen
This driver adds support for USB controlled led panels that exists in MSI GT683R laptop Signed-off-by: Janne Kanniainen --- Changes in v2: - sorted headers to alphabetic order - using devm_kzalloc - using BIT(n) - using usb_control_msg instead of usb_submit_urb

Re: [PATCH v5] leds: USB: HID: Add support for MSI GT683R led panels

2014-06-15 Thread Janne Kanniainen
>> Ok, so you decided to continue setting mode on every LED brightness >> update. That should be fine, but you never answered my question about >> whether it is necessary? > > I decided to do it that way because official driver did it as well. I > can check if it is necessary. Ok, I checked this o

Re: [PATCH v5] leds: USB: HID: Add support for MSI GT683R led panels

2014-06-14 Thread Janne Kanniainen
> Hi! Hi. >> --- /dev/null >> +++ b/Documentation/ABI/testing/sysfs-class-hid-driver-gt683r >> @@ -0,0 +1,10 @@ >> +What:/sys/class/hidraw//device/state >> +Date:Jun 2014 >> +KernelVersion: 3.15 >> +C

Re: [PATCH v5] leds: USB: HID: Add support for MSI GT683R led panels

2014-06-13 Thread Janne Kanniainen
> Ok, so you decided to continue setting mode on every LED brightness > update. That should be fine, but you never answered my question about > whether it is necessary? I decided to do it that way because official driver did it as well. I can check if it is necessary. > You're almost done. One la

[PATCH v5] leds: USB: HID: Add support for MSI GT683R led panels

2014-06-12 Thread Janne Kanniainen
This driver adds support for USB controlled led panels that exists in MSI GT683R laptop Signed-off-by: Janne Kanniainen --- Changes in v2: - sorted headers to alphabetic order - using devm_kzalloc - using BIT(n) - using usb_control_msg instead of usb_submit_urb

[PATCH v4] leds: USB: HID: Add support for MSI GT683R led panels

2014-06-11 Thread Janne Kanniainen
This driver adds support for USB controlled led panels that exists in MSI GT683R laptop Signed-off-by: Janne Kanniainen --- Changes in v2: - sorted headers to alphabetic order - using devm_kzalloc - using BIT(n) - using usb_control_msg instead of usb_submit_urb

[PATCH v3] leds: USB: HID: Add support for MSI GT683R led panels

2014-06-10 Thread Janne Kanniainen
Changes in v3: - implemented as HID device - some cleanups and bug fixes Signed-off-by: Janne Kanniainen --- drivers/hid/Kconfig | 6 ++ drivers/hid/Makefile| 1 + drivers/hid/hid-core.c | 1 + drivers/hid/hid-gt683r.c| 186

Re: [PATCH v2] leds: USB: Add support for MSI GT683R led panels

2014-06-10 Thread Janne Kanniainen
>> > Where did you get these (HID report) values from by the way? >> >> I got them by reverse engineering. > > Traffic sniffing? > Yes. > In fact, it seems you can get away with not adding any locking here. > Just do the (mutex) locking in gt683r_led_set (or gt683r_led_work). Ok I will fix it.

Re: [PATCH v2] leds: USB: Add support for MSI GT683R led panels

2014-06-07 Thread Janne Kanniainen
> First of all, please reply to the original thread and make sure to not > drop people or lists from CC. Sorry this is my first patch and i didn't know that. Now I know. > For arrays you can use the ARRAY_SIZE() macro if that was the reason for > this change. I should have mentioned that when I p

[PATCH v2] leds: USB: Add support for MSI GT683R led panels

2014-06-05 Thread Janne Kanniainen
Signed-off-by: Janne Kanniainen --- drivers/leds/Kconfig | 6 ++ drivers/leds/Makefile | 1 + drivers/leds/leds-gt683r.c | 158 + 3 files changed, 165 insertions(+) create mode 100644 drivers/leds/leds-gt683r.c diff --git a/drivers/leds

[PATCH] leds: USB: Add support for MSI GT683R led panels

2014-05-31 Thread Janne Kanniainen
This driver adds support for USB controlled led panels that exist in MSI GT683R laptop. Signed-off-by: Janne Kanniainen --- drivers/leds/Kconfig | 6 ++ drivers/leds/Makefile | 1 + drivers/leds/leds-gt683r.c | 241 + 3 files changed