[Sync] kernel: remove obsolete kernel version switches for 4.x

This commit is contained in:
AmadeusGhost 2020-10-31 12:15:09 +08:00
parent 8ab5e878fb
commit cc22e33367
37 changed files with 57 additions and 1218 deletions

View File

@ -44,15 +44,8 @@ config KERNEL_DEBUG_FS
write to these files. Many common debugging facilities, such as
ftrace, require the existence of debugfs.
# remove KERNEL_MIPS_FPU_EMULATOR after kernel 4.14 and 4.14 are gone
config KERNEL_MIPS_FPU_EMULATOR
bool "Compile the kernel with MIPS FPU Emulator"
default y if TARGET_pistachio
depends on (mips || mipsel || mips64 || mips64el)
config KERNEL_MIPS_FP_SUPPORT
bool
default y if KERNEL_MIPS_FPU_EMULATOR
config KERNEL_ARM_PMU
bool

View File

@ -162,18 +162,12 @@ DTC_FLAGS += \
-Wno-unit_address_format \
-Wno-pci_bridge \
-Wno-pci_device_bus_num \
-Wno-pci_device_reg
ifeq ($(strip $(call kernel_patchver_ge,4.17.0)),1)
DTC_FLAGS += \
-Wno-avoid_unnecessary_addr_size \
-Wno-alias_paths
endif
ifeq ($(strip $(call kernel_patchver_ge,4.18.0)),1)
DTC_FLAGS += \
-Wno-graph_child_address \
-Wno-graph_port \
-Wno-unique_unit_address
endif
-Wno-pci_device_reg \
-Wno-avoid_unnecessary_addr_size \
-Wno-alias_paths \
-Wno-graph_child_address \
-Wno-graph_port \
-Wno-unique_unit_address
define Image/pad-to
dd if=$(1) of=$(1).new bs=$(2) conv=sync

View File

@ -1,47 +0,0 @@
#
# Copyright (C) 2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=i2c-gpio-custom
PKG_RELEASE:=2
include $(INCLUDE_DIR)/package.mk
define KernelPackage/i2c-gpio-custom
SUBMENU:=I2C support
TITLE:=Custom GPIO-based I2C device
DEPENDS:=@GPIO_SUPPORT +kmod-i2c-core +kmod-i2c-gpio @LINUX_4_14
FILES:=$(PKG_BUILD_DIR)/i2c-gpio-custom.ko
KCONFIG:=
endef
define KernelPackage/i2c-gpio-custom/description
Kernel module for register a custom i2c-gpio platform device.
endef
EXTRA_KCONFIG:= \
CONFIG_I2C_GPIO_CUSTOM=m
EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \
$(KERNEL_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
modules
endef
$(eval $(call KernelPackage,i2c-gpio-custom))

View File

@ -1,10 +0,0 @@
config I2C_GPIO_CUSTOM
tristate "Custom GPIO-based I2C driver"
depends on GENERIC_GPIO
select I2C_GPIO
help
This is an I2C driver to register 1 to 4 custom I2C buses using
GPIO lines.
This support is also available as a module. If so, the module
will be called i2c-gpio-custom.

View File

@ -1 +0,0 @@
obj-${CONFIG_I2C_GPIO_CUSTOM} += i2c-gpio-custom.o

View File

@ -1,207 +0,0 @@
/*
* Custom GPIO-based I2C driver
*
* Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* ---------------------------------------------------------------------------
*
* The behaviour of this driver can be altered by setting some parameters
* from the insmod command line.
*
* The following parameters are adjustable:
*
* bus0 These four arguments can be arrays of
* bus1 1-8 unsigned integers as follows:
* bus2
* bus3 <id>,<sda>,<scl>,<udelay>,<timeout>,<sda_od>,<scl_od>,<scl_oo>
*
* where:
*
* <id> ID to used as device_id for the corresponding bus (required)
* <sda> GPIO pin ID to used for SDA (required)
* <scl> GPIO pin ID to used for SCL (required)
* <udelay> signal toggle delay.
* <timeout> clock stretching timeout.
* <sda_od> SDA is configured as open drain.
* <scl_od> SCL is configured as open drain.
* <scl_oo> SCL output drivers cannot be turned off.
*
* See include/i2c-gpio.h for more information about the parameters.
*
* If this driver is built into the kernel, you can use the following kernel
* command line parameters, with the same values as the corresponding module
* parameters listed above:
*
* i2c-gpio-custom.bus0
* i2c-gpio-custom.bus1
* i2c-gpio-custom.bus2
* i2c-gpio-custom.bus3
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0)
#include <linux/i2c-gpio.h>
#else
#include <linux/platform_data/i2c-gpio.h>
#endif
#define DRV_NAME "i2c-gpio-custom"
#define DRV_DESC "Custom GPIO-based I2C driver"
#define DRV_VERSION "0.1.1"
#define PFX DRV_NAME ": "
#define BUS_PARAM_ID 0
#define BUS_PARAM_SDA 1
#define BUS_PARAM_SCL 2
#define BUS_PARAM_UDELAY 3
#define BUS_PARAM_TIMEOUT 4
#define BUS_PARAM_SDA_OD 5
#define BUS_PARAM_SCL_OD 6
#define BUS_PARAM_SCL_OO 7
#define BUS_PARAM_REQUIRED 3
#define BUS_PARAM_COUNT 8
#define BUS_COUNT_MAX 4
static unsigned int bus0[BUS_PARAM_COUNT] __initdata;
static unsigned int bus1[BUS_PARAM_COUNT] __initdata;
static unsigned int bus2[BUS_PARAM_COUNT] __initdata;
static unsigned int bus3[BUS_PARAM_COUNT] __initdata;
static unsigned int bus_nump[BUS_COUNT_MAX] __initdata;
#define BUS_PARM_DESC \
" config -> id,sda,scl[,udelay,timeout,sda_od,scl_od,scl_oo]"
module_param_array(bus0, uint, &bus_nump[0], 0);
MODULE_PARM_DESC(bus0, "bus0" BUS_PARM_DESC);
module_param_array(bus1, uint, &bus_nump[1], 0);
MODULE_PARM_DESC(bus1, "bus1" BUS_PARM_DESC);
module_param_array(bus2, uint, &bus_nump[2], 0);
MODULE_PARM_DESC(bus2, "bus2" BUS_PARM_DESC);
module_param_array(bus3, uint, &bus_nump[3], 0);
MODULE_PARM_DESC(bus3, "bus3" BUS_PARM_DESC);
static struct platform_device *devices[BUS_COUNT_MAX];
static unsigned int nr_devices;
static void i2c_gpio_custom_cleanup(void)
{
int i;
for (i = 0; i < nr_devices; i++)
if (devices[i])
platform_device_put(devices[i]);
}
static int __init i2c_gpio_custom_add_one(unsigned int id, unsigned int *params)
{
struct platform_device *pdev;
struct i2c_gpio_platform_data pdata;
int err;
if (!bus_nump[id])
return 0;
if (bus_nump[id] < BUS_PARAM_REQUIRED) {
printk(KERN_ERR PFX "not enough parameters for bus%d\n", id);
err = -EINVAL;
goto err;
}
pdev = platform_device_alloc("i2c-gpio", params[BUS_PARAM_ID]);
if (!pdev) {
err = -ENOMEM;
goto err;
}
pdata.sda_pin = params[BUS_PARAM_SDA];
pdata.scl_pin = params[BUS_PARAM_SCL];
pdata.udelay = params[BUS_PARAM_UDELAY];
pdata.timeout = params[BUS_PARAM_TIMEOUT];
pdata.sda_is_open_drain = params[BUS_PARAM_SDA_OD] != 0;
pdata.scl_is_open_drain = params[BUS_PARAM_SCL_OD] != 0;
pdata.scl_is_output_only = params[BUS_PARAM_SCL_OO] != 0;
err = platform_device_add_data(pdev, &pdata, sizeof(pdata));
if (err)
goto err_put;
err = platform_device_add(pdev);
if (err)
goto err_put;
devices[nr_devices++] = pdev;
return 0;
err_put:
platform_device_put(pdev);
err:
return err;
}
static int __init i2c_gpio_custom_probe(void)
{
int err;
printk(KERN_INFO DRV_DESC " version " DRV_VERSION "\n");
err = i2c_gpio_custom_add_one(0, bus0);
if (err)
goto err;
err = i2c_gpio_custom_add_one(1, bus1);
if (err)
goto err;
err = i2c_gpio_custom_add_one(2, bus2);
if (err)
goto err;
err = i2c_gpio_custom_add_one(3, bus3);
if (err)
goto err;
if (!nr_devices) {
printk(KERN_ERR PFX "no bus parameter(s) specified\n");
err = -ENODEV;
goto err;
}
return 0;
err:
i2c_gpio_custom_cleanup();
return err;
}
#ifdef MODULE
static int __init i2c_gpio_custom_init(void)
{
return i2c_gpio_custom_probe();
}
module_init(i2c_gpio_custom_init);
static void __exit i2c_gpio_custom_exit(void)
{
i2c_gpio_custom_cleanup();
}
module_exit(i2c_gpio_custom_exit);
#else
subsys_initcall(i2c_gpio_custom_probe);
#endif /* MODULE*/
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org >");
MODULE_DESCRIPTION(DRV_DESC);
MODULE_VERSION(DRV_VERSION);

View File

@ -1,54 +0,0 @@
#
# Copyright (C) 2016 LEDE
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=sched-cake-oot
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/dtaht/sch_cake.git
PKG_SOURCE_DATE:=2020-07-24
PKG_SOURCE_VERSION:=48979385757f3408c3427b3ebbf5963efdada5aa
PKG_MIRROR_HASH:=0e8ed53f55e28ad0c30f20293c16988876bae8d6f70f5629a43cf2ce1e49fc51
PKG_MAINTAINER:=Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
include $(INCLUDE_DIR)/package.mk
define KernelPackage/sched-cake-oot
SUBMENU:=Network Support
TITLE:=OOT Cake fq_codel/blue derived shaper
URL:=https://github.com/dtaht/sch_cake
FILES:=$(PKG_BUILD_DIR)/sch_cake.ko
AUTOLOAD:=$(call AutoLoad,75,sch_cake)
DEPENDS:=@LINUX_4_14 +kmod-sched-core +kmod-ipt-conntrack
endef
define KernelPackage/sched-cake-oot/description
O(ut) O(f) T(ree) Common Applications Kept Enhanced fq_codel/blue derived shaper
endef
define KernelPackage/sched-cake-virtual
SUBMENU:=Network Support
TITLE:=Virtual package for sched-cake
URL:=https://github.com/dtaht/sch_cake
DEPENDS:=+!LINUX_4_14:kmod-sched-cake +LINUX_4_14:kmod-sched-cake-oot
endef
define KernelPackage/sched-cake-virtual/description
Virtual package for resolving sch_cake dependencies
endef
include $(INCLUDE_DIR)/kernel-defaults.mk
define Build/Compile
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" modules
endef
$(eval $(call KernelPackage,sched-cake-oot))
$(eval $(call KernelPackage,sched-cake-virtual))

View File

@ -111,11 +111,7 @@ static inline long
ugly_hack_sleep_on_timeout(wait_queue_head_t *q, long timeout)
{
unsigned long flags;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
wait_queue_entry_t wait;
#else
wait_queue_t wait;
#endif
init_waitqueue_entry(&wait, current);

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ltq-atm
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=GPL-2.0+

View File

@ -60,7 +60,6 @@
static inline void vr9_reset_ppe(struct platform_device *pdev)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
struct device *dev = &pdev->dev;
struct reset_control *dsp;
struct reset_control *dfe;
@ -97,7 +96,6 @@ static inline void vr9_reset_ppe(struct platform_device *pdev)
udelay(1000);
*PP32_SRST |= 0x000303CF;
udelay(1000);
#endif
}
static inline int vr9_pp32_download_code(int pp32, u32 *code_src, unsigned int code_dword_len, u32 *data_src, unsigned int data_dword_len)

View File

@ -289,17 +289,9 @@ static int ppe_ioctl(struct atm_dev *dev, unsigned int cmd, void *arg)
return -ENOTTY;
if ( _IOC_DIR(cmd) & _IOC_READ )
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)
ret = !access_ok(arg, _IOC_SIZE(cmd));
#else
ret = !access_ok(VERIFY_WRITE, arg, _IOC_SIZE(cmd));
#endif
else if ( _IOC_DIR(cmd) & _IOC_WRITE )
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)
ret = !access_ok(arg, _IOC_SIZE(cmd));
#else
ret = !access_ok(VERIFY_READ, arg, _IOC_SIZE(cmd));
#endif
if ( ret )
return -EFAULT;

