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
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
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
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
> 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-us
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
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
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
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
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
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
>> 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
>> 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
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
:
- 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
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
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
>> 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
> 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
> 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
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
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
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
>> > 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.
> 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
25 matches
Mail list logo