lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 7 Oct 2012 09:16:40 +0200
From:	Jean Delvare <khali@...ux-fr.org>
To:	Stéphane Chatty <chatty@...c.fr>
Cc:	"benjamin.tissoires" <benjamin.tissoires@...il.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Jiri Kosina <jkosina@...e.cz>,
	Fabien André <fabien.andre@...il.com>,
	劉嘉駿 <scott.liu@....com.tw>,
	Ben Dooks <ben-linux@...ff.org>,
	Wolfram Sang <w.sang@...gutronix.de>,
	linux-i2c@...r.kernel.org, USB list <linux-input@...r.kernel.org>,
	linux-kernel@...r.kernel.org, Marcel Holtmann <marcel@...tmann.org>
Subject: Re: [PATCH v1] i2c-hid: introduce HID over i2c specification  
 implementation

On Sat, 6 Oct 2012 23:27:47 +0200, Stéphane Chatty wrote:
> Le 6 oct. 2012 à 23:11, Jean Delvare a écrit :
> > On Sat, 6 Oct 2012 22:30:00 +0200, Stéphane Chatty wrote:
> >> This is a question I asked a few months back, but apparently not all points of views had been expressed at the time. Currently, HID-over-USB lives in drivers/hid, but HID-over-BT lives in drivers/bluetooth. When I asked, Jiri explained that he maintained HID-over-USB and Marcel maintained HID-over-BT, which explained the choices made. Let's try to summarize what we know now:
> >> 
> >> The question is what drives the choice of where to put HID-over-XXX, among the following
> >> 1- who the maintainer is. Here, Benjamin will probably maintain this so it does not help.
> >> 2- dependencies. HID-over-XXX depends on HID as much as it depends on XXX, so it does not help.
> >> 3- data flow. Indeed, HID is a client of HID-over-XXX which is a client of XXX. Are there other parts of the kernel where this drives the choice of where YYY-over-XXX lives?
> >> 
> >> Jiri, Marcel, Greg, others, any opinions?
> > 
> > My vote is a clear 3. It took me a few years to kick all users (as
> > opposed to implementers) of i2c from drivers/i2c and finding them a
> > proper home, I'm not going to accept new intruders. Grouping drivers
> > according to what they implement makes it a lot easier to share code
> > and ideas between related drivers. If you want to convince yourself,
> > just imagine the mess it would be if all drivers for PCI devices lived
> > under drivers/pci.
> 
> 
> Having no strong opinion myself, I'm trying to get to the bottom of this :-) Here, I see two points that need clarification:
> 
> - I'm under the impression that the situation is exactly opposite between i2c and USB: drivers/usb contains lots of drivers for specific devices, but HID-over-USB is in drivers/hid. I actually found this disturbing when reading the HID code for the first time. Mmmm.

Indeed I see a lot of drivers under drivers/usb. I'm glad I am not
responsible for this subsystem ;) I think drivers/pci is a much cleaner
example to follow. If nothing else, grouping drivers by functionality
solves the problem of devices which can be accessed through multiple
transport layers. For devices with multiple functions, we have
drivers/mfd, specifically designed to make it possible to put support
for each function into its dedicated location.

> - given your explanation, I'd say that you would agree to 2 as well, if it meant for instance that HID-over-I2C is neither in drivers/hid nor drivers/i2c. Actually, you don't care whether it is 1, 2, or 3 that drives the choice as long as HID-over-I2C is not in drivers/i2c, do you? :-)

I do care that things are as consistent and logical as possible. I know
sometimes there are borderline cases, or things done a certain way for
historical reasons, but grouping by functionality seems the more
logical and efficient as a rule of thumb.

-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