View File

@ -54,11 +54,7 @@ typedef struct ifx_deu_device {
int recv_count;
int packet_size;
int packet_num;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
wait_queue_entry_t wait;
#else
wait_queue_t wait;
#endif
} _ifx_deu_device;
extern _ifx_deu_device ifx_deu[1];

View File

@ -126,9 +126,6 @@ static int ptm_stop(struct net_device *);
static unsigned int ptm_poll(int, unsigned int);
static int ptm_napi_poll(struct napi_struct *, int);
static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0))
static int ptm_change_mtu(struct net_device *, int);
#endif
static int ptm_ioctl(struct net_device *, struct ifreq *, int);
static void ptm_tx_timeout(struct net_device *);
@ -246,9 +243,6 @@ static struct net_device_ops g_ptm_netdev_ops = {
.ndo_start_xmit = ptm_hard_start_xmit,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0))
.ndo_change_mtu = ptm_change_mtu,
#endif
.ndo_do_ioctl = ptm_ioctl,
.ndo_tx_timeout = ptm_tx_timeout,
};
@ -285,10 +279,8 @@ static void ptm_setup(struct net_device *dev, int ndev)
/* hook network operations */
dev->netdev_ops = &g_ptm_netdev_ops;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
/* Allow up to 1508 bytes, for RFC4638 */
dev->max_mtu = ETH_DATA_LEN + 8;
#endif
netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 25);
dev->watchdog_timeo = ETH_WATCHDOG_TIMEOUT;
@ -455,16 +447,6 @@ PTM_HARD_START_XMIT_FAIL:
g_ptm_priv_data.itf[ndev].stats.tx_dropped++;
return NETDEV_TX_OK;
}
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0))
static int ptm_change_mtu(struct net_device *dev, int mtu)
{
/* Allow up to 1508 bytes, for RFC4638 */
if (mtu < 68 || mtu > ETH_DATA_LEN + 8)
return -EINVAL;
dev->mtu = mtu;
return 0;
}
#endif
static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
@ -651,10 +633,6 @@ static INLINE int mailbox_rx_irq_handler(unsigned int ch) // return: < 0 - de
skb->dev = g_net_dev[ndev];
skb->protocol = eth_type_trans(skb, skb->dev);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0))
g_net_dev[ndev]->last_rx = jiffies;
#endif
netif_rx_ret = netif_receive_skb(skb);
if ( netif_rx_ret != NET_RX_DROP ) {

View File

@ -76,9 +76,6 @@ static int ptm_stop(struct net_device *);
static unsigned int ptm_poll(int, unsigned int);
static int ptm_napi_poll(struct napi_struct *, int);
static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0))
static int ptm_change_mtu(struct net_device *, int);
#endif
static int ptm_ioctl(struct net_device *, struct ifreq *, int);
static void ptm_tx_timeout(struct net_device *);
@ -119,9 +116,6 @@ static struct net_device_ops g_ptm_netdev_ops = {
.ndo_start_xmit = ptm_hard_start_xmit,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0))
.ndo_change_mtu = ptm_change_mtu,
#endif
.ndo_do_ioctl = ptm_ioctl,
.ndo_tx_timeout = ptm_tx_timeout,
};
@ -147,10 +141,8 @@ static void ptm_setup(struct net_device *dev, int ndev)
netif_carrier_off(dev);
dev->netdev_ops = &g_ptm_netdev_ops;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
/* Allow up to 1508 bytes, for RFC4638 */
dev->max_mtu = ETH_DATA_LEN + 8;
#endif
netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 16);
dev->watchdog_timeo = ETH_WATCHDOG_TIMEOUT;
@ -228,10 +220,6 @@ static unsigned int ptm_poll(int ndev, unsigned int work_to_do)
skb->dev = g_net_dev[0];
skb->protocol = eth_type_trans(skb, skb->dev);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0))
g_net_dev[0]->last_rx = jiffies;
#endif
netif_receive_skb(skb);
g_ptm_priv_data.itf[0].stats.rx_packets++;
@ -374,17 +362,6 @@ PTM_HARD_START_XMIT_FAIL:
return 0;
}
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0))
static int ptm_change_mtu(struct net_device *dev, int mtu)
{
/* Allow up to 1508 bytes, for RFC4638 */
if (mtu < 68 || mtu > ETH_DATA_LEN + 8)
return -EINVAL;
dev->mtu = mtu;
return 0;
}
#endif
static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
ASSERT(dev == g_net_dev[0], "incorrect device");

