[PATCH v3 6/8] kernel: package bcm53xx i2c module

Christian Lamparter chunkeey at gmail.com
Sat Sep 19 09:41:30 EDT 2020


On 2020-09-15 13:47, Daniel Golle wrote:
> On Tue, Sep 15, 2020 at 01:28:23PM +0200, Adrian Schmutzler wrote:
>> Hi,
>>
>>> -----Original Message-----
>>> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
>>> On Behalf Of Christian Lamparter
>>> Sent: Samstag, 12. September 2020 23:16
>>> To: openwrt-devel at lists.openwrt.org
>>> Cc: rafal at milecki.pl; hauke at hauke-m.de; f.fainelli at gmail.com;
>>> chrisrblake93 at gmail.com; Adrian Schmutzler <mail at adrianschmutzler.de>
>>> Subject: [PATCH v3 6/8] kernel: package bcm53xx i2c module
>>>
>>> The BCM5301x SoCs do have i2c. Since this is only being used by the Meraki
>>> MR32, this will be packaged as a module.
>>>
>>> Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
>>> ---
>>>   package/kernel/linux/modules/i2c.mk | 14 ++++++++++++++
>>>   1 file changed, 14 insertions(+)
>>>
>>> diff --git a/package/kernel/linux/modules/i2c.mk
>>> b/package/kernel/linux/modules/i2c.mk
>>> index ca6463c81b..1c8b1b844e 100644
>>> --- a/package/kernel/linux/modules/i2c.mk
>>> +++ b/package/kernel/linux/modules/i2c.mk
>>> @@ -259,3 +259,17 @@ endef
>>>   $(eval $(call KernelPackage,i2c-tiny-usb))
>>>
>>>
>>> +I2C_BCM_IPROC_MODULES:= \
>>> +  CONFIG_I2C_BCM_IPROC:drivers/i2c/busses/i2c-bcm-iproc
>>> +
>>> +define KernelPackage/i2c-bcm-iproc
>>> +  $(call i2c_defaults,$(I2C_BCM_IPROC_MODULES),59)
>>> +  TITLE:=Broadcom iProc I2C controller
>>> +  DEPENDS:=@TARGET_bcm53xx +kmod-i2c-core endef
>>
>> More a question than a remark:
>>
>> I always wonder whether stuff like this (depending on a single target) belongs into package/kernel/linux/modules/... or into target/linux/bcm53xx/modules.mk
>>
>> Is there a general rule or is this mostly depending on circumstances/taste?
> 
> I'd say in a case like that (DEPENDS:=@TARGET_bcm53xx) it should go to
> target/linux/bcm53xx/modules.mk. However, another idea of that can be
> to list in-tree modules in package/kernel/linux/modules/... and target-
> specific out-of-tree modules in target/linux/*/modules.mk.
> I don't think we got a clear policy regarding that.

The bcm-iproc-i2c is also used by the arm64 stingray and northstar2
chips of broadcom's 802.11ax platform. That said, there isn't any
target for it so I might as well put the it into
target/linux/bcm53xx/modules.mk.

Cheers
Christian



More information about the openwrt-devel mailing list