Re: [PATCH 0/2] hid: corsair: Driver simplification and new supported device

From: Jiri Kosina
Date: Thu Mar 24 2016 - 10:42:41 EST


On Thu, 24 Mar 2016, Benjamin Tissoires wrote:

> I would say you can not do this this way. Even if you believe you are the
> only user of the API, there might be someone who uses it, and you will end
> up breaking his keyboard.
>
> Jiri will correct me, but the proper way to follow is to mark the API as
> deprecated, make sure your driver uses the deprecated API only for the
> K40, and then add the K90 in the driver, without implementing the API.
>
> After a few months (years?) with your API marked as deprecated, you then
> will be able to remove it. This is one of the many reasons we wrote
> libratbag in pure user-space, to avoid having to maintain complex API in
> the kernel forever.

You are right that this is the right way to deprecate the API.

Fortunately this one is "officially" marked as testing, so we might be a
little bit more relaxed, but still we'd really need to take care not to
break users left and right.

That's why I first asked whether also the remapping shouldn't be moved to
userspace, to make sure that we eventuall start the depreciation of as
many features as possible at the same time.

Thanks,

--
Jiri Kosina
SUSE Labs