View File

@ -84,7 +84,6 @@ static inline void uninit_pmu(void)
static inline void reset_ppe(struct platform_device *pdev)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
struct device *dev = &pdev->dev;
struct reset_control *dsp;
struct reset_control *dfe;
@ -121,7 +120,6 @@ static inline void reset_ppe(struct platform_device *pdev)
udelay(1000);
*PP32_SRST |= 0x000303CF;
udelay(1000);
#endif
}
static inline void init_pdma(void)

View File

@ -25,7 +25,7 @@ MD5_DSL="655442e31deaa42c9c68944869361ec0"
[ $? -eq 0 -a -f "${FW}" ] || exit 1
}
F=`md5sum -b ${FW} | cut -d" " -f1`
F=$(md5sum -b ${FW} | cut -d" " -f1)
[ "$F" = "${MD5_FW}" ] || {
echo "Failed to verify Firmware MD5"
exit 1
@ -37,8 +37,8 @@ echo "Unpack and decompress w921v Firmware"
w921v_fw_cutter
[ $? -eq 0 ] || exit 1
T=`md5sum -b ${FW_TAPI} | cut -d" " -f1`
D=`md5sum -b ${FW_DSL} | cut -d" " -f1`
T=$(md5sum -b ${FW_TAPI} | cut -d" " -f1)
D=$(md5sum -b ${FW_DSL} | cut -d" " -f1)
[ "$T" = "${MD5_TAPI}" -a "$D" = "${MD5_DSL}" ] || {
echo "Failed to verify MD5"

View File

@ -248,8 +248,7 @@ define KernelPackage/can-usb-kvaser
TITLE:=Kvaser CAN/USB interface
KCONFIG:=CONFIG_CAN_KVASER_USB
FILES:= \
$(LINUX_DIR)/drivers/net/can/usb/kvaser_usb.ko@lt4.19 \
$(LINUX_DIR)/drivers/net/can/usb/kvaser_usb/kvaser_usb.ko@ge4.19
$(LINUX_DIR)/drivers/net/can/usb/kvaser_usb/kvaser_usb.ko
AUTOLOAD:=$(call AutoProbe,kvaser_usb)
$(call AddDepends/can,+kmod-usb-core)
endef

View File

@ -132,7 +132,7 @@ $(eval $(call KernelPackage,crypto-crc32c))
define KernelPackage/crypto-ctr
TITLE:=Counter Mode CryptoAPI module
DEPENDS:=+kmod-crypto-manager +kmod-crypto-seqiv +kmod-crypto-iv
DEPENDS:=+kmod-crypto-manager +kmod-crypto-seqiv
KCONFIG:=CONFIG_CRYPTO_CTR
FILES:=$(LINUX_DIR)/crypto/ctr.ko
AUTOLOAD:=$(call AutoLoad,09,ctr)
@ -171,7 +171,7 @@ define KernelPackage/crypto-des
KCONFIG:=CONFIG_CRYPTO_DES
FILES:= \
$(LINUX_DIR)/crypto/des_generic.ko \
$(LINUX_DIR)/lib/crypto/libdes.ko@ge5.4
$(LINUX_DIR)/lib/crypto/libdes.ko
AUTOLOAD:=$(call AutoLoad,09,des_generic)
$(call AddDepends/crypto)
endef
@ -197,7 +197,7 @@ define KernelPackage/crypto-ecdh
KCONFIG:= CONFIG_CRYPTO_ECDH
FILES:= \
$(LINUX_DIR)/crypto/ecdh_generic.ko \
$(LINUX_DIR)/crypto/ecc.ko@ge5.2
$(LINUX_DIR)/crypto/ecc.ko
AUTOLOAD:=$(call AutoLoad,10,ecdh_generic)
$(call AddDepends/crypto)
endef
@ -377,7 +377,7 @@ $(eval $(call KernelPackage,crypto-hw-padlock))
define KernelPackage/crypto-hw-safexcel
TITLE:= MVEBU SafeXcel Crypto Engine module
DEPENDS:=@!LINUX_4_14 @(TARGET_mvebu_cortexa53||TARGET_mvebu_cortexa72) +eip197-mini-firmware \
DEPENDS:=@(TARGET_mvebu_cortexa53||TARGET_mvebu_cortexa72) +eip197-mini-firmware \
+kmod-crypto-authenc +kmod-crypto-md5 +kmod-crypto-hmac +kmod-crypto-sha256 +kmod-crypto-sha512
KCONFIG:= \
CONFIG_CRYPTO_HW=y \
@ -418,19 +418,6 @@ endef
$(eval $(call KernelPackage,crypto-hw-talitos))
define KernelPackage/crypto-iv
TITLE:=CryptoAPI initialization vectors
DEPENDS:=+kmod-crypto-manager +kmod-crypto-rng +kmod-crypto-wq
KCONFIG:= CONFIG_CRYPTO_BLKCIPHER2
HIDDEN:=1
FILES:= \
$(LINUX_DIR)/crypto/eseqiv.ko@lt4.9 \
$(LINUX_DIR)/crypto/chainiv.ko@lt4.9
AUTOLOAD:=$(call AutoLoad,10,eseqiv chainiv)
$(call AddDepends/crypto)
endef
$(eval $(call KernelPackage,crypto-iv))
define KernelPackage/crypto-kpp
TITLE:=Key-agreement Protocol Primitives
@ -562,10 +549,8 @@ ifndef CONFIG_TARGET_x86_64
$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko \
$(LINUX_DIR)/arch/x86/crypto/serpent-sse2-i586.ko \
$(LINUX_DIR)/arch/x86/crypto/glue_helper.ko \
$(LINUX_DIR)/crypto/ablk_helper.ko@lt4.17 \
$(LINUX_DIR)/crypto/cryptd.ko \
$(LINUX_DIR)/crypto/lrw.ko@lt4.17 \
$(LINUX_DIR)/crypto/crypto_simd.ko@ge4.17
$(LINUX_DIR)/crypto/crypto_simd.ko
AUTOLOAD+= $(call AutoLoad,10,cryptd glue_helper \
serpent-sse2-i586 twofish-i586 blowfish_generic)
endef
@ -584,8 +569,7 @@ define KernelPackage/crypto-misc/x86/64
$(LINUX_DIR)/arch/x86/crypto/twofish-avx-x86_64.ko \
$(LINUX_DIR)/arch/x86/crypto/serpent-avx-x86_64.ko \
$(LINUX_DIR)/arch/x86/crypto/camellia-aesni-avx2.ko \
$(LINUX_DIR)/arch/x86/crypto/serpent-avx2.ko \
$(LINUX_DIR)/crypto/ablk_helper.ko@lt4.17
$(LINUX_DIR)/arch/x86/crypto/serpent-avx2.ko
AUTOLOAD+= $(call AutoLoad,10,camellia-x86_64 \
camellia-aesni-avx-x86_64 camellia-aesni-avx2 cast5-avx-x86_64 \
cast6-avx-x86_64 twofish-x86_64 twofish-x86_64-3way \
@ -745,7 +729,7 @@ define KernelPackage/crypto-sha256
CONFIG_CRYPTO_SHA256_SSSE3
FILES:= \
$(LINUX_DIR)/crypto/sha256_generic.ko \
$(LINUX_DIR)/lib/crypto/libsha256.ko@ge5.4
$(LINUX_DIR)/lib/crypto/libsha256.ko
AUTOLOAD:=$(call AutoLoad,09,sha256_generic)
$(call AddDepends/crypto)
endef

View File

@ -53,8 +53,7 @@ define KernelPackage/fs-autofs4
CONFIG_AUTOFS4_FS \
CONFIG_AUTOFS_FS
FILES:= \
$(LINUX_DIR)/fs/autofs4/autofs4.ko@lt4.18 \
$(LINUX_DIR)/fs/autofs/autofs4.ko@ge4.18
$(LINUX_DIR)/fs/autofs/autofs4.ko
AUTOLOAD:=$(call AutoLoad,30,autofs4)
endef
@ -205,7 +204,7 @@ $(eval $(call KernelPackage,fs-ext4))
define KernelPackage/fs-f2fs
SUBMENU:=$(FS_MENU)
TITLE:=F2FS filesystem support
DEPENDS:= +kmod-crypto-hash +kmod-crypto-crc32 +LINUX_5_4:kmod-nls-base
DEPENDS:= +kmod-crypto-hash +kmod-crypto-crc32 +kmod-nls-base
KCONFIG:=CONFIG_F2FS_FS
FILES:=$(LINUX_DIR)/fs/f2fs/f2fs.ko
AUTOLOAD:=$(call AutoLoad,30,f2fs,1)

View File

@ -159,7 +159,7 @@ $(eval $(call KernelPackage,iio-dht11))
define KernelPackage/iio-bme680
SUBMENU:=$(IIO_MENU)
TITLE:=BME680 gas/humidity/pressure/temperature sensor
DEPENDS:=@!LINUX_4_14 +kmod-iio-core +kmod-regmap-core
DEPENDS:=+kmod-iio-core +kmod-regmap-core
KCONFIG:=CONFIG_BME680
FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_core.ko
endef
@ -414,7 +414,7 @@ $(eval $(call KernelPackage,iio-lsm6dsx-spi))
define KernelPackage/iio-sps30
SUBMENU:=$(IIO_MENU)
DEPENDS:=@!LINUX_4_14 +kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer +kmod-lib-crc8
DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer +kmod-lib-crc8
TITLE:=Sensirion SPS30 particulate matter sensor
KCONFIG:=CONFIG_SPS30
FILES:=$(LINUX_DIR)/drivers/iio/chemical/sps30.ko

View File

@ -182,7 +182,7 @@ define KernelPackage/input-touchscreen-ads7846
CONFIG_TOUCHSCREEN_PROPERTIES=y \
CONFIG_TOUCHSCREEN_ADS7846
FILES:=$(LINUX_DIR)/drivers/input/touchscreen/ads7846.ko \
$(LINUX_DIR)/drivers/input/touchscreen/of_touchscreen.ko@ge5.4
$(LINUX_DIR)/drivers/input/touchscreen/of_touchscreen.ko
AUTOLOAD:=$(call AutoProbe,ads7846)
endef

View File

@ -250,8 +250,7 @@ define KernelPackage/lib-cordic
SUBMENU:=$(LIB_MENU)
TITLE:=Cordic function support
KCONFIG:=CONFIG_CORDIC
FILES:=$(LINUX_DIR)/lib/cordic.ko@lt5.2 \
$(LINUX_DIR)/lib/math/cordic.ko@ge5.2
FILES:=$(LINUX_DIR)/lib/math/cordic.ko
AUTOLOAD:=$(call AutoProbe,cordic)
endef

View File

@ -111,7 +111,7 @@ $(eval $(call KernelPackage,libphy))
define KernelPackage/phylink
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Model for MAC to optional PHY connection
DEPENDS:=+LINUX_5_4:kmod-libphy
DEPENDS:=+kmod-libphy
KCONFIG:=CONFIG_PHYLINK
FILES:=$(LINUX_DIR)/drivers/net/phy/phylink.ko
AUTOLOAD:=$(call AutoLoad,15,phylink,1)
@ -142,7 +142,7 @@ $(eval $(call KernelPackage,mii))
define KernelPackage/mdio-gpio
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:= Supports GPIO lib-based MDIO busses
DEPENDS:=+kmod-libphy @GPIO_SUPPORT +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_samsung||TARGET_tegra):kmod-of-mdio
DEPENDS:=+kmod-libphy @GPIO_SUPPORT +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio
KCONFIG:= \
CONFIG_MDIO_BITBANG \
CONFIG_MDIO_GPIO
@ -337,7 +337,7 @@ $(eval $(call KernelPackage,switch-rtl8306))
define KernelPackage/switch-rtl8366-smi
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Realtek RTL8366 SMI switch interface support
DEPENDS:=@GPIO_SUPPORT +kmod-swconfig +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_samsung||TARGET_tegra):kmod-of-mdio
DEPENDS:=@GPIO_SUPPORT +kmod-swconfig +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio
KCONFIG:=CONFIG_RTL8366_SMI
FILES:=$(LINUX_DIR)/drivers/net/phy/rtl8366_smi.ko
AUTOLOAD:=$(call AutoLoad,42,rtl8366_smi,1)
@ -558,7 +558,7 @@ $(eval $(call KernelPackage,8139cp))
define KernelPackage/r8169
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=RealTek RTL-8169 PCI Gigabit Ethernet Adapter kernel support
DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +!LINUX_4_14:kmod-phy-realtek
DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +kmod-phy-realtek
KCONFIG:=CONFIG_R8169 \
CONFIG_R8169_NAPI=y \
CONFIG_R8169_VLAN=n
@ -683,7 +683,7 @@ $(eval $(call KernelPackage,igbvf))
define KernelPackage/ixgbe
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet support
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +LINUX_5_4:kmod-libphy
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy
KCONFIG:=CONFIG_IXGBE \
CONFIG_IXGBE_VXLAN=n \
CONFIG_IXGBE_HWMON=y \
@ -721,7 +721,7 @@ $(eval $(call KernelPackage,ixgbevf))
define KernelPackage/i40e
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Intel(R) Ethernet Controller XL710 Family support
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +LINUX_5_4:kmod-libphy
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy
KCONFIG:=CONFIG_I40E \
CONFIG_I40E_VXLAN=n \
CONFIG_I40E_HWMON=y \
@ -745,8 +745,7 @@ define KernelPackage/iavf
CONFIG_I40EVF \
CONFIG_IAVF
FILES:= \
$(LINUX_DIR)/drivers/net/ethernet/intel/i40evf/i40evf.ko@lt4.20 \
$(LINUX_DIR)/drivers/net/ethernet/intel/iavf/iavf.ko@ge4.20
$(LINUX_DIR)/drivers/net/ethernet/intel/iavf/iavf.ko
AUTOLOAD:=$(call AutoProbe,i40evf iavf)
AUTOLOAD:=$(call AutoProbe,iavf)
endef
@ -1228,7 +1227,7 @@ $(eval $(call KernelPackage,sfc))
define KernelPackage/sfp
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=SFP cage support
DEPENDS:=+kmod-i2c-core +kmod-hwmon-core +kmod-phylink +LINUX_5_4:kmod-libphy
DEPENDS:=+kmod-i2c-core +kmod-hwmon-core +kmod-phylink +kmod-libphy
KCONFIG:= \
CONFIG_SFP \
CONFIG_MDIO_I2C
@ -1247,7 +1246,7 @@ $(eval $(call KernelPackage,sfp))
define KernelPackage/igc
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Intel(R) Ethernet Controller I225 Series support
DEPENDS:=@PCI_SUPPORT @LINUX_5_4
DEPENDS:=@PCI_SUPPORT
KCONFIG:=CONFIG_IGC
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/igc/igc.ko
AUTOLOAD:=$(call AutoProbe,igc)

View File

@ -368,7 +368,7 @@ IPVS_MODULES:= \
define KernelPackage/nf-ipvs
SUBMENU:=Netfilter Extensions
TITLE:=IP Virtual Server modules
DEPENDS:=@IPV6 +kmod-lib-crc32c +kmod-ipt-conntrack +kmod-nf-conntrack +LINUX_4_14:kmod-nf-conntrack6
DEPENDS:=@IPV6 +kmod-lib-crc32c +kmod-ipt-conntrack +kmod-nf-conntrack
KCONFIG:= \
CONFIG_IP_VS \
CONFIG_IP_VS_IPV6=y \
@ -625,7 +625,7 @@ define KernelPackage/nf-nathelper-extra
KCONFIG:=$(KCONFIG_NF_NATHELPER_EXTRA)
FILES:=$(foreach mod,$(NF_NATHELPER_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NATHELPER_EXTRA-m)))
DEPENDS:=+kmod-nf-nat +kmod-lib-textsearch +kmod-ipt-raw +!LINUX_4_14:kmod-asn1-decoder
DEPENDS:=+kmod-nf-nat +kmod-lib-textsearch +kmod-ipt-raw +kmod-asn1-decoder
endef
define KernelPackage/nf-nathelper-extra/description
@ -1135,7 +1135,7 @@ $(eval $(call KernelPackage,ipt-rpfilter))
define KernelPackage/nft-core
SUBMENU:=$(NF_MENU)
TITLE:=Netfilter nf_tables support
DEPENDS:=+kmod-nfnetlink +kmod-nf-reject +IPV6:kmod-nf-reject6 +IPV6:kmod-nf-conntrack6 +LINUX_5_4:kmod-nf-nat
DEPENDS:=+kmod-nfnetlink +kmod-nf-reject +IPV6:kmod-nf-reject6 +IPV6:kmod-nf-conntrack6 +kmod-nf-nat
FILES:=$(foreach mod,$(NFT_CORE-m),$(LINUX_DIR)/net/$(mod).ko)
AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_CORE-m)))
KCONFIG:= \
@ -1231,7 +1231,6 @@ define KernelPackage/nft-netdev
CONFIG_NFT_DUP_NETDEV \
CONFIG_NFT_FWD_NETDEV
FILES:= \
$(LINUX_DIR)/net/netfilter/nf_tables_netdev.ko@lt4.17 \
$(LINUX_DIR)/net/netfilter/nf_dup_netdev.ko \
$(LINUX_DIR)/net/netfilter/nft_dup_netdev.ko \
$(LINUX_DIR)/net/netfilter/nft_fwd_netdev.ko

