Re: [PATCH v2] hwmon: corsair-cpro: fix ccp_probe, add delay [HID related]

2020-08-18 Thread Marius Zachmann
On 18.08.20 at 17:35:33 CEST, Guenter Roeck wrote > On Mon, Aug 17, 2020 at 09:00:40AM +0200, Marius Zachmann wrote: > > Possibly because of the changes in usbhid/hid-core.c the first > > raw input report is not received during ccp_probe function and it will > > timeout. I

Re: [PATCH RESEND][next] hwmon: (corsair-cpro) Fix fall-through warnings for Clang

2021-03-06 Thread Marius Zachmann
/115 > Acked-by: Guenter Roeck > Signed-off-by: Gustavo A. R. Silva Acked-by: Marius Zachmann > --- > drivers/hwmon/corsair-cpro.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/hwmon/corsair-cpro.c b/drivers/hwmon/corsair-cpro.c > index 591929ec217a..fa

Re: [RFC] drivers/hwmon: Corsair Commander Pro driver

2020-06-10 Thread Marius Zachmann
On 10.06.20 at 06:01:45 CEST, Guenter Roeck wrote: > On Wed, Jun 10, 2020 at 12:26:40AM +0200, Marius Zachmann wrote: > > This is a driver for the Corsair Commander Pro. > > Since this is my first addition to the kernel I would be happy, if you > > would take a look at it

[PATCH v6] hwmon: add Corsair Commander Pro driver

2020-06-25 Thread Marius Zachmann
. Signed-off-by: Marius Zachmann --- Changes from v5 - added bitmaps for temp_cnct and fan_cnct - ccp_visible returns 0 when there is no connection and removed tests for connection in other functions - removed temp labels - add define for fan and temp sensor count - removed unneccesary mutex from

[PATCH v7] hwmon: add Corsair Commander Pro driver

2020-06-25 Thread Marius Zachmann
: Marius Zachmann --- Changes from v6 - used break after connection checks in ccp_is_visible Changes from v5 - added bitmaps for temp_cnct and fan_cnct - ccp_visible returns 0 when there is no connection and removed tests for connection in other functions - removed temp labels - add define for fan and

Re: [PATCH v7] hwmon: add Corsair Commander Pro driver

2020-06-26 Thread Marius Zachmann
On 26.06.20 at 15:21:35 CEST, Guenter Roeck wrote > On Fri, Jun 26, 2020 at 07:59:36AM +0200, Marius Zachmann wrote: > > This is v7 of a driver for the Corsair Commander Pro. > > Note to self: Reword when applying. > > > It provides sysfs attributes for: > > - R

[RFC v2] hwmon: add Corsair Commander Pro driver

2020-06-12 Thread Marius Zachmann
-quirks.c Signed-off-by: Marius Zachmann --- Changes from v1: - Style issues - Changed to USB driver - Clarify reading pwm in Documentation and code - Fixed attribute name number in Documentation - MODULE_LICENSE now "GPL" - Removed unneccesary hwmondev in ccp_device - Moved buffer to

Re: [RFC v2] hwmon: add Corsair Commander Pro driver

2020-06-15 Thread Marius Zachmann
On 15.06.20 at 00:25:55 CEST, Guenter Roeck wrote > On 6/12/20 6:29 AM, Marius Zachmann wrote: > > This is a driver for the Corsair Commander Pro. > > It provides sysfs attributes for: > > - Reading fan speed > > - Reading temp sensors > > - Reading voltage val

[PATCH] hwmon: corsair-cpro: Change to hid driver

2020-07-14 Thread Marius Zachmann
I found a project which uses hidraw to communicate with the device. Because I do not want to break any existing userspace code, I changed this to a hid driver, so hidraw can still be used. Do I need to include the hid maintainers for the undo in hid-quirks? Signed-off-by: Marius Zachmann

[PATCH] hwmon: corsair-cpro: fix ccp_probe, add delay

2020-08-16 Thread Marius Zachmann
so that all initial input reports can be received. Signed-off-by: Marius Zachmann --- drivers/hwmon/corsair-cpro.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/corsair-cpro.c b/drivers/hwmon/corsair-cpro.c index 591929ec217a..6359409e6c71 100644 --- a

[PATCH v2] hwmon: corsair-cpro: fix ccp_probe, add delay

2020-08-17 Thread Marius Zachmann
so that all initial input reports can be received. Signed-off-by: Marius Zachmann --- v2: - fix accidentally deleted comment --- drivers/hwmon/corsair-cpro.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hwmon/corsair-cpro.c b/drivers/hwmon/corsair-cpro.c index 591929ec217a

[PATCH] hwmon: corsair-cpro: add fan_target

2020-07-09 Thread Marius Zachmann
command. Signed-off-by: Marius Zachmann --- Documentation/hwmon/corsair-cpro.rst | 3 ++ drivers/hwmon/corsair-cpro.c | 62 ++-- 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/Documentation/hwmon/corsair-cpro.rst b/Documentation/hwmon/corsair

[PATCH v2] hwmon: corsair-cpro: add fan_target

2020-07-09 Thread Marius Zachmann
This adds fan_target entries to the corsair-cpro driver. Reading the attribute from the device does not seem possible, so it returns the last set value. (same as pwm) send_usb_cmd now has one more argument, which is needed for the fan_target command. Signed-off-by: Marius Zachmann --- Change

[PATCH] hwmon: corsair-cpro: add reading pwm values

2020-07-21 Thread Marius Zachmann
documentation - fix missing surname in MAINTAINERS Signed-off-by: Marius Zachmann --- Documentation/hwmon/corsair-cpro.rst | 7 ++- MAINTAINERS | 2 +- drivers/hwmon/corsair-cpro.c | 64 +++- 3 files changed, 48 insertions(+), 25 deletions

