Skip to contentSkip to conversation

i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers.

PATCH Will Wagner 1 participant 1 message Sep 24, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20130924181804.1f76e012@skate

#1 lore raw

Sorry, I managed to drop mailing list from recipient list. Forwarding to list.

-------- Original Message --------
Subject: Re: [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers.
Date: Tue, 24 Sep 2013 18:18:04 +0200
From: Thomas Petazzoni <[email protected]>
Organisation: Free Electrons
To: Will Wagner <[email protected]>

Dear Will Wagner,

Quoted 11 lines · Will Wagner
Quoted 8 lines · Thomas Petazzoni
Quoted 3 lines
(quoted diff) +2 -0
+define I2C_TOOLS_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m644 $(@D)/include/linux/i2c-dev.h

$(STAGING_DIR)/usr/include/linux/ +endef

This header is already part of the kernel headers, so it should already be part of the toolchain. Do you have a specific case where this header is missing?

Quoted 7 lines

The contents of the header are different, the one from i2c-tools contains more.

We also carry a patch similar to this. Our patch has an addition which is a dependency on linux (assuming it is selected in the config). This ensures that the header from the kernel gets over ridden by the one from i2c-tools and not the other way around.

Ah, ok, makes sense. Well, I believe it's really a poor practice from upstream to have an header with the same location provided by two separate packages. i2c-tools should really be providing another header, which includes the kernel one, and adds more stuff.

But, well, this it's not the case, let's support this. Jouko, can you resend your patch after adding something like:

# make sure we're built after linux so that we can override the kernel
# i2c-dev.h header file
I2C_TOOLS_DEPENDENCIES += $(if $(BR2_PACKAGE_LINUX),linux)

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com