View File

@ -246,7 +246,7 @@ define KernelPackage/ipsec
DEPENDS:= \
+kmod-crypto-authenc +kmod-crypto-cbc +kmod-crypto-deflate \
+kmod-crypto-des +kmod-crypto-echainiv +kmod-crypto-hmac \
+kmod-crypto-iv +kmod-crypto-md5 +kmod-crypto-sha1
+kmod-crypto-md5 +kmod-crypto-sha1
KCONFIG:= \
CONFIG_NET_KEY \
CONFIG_XFRM_USER \
@ -399,7 +399,7 @@ $(eval $(call KernelPackage,ip6-vti))
define KernelPackage/xfrm-interface
SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=IPsec XFRM Interface
DEPENDS:=+kmod-ipsec4 +IPV6:kmod-ipsec6 @!LINUX_4_14
DEPENDS:=+kmod-ipsec4 +IPV6:kmod-ipsec6
KCONFIG:=CONFIG_XFRM_INTERFACE
FILES:=$(LINUX_DIR)/net/xfrm/xfrm_interface.ko
AUTOLOAD:=$(call AutoProbe,xfrm_interface)
@ -788,7 +788,7 @@ $(eval $(call KernelPackage,sched-core))
define KernelPackage/sched-cake
SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=Cake fq_codel/blue derived shaper
DEPENDS:=@!LINUX_4_14 +kmod-sched-core
DEPENDS:=+kmod-sched-core
KCONFIG:=CONFIG_NET_SCH_CAKE
FILES:=$(LINUX_DIR)/net/sched/sch_cake.ko
AUTOLOAD:=$(call AutoProbe,sch_cake)
@ -1155,7 +1155,7 @@ $(eval $(call KernelPackage,rxrpc))
define KernelPackage/mpls
SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=MPLS support
DEPENDS:=+!LINUX_4_14:kmod-iptunnel
DEPENDS:=+kmod-iptunnel
KCONFIG:= \
CONFIG_MPLS=y \
CONFIG_LWTUNNEL=y \