Re: [PATCH] hwmon: corsair-cpro: Change to hid driver

2020-07-15 Thread Marius Zachmann
On 15.07.20 at 04:36:22 CEST, Guenter Roeck wrote > On Tue, Jul 14, 2020 at 12:52:30PM +0200, Marius Zachmann wrote: > > I found a project which uses hidraw to communicate with the device. > > Because I do not want to break any existing userspace code, I > > changed this to a

[PATCH v2] hwmon: corsair-cpro: Change to HID driver

2020-07-15 Thread Marius Zachmann
This changes corsair-cpro to a hid driver using hid reports. Signed-off-by: Marius Zachmann --- Changes from v1 - add comment at the beginning about using hid and hidraw - use hwmon_device_register_with_info and hwmon_device_unregister - use a define for timeout --- drivers/hid/hid-quirks.c

Re: [PATCH v2] hwmon: corsair-cpro: Change to HID driver

2020-07-15 Thread Marius Zachmann
On 15.07.20 at 17:35:08 CEST, Guenter Roeck wrote > On 7/15/20 8:14 AM, Marius Zachmann wrote: > > This changes corsair-cpro to a hid driver using hid reports. > > > > Signed-off-by: Marius Zachmann > > > > --- > ... > > -module_usb_driver(ccp_dri

Re: [PATCH v2] hwmon: corsair-cpro: Change to HID driver

2020-07-15 Thread Marius Zachmann
On 15.07.20 at 21:49:59 CEST, Guenter Roeck wrote > On 7/15/20 12:12 PM, Marius Zachmann wrote: > > On 15.07.20 at 17:35:08 CEST, Guenter Roeck wrote > >> On 7/15/20 8:14 AM, Marius Zachmann wrote: > >>> This changes corsair-cpro to a hid driver using hid reports. >

Re: [PATCH v2] hwmon: corsair-cpro: Change to HID driver

2020-07-15 Thread Marius Zachmann
On 15.07.20 at 22:11:39 CEST, Guenter Roeck wrote > On 7/15/20 12:55 PM, Marius Zachmann wrote: > > On 15.07.20 at 21:49:59 CEST, Guenter Roeck wrote > >> On 7/15/20 12:12 PM, Marius Zachmann wrote: > >>> On 15.07.20 at 17:35:08 CEST, Guenter Roeck wrote > >>

[PATCH v3] hwmon: corsair-cpro: Change to HID driver

2020-07-15 Thread Marius Zachmann
This changes corsair-cpro to a hid driver using hid reports. Signed-off-by: Marius Zachmann --- Changes from v2 - add more explanatory comment to justify late_initcall Changes from v1 - add comment at the beginning about using hid and hidraw - use hwmon_device_register_with_info and

[RFC v3] hwmon: add Corsair Commander Pro driver

2020-06-17 Thread Marius Zachmann
, but for now I don't want to spam another mailing list. Signed-off-by: Marius Zachmann --- Changes from v2 - add corsair-cpro to Documentation/hwmon/index.rst - add SPDX license identifier to corsair-cpro.rst - remove fanX_enable from Documentation and driver - changed comment style - clar

[RFC] drivers/hwmon: Corsair Commander Pro driver

2020-06-09 Thread Marius Zachmann
doesn't detect the fans correctly) * Setting fixed RPM I do not work for Corsair and I intend to keep the driver maintainted as long as I use the device privately. Signed-off-by: Marius Zachmann --- Documentation/hwmon/corsair-cpro.rst | 42 +++ MAINTAINERS

[PATCH v4 2/3] hwmon: add Documentation

2020-06-24 Thread Marius Zachmann
Signed-off-by: Marius Zachmann --- Documentation/hwmon/corsair-cpro.rst | 40 Documentation/hwmon/index.rst| 1 + 2 files changed, 41 insertions(+) create mode 100644 Documentation/hwmon/corsair-cpro.rst diff --git a/Documentation/hwmon/corsair-cpro.rst b

[PATCH v4 3/3] hwmon: add driver

2020-06-24 Thread Marius Zachmann
Signed-off-by: Marius Zachmann --- MAINTAINERS | 6 + drivers/hwmon/Kconfig| 10 + drivers/hwmon/Makefile | 1 + drivers/hwmon/corsair-cpro.c | 489 +++ 4 files changed, 506 insertions(+) create mode 100644 drivers/hwmon

[PATCH v4 0/3] hwmon: Add Corsair Commander Pro driver

2020-06-24 Thread Marius Zachmann
. (patch 3/3) This is based on the staging/hwmon tree. Signed-off-by: Marius Zachmann --- Changes from v3 - add device ids to hid_ignore_list in hid-quirks.h - removed unused update_interval - ccp_disconnect is static Changes from v2 - add corsair-cpro to Documentation/hwmon/index.rst - add SPDX

[PATCH v4 1/3] input: add to hid_ignore_list

2020-06-24 Thread Marius Zachmann
Signed-off-by: Marius Zachmann --- drivers/hid/hid-quirks.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c index ca8b5c261c7c..7b7bc7737c53 100644 --- a/drivers/hid/hid-quirks.c +++ b/drivers/hid/hid-quirks.c @@ -699,6 +699,8 @@ static

[PATCH v5] hwmon: add Corsair Commander Pro driver

2020-06-24 Thread Marius Zachmann
presets.) This is based on the staging/hwmon tree. Signed-off-by: Marius Zachmann --- Changes from v4 - squashed 3 commits into one. Changes from v3 - add device ids to hid_ignore_list in hid-quirks.h - removed unused update_interval - ccp_disconnect is static Changes from v2 - add corsair-cpro