View File

@ -136,21 +136,6 @@ endef
$(eval $(call KernelPackage,dma-buf))
define KernelPackage/nvmem
SUBMENU:=$(OTHER_MENU)
TITLE:=Non Volatile Memory support
DEPENDS:=@!LINUX_5_4
KCONFIG:=CONFIG_NVMEM
HIDDEN:=1
FILES:=$(LINUX_DIR)/drivers/nvmem/nvmem_core.ko
endef
define KernelPackage/nvmem/description
Support for NVMEM(Non Volatile Memory) devices like EEPROM, EFUSES, etc.
endef
$(eval $(call KernelPackage,nvmem))
define KernelPackage/eeprom-93cx6
SUBMENU:=$(OTHER_MENU)
TITLE:=EEPROM 93CX6 support
@ -170,7 +155,7 @@ define KernelPackage/eeprom-at24
SUBMENU:=$(OTHER_MENU)
TITLE:=EEPROM AT24 support
KCONFIG:=CONFIG_EEPROM_AT24
DEPENDS:=+kmod-i2c-core +!LINUX_5_4:kmod-nvmem +!LINUX_4_14:kmod-regmap-i2c
DEPENDS:=+kmod-i2c-core +kmod-regmap-i2c
FILES:=$(LINUX_DIR)/drivers/misc/eeprom/at24.ko
AUTOLOAD:=$(call AutoProbe,at24)
endef
@ -186,7 +171,6 @@ define KernelPackage/eeprom-at25
SUBMENU:=$(OTHER_MENU)
TITLE:=EEPROM AT25 support
KCONFIG:=CONFIG_EEPROM_AT25
DEPENDS:=+!LINUX_5_4:kmod-nvmem
FILES:=$(LINUX_DIR)/drivers/misc/eeprom/at25.ko
AUTOLOAD:=$(call AutoProbe,at25)
endef
@ -265,7 +249,7 @@ $(eval $(call KernelPackage,gpio-nxp-74hc164))
define KernelPackage/gpio-pca953x
SUBMENU:=$(OTHER_MENU)
DEPENDS:=@GPIO_SUPPORT +kmod-i2c-core +LINUX_5_4:kmod-regmap-i2c
DEPENDS:=@GPIO_SUPPORT +kmod-i2c-core +kmod-regmap-i2c
TITLE:=PCA95xx, TCA64xx, and MAX7310 I/O ports
KCONFIG:=CONFIG_GPIO_PCA953X
FILES:=$(LINUX_DIR)/drivers/gpio/gpio-pca953x.ko
@ -651,7 +635,7 @@ define KernelPackage/rtc-pcf2123
SUBMENU:=$(OTHER_MENU)
TITLE:=Philips PCF2123 RTC support
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
DEPENDS:=+LINUX_5_4:kmod-regmap-spi
DEPENDS:=+kmod-regmap-spi
KCONFIG:=CONFIG_RTC_DRV_PCF2123 \
CONFIG_RTC_CLASS=y
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pcf2123.ko
@ -818,7 +802,7 @@ define KernelPackage/serial-8250
$(LINUX_DIR)/drivers/tty/serial/8250/8250.ko \
$(LINUX_DIR)/drivers/tty/serial/8250/8250_base.ko \
$(if $(CONFIG_PCI),$(LINUX_DIR)/drivers/tty/serial/8250/8250_pci.ko) \
$(if $(CONFIG_GPIOLIB),$(LINUX_DIR)/drivers/tty/serial/serial_mctrl_gpio.ko@ge5.3)
$(if $(CONFIG_GPIOLIB),$(LINUX_DIR)/drivers/tty/serial/serial_mctrl_gpio.ko)
AUTOLOAD:=$(call AutoProbe,8250 8250_base 8250_pci)
endef
@ -1022,26 +1006,10 @@ endef
$(eval $(call KernelPackage,ptp))
define KernelPackage/ptp-gianfar
SUBMENU:=$(OTHER_MENU)
TITLE:=Freescale Gianfar PTP support
DEPENDS:=@TARGET_mpc85xx +kmod-ptp @LINUX_4_14
KCONFIG:=CONFIG_PTP_1588_CLOCK_GIANFAR
FILES:=$(LINUX_DIR)/drivers/net/ethernet/freescale/gianfar_ptp.ko
AUTOLOAD:=$(call AutoProbe,gianfar_ptp)
endef
define KernelPackage/ptp-gianfar/description
Kernel module for IEEE 1588 support for Freescale
Gianfar Ethernet drivers
endef
$(eval $(call KernelPackage,ptp-gianfar))
define KernelPackage/ptp-qoriq
SUBMENU:=$(OTHER_MENU)
TITLE:=Freescale QorIQ PTP support
DEPENDS:=@TARGET_mpc85xx +kmod-ptp @!LINUX_4_14
DEPENDS:=@TARGET_mpc85xx +kmod-ptp
KCONFIG:=CONFIG_PTP_1588_CLOCK_QORIQ
FILES:=$(LINUX_DIR)/drivers/ptp/ptp-qoriq.ko
AUTOLOAD:=$(call AutoProbe,ptp-qoriq)
@ -1069,22 +1037,6 @@ endef
$(eval $(call KernelPackage,random-core))
define KernelPackage/random-tpm
SUBMENU:=$(OTHER_MENU)
TITLE:=Hardware Random Number Generator TPM support
KCONFIG:=CONFIG_HW_RANDOM_TPM
FILES:=$(LINUX_DIR)/drivers/char/hw_random/tpm-rng.ko
DEPENDS:= +kmod-random-core +kmod-tpm @LINUX_4_14
AUTOLOAD:=$(call AutoProbe,tpm-rng)
endef
define KernelPackage/random-tpm/description
Kernel module for the Random Number Generator
in the Trusted Platform Module.
endef
$(eval $(call KernelPackage,random-tpm))
define KernelPackage/thermal
SUBMENU:=$(OTHER_MENU)
TITLE:=Generic Thermal sysfs driver
@ -1154,7 +1106,7 @@ $(eval $(call KernelPackage,echo))
define KernelPackage/tpm
SUBMENU:=$(OTHER_MENU)
TITLE:=TPM Hardware Support
DEPENDS:= +!LINUX_4_14:kmod-random-core
DEPENDS:= +kmod-random-core
KCONFIG:= CONFIG_TCG_TPM
FILES:= $(LINUX_DIR)/drivers/char/tpm/tpm.ko
AUTOLOAD:=$(call AutoLoad,10,tpm,1)

View File

@ -522,7 +522,7 @@ define KernelPackage/sound-hda-intel
CONFIG_SND_HDA_INTEL
FILES:= \
$(LINUX_DIR)/sound/pci/hda/snd-hda-intel.ko \
$(LINUX_DIR)/sound/hda/snd-intel-nhlt.ko@ge5.4
$(LINUX_DIR)/sound/hda/snd-intel-nhlt.ko
AUTOLOAD:=$(call AutoProbe,snd-hda-intel)
$(call AddDepends/sound,kmod-sound-hda-core)
endef

View File

@ -458,27 +458,9 @@ endef
$(eval $(call KernelPackage,usb-dwc3))
define KernelPackage/usb-dwc3-of-simple
TITLE:=DWC3 USB simple OF driver
DEPENDS:=@LINUX_4_14 @(TARGET_ipq40xx||TARGET_ipq806x) +kmod-usb-dwc3
KCONFIG:= CONFIG_USB_DWC3_OF_SIMPLE
FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-of-simple.ko
AUTOLOAD:=$(call AutoLoad,53,dwc3-of-simple,1)
$(call AddDepends/usb)
endef
define KernelPackage/usb-dwc3-of-simple/description
This driver provides generic platform glue for the integrated DesignWare
USB3 IP Core.
endef
$(eval $(call KernelPackage,usb-dwc3-of-simple))
define KernelPackage/usb-dwc3-qcom
TITLE:=DWC3 Qualcomm USB driver
DEPENDS:=@(!LINUX_4_14) @(TARGET_ipq40xx||TARGET_ipq806x) +kmod-usb-dwc3
DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x) +kmod-usb-dwc3
KCONFIG:= CONFIG_USB_DWC3_QCOM
FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-qcom.ko
AUTOLOAD:=$(call AutoLoad,53,dwc3-qcom,1)
@ -1603,8 +1585,8 @@ define KernelPackage/usb-chipidea
FILES:= \
$(LINUX_DIR)/drivers/extcon/extcon-core.ko \
$(LINUX_DIR)/drivers/usb/chipidea/ci_hdrc.ko \
$(LINUX_DIR)/drivers/usb/common/ulpi.ko@ge4.18 \
$(LINUX_DIR)/drivers/usb/roles/roles.ko@ge5.0
$(LINUX_DIR)/drivers/usb/common/ulpi.ko \
$(LINUX_DIR)/drivers/usb/roles/roles.ko
AUTOLOAD:=$(call AutoLoad,39,ci_hdrc,1)
$(call AddDepends/usb)
endef

View File

@ -229,7 +229,7 @@ define KernelPackage/drm
KCONFIG:=CONFIG_DRM
FILES:= \
$(LINUX_DIR)/drivers/gpu/drm/drm.ko \
$(LINUX_DIR)/drivers/gpu/drm/drm_panel_orientation_quirks.ko@ge4.15
$(LINUX_DIR)/drivers/gpu/drm/drm_panel_orientation_quirks.ko
AUTOLOAD:=$(call AutoLoad,05,drm)
endef
@ -282,11 +282,9 @@ define KernelPackage/drm-amdgpu
CONFIG_DRM_AMDGPU_SI=y \
CONFIG_DRM_AMDGPU_CIK=y \
CONFIG_DRM_AMD_DC=y \
CONFIG_HSA_AMD=y \
CONFIG_DEBUG_KERNEL_DC=n
FILES:=$(LINUX_DIR)/drivers/gpu/drm/amd/amdgpu/amdgpu.ko \
$(LINUX_DIR)/drivers/gpu/drm/scheduler/gpu-sched.ko@ge4.15 \
$(LINUX_DIR)/drivers/gpu/drm/amd/lib/chash.ko@lt5.3
$(LINUX_DIR)/drivers/gpu/drm/scheduler/gpu-sched.ko
AUTOLOAD:=$(call AutoProbe,amdgpu)
endef
@ -408,7 +406,6 @@ define KernelPackage/video-core
CONFIG_V4L_PLATFORM_DRIVERS=y \
CONFIG_V4L_ISA_PARPORT_DRIVERS=y
FILES:= \
$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-common.ko@lt5.4 \
$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videodev.ko
AUTOLOAD:=$(call AutoLoad,60, videodev v4l2-common)
endef
@ -440,14 +437,10 @@ define KernelPackage/video-videobuf2
CONFIG_VIDEOBUF2_MEMOPS \
CONFIG_VIDEOBUF2_VMALLOC
FILES:= \
$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videobuf2-core.ko@lt4.16 \
$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videobuf2-v4l2.ko@lt4.16 \
$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videobuf2-memops.ko@lt4.16 \
$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videobuf2-vmalloc.ko@lt4.16 \
$(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-common.ko@ge4.16 \
$(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-v4l2.ko@ge4.16 \
$(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-memops.ko@ge4.16 \
$(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-vmalloc.ko@ge4.16
$(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-common.ko \
$(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-v4l2.ko \
$(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-memops.ko \
$(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-vmalloc.ko
AUTOLOAD:=$(call AutoLoad,65,videobuf2-core videobuf-v4l2 videobuf2-memops videobuf2-vmalloc)
$(call AddDepends/video)
endef
@ -512,7 +505,7 @@ $(eval $(call KernelPackage,video-uvc))
define KernelPackage/video-gspca-core
MENU:=1
TITLE:=GSPCA webcam core support framework
DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-input-core +!LINUX_4_14:kmod-video-videobuf2
DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-input-core +kmod-video-videobuf2
KCONFIG:=CONFIG_USB_GSPCA
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_main.ko
AUTOLOAD:=$(call AutoProbe,gspca_main)

View File

@ -1,47 +0,0 @@
#
# Copyright (C) 2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=spi-gpio-custom
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define KernelPackage/spi-gpio-custom
SUBMENU:=SPI Support
TITLE:=Custom GPIO-based SPI device
DEPENDS:=@GPIO_SUPPORT +kmod-spi-bitbang +kmod-spi-gpio +kmod-spi-dev @LINUX_4_14
FILES:=$(PKG_BUILD_DIR)/spi-gpio-custom.ko
KCONFIG:=
endef
define KernelPackage/spi-gpio-custom/description
Kernel module for register a custom spi-gpio platform device.
endef
EXTRA_KCONFIG:= \
CONFIG_SPI_GPIO_CUSTOM=m
EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \
$(KERNEL_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
modules
endef
$(eval $(call KernelPackage,spi-gpio-custom))

View File

@ -1,14 +0,0 @@
config SPI_GPIO_CUSTOM
tristate "Custom GPIO-based SPI driver"
depends on GENERIC_GPIO
select SPI_GPIO
help
This is an SPI driver to register 1 to 4 custom SPI buses using
GPIO lines. Each bus can have up to 8 slaves.
The devices will be exposed to userspace as /dev/spidevX.X
This module is maily intended to interface microcontrollers
and other SPI devices without a specific kernel driver.
This support is also available as a module. If so, the module
will be called spi-gpio-custom.

View File

@ -1 +0,0 @@
obj-${CONFIG_SPI_GPIO_CUSTOM} += spi-gpio-custom.o

View File

@ -1,365 +0,0 @@
/*
* Custom GPIO-based SPI driver
*
* Copyright (C) 2013 Marco Burato <zmaster.adsl@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Based on i2c-gpio-custom by:
* Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
* ---------------------------------------------------------------------------
*
* The behaviour of this driver can be altered by setting some parameters
* from the insmod command line.
*
* The following parameters are adjustable:
*
* bus0 These four arguments can be arrays of
* bus1 1-8 unsigned integers as follows:
* bus2
* bus3 <id>,<sck>,<mosi>,<miso>,<mode1>,<maxfreq1>,<cs1>,...
*
* where:
*
* <id> ID to used as device_id for the corresponding bus (required)
* <sck> GPIO pin ID to be used for bus SCK (required)
* <mosi> GPIO pin ID to be used for bus MOSI (required*)
* <miso> GPIO pin ID to be used for bus MISO (required*)
* <modeX> Mode configuration for slave X in the bus (required)
* (see /include/linux/spi/spi.h)
* <maxfreqX> Maximum clock frequency in Hz for slave X in the bus (required)
* <csX> GPIO pin ID to be used for slave X CS (required**)
*
* Notes:
* * If a signal is not used (for example there is no MISO) you need
* to set the GPIO pin ID for that signal to an invalid value.
* ** If you only have 1 slave in the bus with no CS, you can omit the
* <cs1> param or set it to an invalid GPIO id to disable it. When
* you have 2 or more slaves, they must all have a valid CS.
*
* If this driver is built into the kernel, you can use the following kernel
* command line parameters, with the same values as the corresponding module
* parameters listed above:
*
* spi-gpio-custom.bus0
* spi-gpio-custom.bus1
* spi-gpio-custom.bus2
* spi-gpio-custom.bus3
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi_gpio.h>
#define DRV_NAME "spi-gpio-custom"
#define DRV_DESC "Custom GPIO-based SPI driver"
#define DRV_VERSION "0.1"
#define PFX DRV_NAME ": "
#define BUS_PARAM_ID 0
#define BUS_PARAM_SCK 1
#define BUS_PARAM_MOSI 2
#define BUS_PARAM_MISO 3
#define BUS_PARAM_MODE1 4
#define BUS_PARAM_MAXFREQ1 5
#define BUS_PARAM_CS1 6
#define BUS_SLAVE_COUNT_MAX 8
#define BUS_PARAM_REQUIRED 6
#define BUS_PARAM_PER_SLAVE 3
#define BUS_PARAM_COUNT (4+BUS_PARAM_PER_SLAVE*BUS_SLAVE_COUNT_MAX)
#define BUS_COUNT_MAX 4
static unsigned int bus0[BUS_PARAM_COUNT] __initdata;
static unsigned int bus1[BUS_PARAM_COUNT] __initdata;
static unsigned int bus2[BUS_PARAM_COUNT] __initdata;
static unsigned int bus3[BUS_PARAM_COUNT] __initdata;
static unsigned int bus_nump[BUS_COUNT_MAX] __initdata;
#define BUS_PARM_DESC \
" config -> id,sck,mosi,miso,mode1,maxfreq1[,cs1,mode2,maxfreq2,cs2,...]"
module_param_array(bus0, uint, &bus_nump[0], 0);
MODULE_PARM_DESC(bus0, "bus0" BUS_PARM_DESC);
module_param_array(bus1, uint, &bus_nump[1], 0);
MODULE_PARM_DESC(bus1, "bus1" BUS_PARM_DESC);
module_param_array(bus2, uint, &bus_nump[2], 0);
MODULE_PARM_DESC(bus2, "bus2" BUS_PARM_DESC);
module_param_array(bus3, uint, &bus_nump[3], 0);
MODULE_PARM_DESC(bus3, "bus3" BUS_PARM_DESC);
static struct platform_device *devices[BUS_COUNT_MAX];
static unsigned int nr_devices;
static void spi_gpio_custom_cleanup(void)
{
int i;
for (i = 0; i < nr_devices; i++)
if (devices[i])
platform_device_unregister(devices[i]);
}
static int __init spi_gpio_custom_get_slave_mode(unsigned int id,
unsigned int *params,
int slave_index)
{
int param_index;
param_index = BUS_PARAM_MODE1+slave_index*BUS_PARAM_PER_SLAVE;
if (param_index >= bus_nump[id])
return -1;
return params[param_index];
}
static int __init spi_gpio_custom_get_slave_maxfreq(unsigned int id,
unsigned int *params,
int slave_index)
{
int param_index;
param_index = BUS_PARAM_MAXFREQ1+slave_index*BUS_PARAM_PER_SLAVE;
if (param_index >= bus_nump[id])
return -1;
return params[param_index];
}
static int __init spi_gpio_custom_get_slave_cs(unsigned int id,
unsigned int *params,
int slave_index)
{
int param_index;
param_index = BUS_PARAM_CS1+slave_index*BUS_PARAM_PER_SLAVE;
if (param_index >= bus_nump[id])
return -1;
if (!gpio_is_valid(params[param_index]))
return -1;
return params[param_index];
}
static int __init spi_gpio_custom_check_params(unsigned int id, unsigned int *params)
{
int i;
struct spi_master *master;
if (bus_nump[id] < BUS_PARAM_REQUIRED) {
printk(KERN_ERR PFX "not enough values for parameter bus%d\n",
id);
return -EINVAL;
}
if (bus_nump[id] > (1+BUS_PARAM_CS1)) {
/* more than 1 device: check CS GPIOs */
for (i = 0; i < BUS_SLAVE_COUNT_MAX; i++) {
/* no more slaves? */
if (spi_gpio_custom_get_slave_mode(id, params, i) < 0)
break;
if (spi_gpio_custom_get_slave_cs(id, params, i) < 0) {
printk(KERN_ERR PFX "invalid/missing CS gpio for slave %d on bus %d\n",
i, params[BUS_PARAM_ID]);
return -EINVAL;
}
}
}
if (!gpio_is_valid(params[BUS_PARAM_SCK])) {
printk(KERN_ERR PFX "invalid SCK gpio for bus %d\n",
params[BUS_PARAM_ID]);
return -EINVAL;
}
master = spi_busnum_to_master(params[BUS_PARAM_ID]);
if (master) {
spi_master_put(master);
printk(KERN_ERR PFX "bus %d already exists\n",
params[BUS_PARAM_ID]);
return -EEXIST;
}
return 0;
}
static int __init spi_gpio_custom_add_one(unsigned int id, unsigned int *params)
{
struct platform_device *pdev;
struct spi_gpio_platform_data pdata;
int i;
int num_cs;
int err;
struct spi_master *master;
struct spi_device *slave;
struct spi_board_info slave_info;
int mode, maxfreq, cs;
if (!bus_nump[id])
return 0;
err = spi_gpio_custom_check_params(id, params);
if (err)
goto err;
/* Create BUS device node */
pdev = platform_device_alloc("spi_gpio", params[BUS_PARAM_ID]);
if (!pdev) {
err = -ENOMEM;
goto err;
}
num_cs = 0;
for (i = 0; i < BUS_SLAVE_COUNT_MAX; i++) {
/* no more slaves? */
if (spi_gpio_custom_get_slave_mode(id, params, i) < 0)
break;
if (spi_gpio_custom_get_slave_cs(id, params, i) >= 0)
num_cs++;
}
if (num_cs == 0) {
/*
* Even if no CS is used, spi modules expect
* at least 1 (unused)
*/
num_cs = 1;
}
pdata.sck = params[BUS_PARAM_SCK];
pdata.mosi = gpio_is_valid(params[BUS_PARAM_MOSI])
? params[BUS_PARAM_MOSI]
: SPI_GPIO_NO_MOSI;
pdata.miso = gpio_is_valid(params[BUS_PARAM_MISO])
? params[BUS_PARAM_MISO]
: SPI_GPIO_NO_MISO;
pdata.num_chipselect = num_cs;
err = platform_device_add_data(pdev, &pdata, sizeof(pdata));
if (err) {
platform_device_put(pdev);
goto err;
}
err = platform_device_add(pdev);
if (err) {
printk(KERN_ERR PFX "platform_device_add failed with return code %d\n",
err);
platform_device_put(pdev);
goto err;
}
/* Register SLAVE devices */
for (i = 0; i < BUS_SLAVE_COUNT_MAX; i++) {
mode = spi_gpio_custom_get_slave_mode(id, params, i);
maxfreq = spi_gpio_custom_get_slave_maxfreq(id, params, i);
cs = spi_gpio_custom_get_slave_cs(id, params, i);
/* no more slaves? */
if (mode < 0)
break;
memset(&slave_info, 0, sizeof(slave_info));
strcpy(slave_info.modalias, "spidev");
slave_info.controller_data = (void *)((cs >= 0)
? cs
: SPI_GPIO_NO_CHIPSELECT);
slave_info.max_speed_hz = maxfreq;
slave_info.bus_num = params[BUS_PARAM_ID];
slave_info.chip_select = i;
slave_info.mode = mode;
master = spi_busnum_to_master(params[BUS_PARAM_ID]);
if (!master) {
printk(KERN_ERR PFX "unable to get master for bus %d\n",
params[BUS_PARAM_ID]);
err = -EINVAL;
goto err_unregister;
}
slave = spi_new_device(master, &slave_info);
spi_master_put(master);
if (!slave) {
printk(KERN_ERR PFX "unable to create slave %d for bus %d\n",
i, params[BUS_PARAM_ID]);
/* Will most likely fail due to unsupported mode bits */
err = -EINVAL;
goto err_unregister;
}
}
devices[nr_devices++] = pdev;
return 0;
err_unregister:
platform_device_unregister(pdev);
err:
return err;
}
static int __init spi_gpio_custom_probe(void)
{
int err;
printk(KERN_INFO DRV_DESC " version " DRV_VERSION "\n");
err = spi_gpio_custom_add_one(0, bus0);
if (err)
goto err;
err = spi_gpio_custom_add_one(1, bus1);
if (err)
goto err;
err = spi_gpio_custom_add_one(2, bus2);
if (err)
goto err;
err = spi_gpio_custom_add_one(3, bus3);
if (err)
goto err;
if (!nr_devices) {
printk(KERN_ERR PFX "no bus parameter(s) specified\n");
err = -ENODEV;
goto err;
}
return 0;
err:
spi_gpio_custom_cleanup();
return err;
}
#ifdef MODULE
static int __init spi_gpio_custom_init(void)
{
return spi_gpio_custom_probe();
}
module_init(spi_gpio_custom_init);
static void __exit spi_gpio_custom_exit(void)
{
spi_gpio_custom_cleanup();
}
module_exit(spi_gpio_custom_exit);
#else
subsys_initcall(spi_gpio_custom_probe);
#endif /* MODULE*/
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Marco Burato <zmaster.adsl@gmail.com>");
MODULE_DESCRIPTION(DRV_DESC);
MODULE_VERSION(DRV_VERSION);

View File

@ -1,48 +0,0 @@
#
# Copyright (C) 2008-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=w1-gpio-custom
PKG_RELEASE:=3
include $(INCLUDE_DIR)/package.mk
define KernelPackage/w1-gpio-custom
SUBMENU:=W1 support
TITLE:=Custom GPIO-based 1-wire device
DEPENDS:=kmod-w1 +kmod-w1-master-gpio @LINUX_4_14
FILES:=$(PKG_BUILD_DIR)/w1-gpio-custom.ko
KCONFIG:=
endef
define KernelPackage/w1-gpio-custom/description
Kernel module to register a custom w1-gpio platform device.
endef
EXTRA_KCONFIG:= \
CONFIG_W1_MASTER_GPIO_CUSTOM=m
EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG))))
MAKE_OPTS:= \
$(KERNEL_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
modules
endef
$(eval $(call KernelPackage,w1-gpio-custom))

View File

@ -1,4 +0,0 @@
config W1_MASTER_GPIO_CUSTOM
tristate "Custom GPIO-based W1 driver"
depends on GENERIC_GPIO
select W1_GPIO

View File

@ -1 +0,0 @@
obj-${CONFIG_W1_MASTER_GPIO_CUSTOM} += w1-gpio-custom.o

View File

@ -1,190 +0,0 @@
/*
* Custom GPIO-based W1 driver
*
* Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
* Copyright (C) 2008 Bifferos <bifferos at yahoo.co.uk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* ---------------------------------------------------------------------------
*
* The behaviour of this driver can be altered by setting some parameters
* from the insmod command line.
*
* The following parameters are adjustable:
*
* bus0 These four arguments must be arrays of
* bus1 3 unsigned integers as follows:
* bus2
* bus3 <id>,<pin>,<od>
*
* where:
*
* <id> ID to used as device_id for the corresponding bus (required)
* <sda> GPIO pin ID of data pin (required)
* <od> Pin is configured as open drain.
*
* See include/w1-gpio.h for more information about the parameters.
*
* If this driver is built into the kernel, you can use the following kernel
* command line parameters, with the same values as the corresponding module
* parameters listed above:
*
* w1-gpio-custom.bus0
* w1-gpio-custom.bus1
* w1-gpio-custom.bus2
* w1-gpio-custom.bus3
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/w1-gpio.h>
#define DRV_NAME "w1-gpio-custom"
#define DRV_DESC "Custom GPIO-based W1 driver"
#define DRV_VERSION "0.1.1"
#define PFX DRV_NAME ": "
#define BUS_PARAM_ID 0
#define BUS_PARAM_PIN 1
#define BUS_PARAM_OD 2
#define BUS_PARAM_REQUIRED 3
#define BUS_PARAM_COUNT 3
#define BUS_COUNT_MAX 4
static unsigned int bus0[BUS_PARAM_COUNT] __initdata;
static unsigned int bus1[BUS_PARAM_COUNT] __initdata;
static unsigned int bus2[BUS_PARAM_COUNT] __initdata;
static unsigned int bus3[BUS_PARAM_COUNT] __initdata;
static unsigned int bus_nump[BUS_COUNT_MAX] __initdata;
#define BUS_PARM_DESC " config -> id,pin,od"
module_param_array(bus0, uint, &bus_nump[0], 0);
MODULE_PARM_DESC(bus0, "bus0" BUS_PARM_DESC);
module_param_array(bus1, uint, &bus_nump[1], 0);
MODULE_PARM_DESC(bus1, "bus1" BUS_PARM_DESC);
module_param_array(bus2, uint, &bus_nump[2], 0);
MODULE_PARM_DESC(bus2, "bus2" BUS_PARM_DESC);
module_param_array(bus3, uint, &bus_nump[3], 0);
MODULE_PARM_DESC(bus3, "bus3" BUS_PARM_DESC);
static struct platform_device *devices[BUS_COUNT_MAX];
static unsigned int nr_devices;
static void w1_gpio_custom_cleanup(void)
{
int i;
for (i = 0; i < nr_devices; i++)
if (devices[i])
platform_device_put(devices[i]);
}
static int __init w1_gpio_custom_add_one(unsigned int id, unsigned int *params)
{
struct platform_device *pdev;
struct w1_gpio_platform_data pdata;
int err;
if (!bus_nump[id])
return 0;
if (bus_nump[id] < BUS_PARAM_REQUIRED) {
printk(KERN_ERR PFX "not enough parameters for bus%d\n", id);
err = -EINVAL;
goto err;
}
pdev = platform_device_alloc("w1-gpio", params[BUS_PARAM_ID]);
if (!pdev) {
err = -ENOMEM;
goto err;
}
pdata.pin = params[BUS_PARAM_PIN];
pdata.is_open_drain = params[BUS_PARAM_OD] ? 1 : 0;
pdata.enable_external_pullup = NULL;
pdata.ext_pullup_enable_pin = -EINVAL;
err = platform_device_add_data(pdev, &pdata, sizeof(pdata));
if (err)
goto err_put;
err = platform_device_add(pdev);
if (err)
goto err_put;
devices[nr_devices++] = pdev;
return 0;
err_put:
platform_device_put(pdev);
err:
return err;
}
static int __init w1_gpio_custom_probe(void)
{
int err;
nr_devices = 0;
printk(KERN_INFO DRV_DESC " version " DRV_VERSION "\n");
err = w1_gpio_custom_add_one(0, bus0);
if (err)
goto err;
err = w1_gpio_custom_add_one(1, bus1);
if (err)
goto err;
err = w1_gpio_custom_add_one(2, bus2);
if (err)
goto err;
err = w1_gpio_custom_add_one(3, bus3);
if (err)
goto err;
if (!nr_devices) {
printk(KERN_ERR PFX "no bus parameter(s) specified\n");
err = -ENODEV;
goto err;
}
return 0;
err:
w1_gpio_custom_cleanup();
return err;
}
#ifdef MODULE
static int __init w1_gpio_custom_init(void)
{
return w1_gpio_custom_probe();
}
module_init(w1_gpio_custom_init);
static void __exit w1_gpio_custom_exit(void)
{
w1_gpio_custom_cleanup();
}
module_exit(w1_gpio_custom_exit);
#else
subsys_initcall(w1_gpio_custom_probe);
#endif /* MODULE*/
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Bifferos <bifferos at yahoo.co.uk >");
MODULE_DESCRIPTION(DRV_DESC);
MODULE_VERSION(DRV_VERSION);