Skip to content

Commit e6aa132

Browse files
[bot] AutoMerging: merge all upstream's changes:
* https://github.com/coolsnowwolf/lede: kernel: bump 5.15 to 5.15.71 (coolsnowwolf#10203) kernel: bump 5.10 to 5.10.146 (coolsnowwolf#10204) kernel: bump 5.4 to 5.4.215 (coolsnowwolf#10205) rockchip: rock3a: fixes pcie3 support kernel: move ubnt ledbar driver to a separate package kernel: fold lzma debloat patch into the patch adding the code kernel: remove hack patch, move kirkwood specific kmods to target modules.mk
2 parents a22daff + 56bf33b commit e6aa132

File tree

55 files changed

+496
-7040
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+496
-7040
lines changed

include/kernel-5.10

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.10 = .145
2-
LINUX_KERNEL_HASH-5.10.145 = fc5990f3e57479369eaf193bd7760b84f26d2b670c2d88e473101cb679c5ac61
1+
LINUX_VERSION-5.10 = .146
2+
LINUX_KERNEL_HASH-5.10.146 = 7bbd97f3278eadb73c19a1ca8c1a655c60afcee9f487b910063cdd15e9ee6dc1

include/kernel-5.15

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.15 = .70
2-
LINUX_KERNEL_HASH-5.15.70 = 1a7c26f0253407bb222786c8cbf2ee6235acebe8ea641fe0bc2360acce970d76
1+
LINUX_VERSION-5.15 = .71
2+
LINUX_KERNEL_HASH-5.15.71 = 5f5408138e016c0e029e015d98ceab86f4e6366c65cd611259dac808ab1d1e53

include/kernel-5.4

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.4 = .214
2-
LINUX_KERNEL_HASH-5.4.214 = 9abc79b4808c827eb82f8a44313ce6d3ade255949989bb98c11acda7ca3bc5db
1+
LINUX_VERSION-5.4 = .215
2+
LINUX_KERNEL_HASH-5.4.215 = 2d2bf7c3a25297f2b4686aa50a7cdaac68b52fc4c81b2cd3dddfe9f592b34ebd

package/kernel/linux/modules/block.mk

-15
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,6 @@ endef
9090
$(eval $(call KernelPackage,ata-artop))
9191

9292

93-
define KernelPackage/ata-marvell-sata
94-
TITLE:=Marvell Serial ATA support
95-
KCONFIG:=CONFIG_SATA_MV
96-
FILES:=$(LINUX_DIR)/drivers/ata/sata_mv.ko
97-
AUTOLOAD:=$(call AutoLoad,41,sata_mv,1)
98-
$(call AddDepends/ata)
99-
endef
100-
101-
define KernelPackage/ata-marvell-sata/description
102-
SATA support for marvell chipsets
103-
endef
104-
105-
$(eval $(call KernelPackage,ata-marvell-sata))
106-
107-
10893
define KernelPackage/ata-nvidia-sata
10994
TITLE:=Nvidia Serial ATA support
11095
KCONFIG:=CONFIG_SATA_NV

package/kernel/linux/modules/other.mk

-17
Original file line numberDiff line numberDiff line change
@@ -378,23 +378,6 @@ endef
378378
$(eval $(call KernelPackage,mmc))
379379

380380

381-
define KernelPackage/mvsdio
382-
SUBMENU:=$(OTHER_MENU)
383-
TITLE:=Marvell MMC/SD/SDIO host driver
384-
DEPENDS:=+kmod-mmc @TARGET_kirkwood
385-
KCONFIG:= CONFIG_MMC_MVSDIO
386-
FILES:= \
387-
$(LINUX_DIR)/drivers/mmc/host/mvsdio.ko
388-
AUTOLOAD:=$(call AutoProbe,mvsdio,1)
389-
endef
390-
391-
define KernelPackage/mvsdio/description
392-
Kernel support for the Marvell SDIO host driver.
393-
endef
394-
395-
$(eval $(call KernelPackage,mvsdio))
396-
397-
398381
define KernelPackage/sdhci
399382
SUBMENU:=$(OTHER_MENU)
400383
TITLE:=Secure Digital Host Controller Interface support

package/kernel/ubnt-ledbar/Makefile

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#
2+
# Copyright (C) 2008-2010 OpenWrt.org
3+
#
4+
# This is free software, licensed under the GNU General Public License v2.
5+
# See /LICENSE for more information.
6+
#
7+
8+
include $(TOPDIR)/rules.mk
9+
include $(INCLUDE_DIR)/kernel.mk
10+
11+
PKG_NAME:=ubnt-ledbar
12+
PKG_RELEASE:=1
13+
PKG_LICENSE:=GPL-2.0
14+
15+
include $(INCLUDE_DIR)/package.mk
16+
17+
define KernelPackage/leds-ubnt-ledbar
18+
SUBMENU:=LED modules
19+
TITLE:=Ubiquiti UniFi 6 LR LED support
20+
FILES:= \
21+
$(PKG_BUILD_DIR)/leds-ubnt-ledbar.ko
22+
AUTOLOAD:=$(call AutoProbe,leds-ubnt-ledbar,1)
23+
DEPENDS:=+kmod-i2c-core
24+
endef
25+
26+
define KernelPackage/leds-ubnt-ledbar/description
27+
LED support for some Ubiquiti UniFi access points.
28+
endef
29+
30+
define Build/Compile
31+
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" modules
32+
endef
33+
34+
$(eval $(call KernelPackage,leds-ubnt-ledbar))
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
obj-m := leds-ubnt-ledbar.o

target/linux/mediatek/files/drivers/leds/leds-ubnt-ledbar.c package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c

+59-14
Original file line numberDiff line numberDiff line change
@@ -26,39 +26,43 @@
2626
#define UBNT_LEDBAR_MAX_BRIGHTNESS 0xff
2727

2828
#define UBNT_LEDBAR_TRANSACTION_LENGTH 8
29-
#define UBNT_LEDBAR_TRANSACTION_SUCCESS 0xaa
29+
#define UBNT_LEDBAR_TRANSACTION_SUCCESS (char) 0xaa
3030

3131
#define UBNT_LEDBAR_TRANSACTION_BLUE_IDX 2
3232
#define UBNT_LEDBAR_TRANSACTION_GREEN_IDX 3
3333
#define UBNT_LEDBAR_TRANSACTION_RED_IDX 4
34+
#define UBNT_LEDBAR_TRANSACTION_LED_COUNT_IDX 6
3435

3536
struct ubnt_ledbar {
3637
struct mutex lock;
38+
u32 led_count;
3739
struct i2c_client *client;
3840
struct led_classdev led_red;
3941
struct led_classdev led_green;
4042
struct led_classdev led_blue;
4143
struct gpio_desc *enable_gpio;
44+
struct gpio_desc *reset_gpio;
4245
};
4346

44-
static int ubnt_ledbar_perform_transaction(struct ubnt_ledbar *ledbar,
45-
char *transaction)
47+
static void ubnt_ledbar_perform_transaction(struct ubnt_ledbar *ledbar,
48+
const char *transaction, int len,
49+
char *result, int result_len)
4650
{
47-
int ret;
4851
int i;
4952

50-
for (i = 0; i < UBNT_LEDBAR_TRANSACTION_LENGTH; i++)
53+
for (i = 0; i < len; i++)
5154
i2c_smbus_write_byte(ledbar->client, transaction[i]);
5255

53-
return i2c_smbus_read_byte(ledbar->client);
56+
for (i = 0; i < result_len; i++)
57+
result[i] = i2c_smbus_read_byte(ledbar->client);
5458
}
5559

5660
static int ubnt_ledbar_apply_state(struct ubnt_ledbar *ledbar)
5761
{
5862
char setup_msg[UBNT_LEDBAR_TRANSACTION_LENGTH] = {0x40, 0x10, 0x00, 0x00,
5963
0x00, 0x00, 0x00, 0x11};
6064
char led_msg[UBNT_LEDBAR_TRANSACTION_LENGTH] = {0x40, 0x00, 0x00, 0x00,
61-
0x00, 0x00, 0x01, 0x00};
65+
0x00, 0x00, 0x00, 0x00};
6266
char i2c_response;
6367
int ret = 0;
6468

@@ -67,34 +71,63 @@ static int ubnt_ledbar_apply_state(struct ubnt_ledbar *ledbar)
6771
led_msg[UBNT_LEDBAR_TRANSACTION_BLUE_IDX] = ledbar->led_blue.brightness;
6872
led_msg[UBNT_LEDBAR_TRANSACTION_GREEN_IDX] = ledbar->led_green.brightness;
6973
led_msg[UBNT_LEDBAR_TRANSACTION_RED_IDX] = ledbar->led_red.brightness;
74+
led_msg[UBNT_LEDBAR_TRANSACTION_LED_COUNT_IDX] = ledbar->led_count;
7075

71-
gpiod_set_raw_value(ledbar->enable_gpio, 1);
76+
gpiod_set_value(ledbar->enable_gpio, 1);
7277

7378
msleep(10);
7479

75-
i2c_response = ubnt_ledbar_perform_transaction(ledbar, setup_msg);
80+
ubnt_ledbar_perform_transaction(ledbar, setup_msg, sizeof(setup_msg), &i2c_response, sizeof(i2c_response));
7681
if (i2c_response != UBNT_LEDBAR_TRANSACTION_SUCCESS) {
77-
dev_err(&ledbar->client->dev, "Error initializing LED transaction: %02x\n", ret);
82+
dev_err(&ledbar->client->dev, "Error initializing LED transaction: %02hhx\n", i2c_response);
7883
ret = -EINVAL;
7984
goto out_gpio;
8085
}
8186

82-
i2c_response = ubnt_ledbar_perform_transaction(ledbar, led_msg);
87+
ubnt_ledbar_perform_transaction(ledbar, led_msg, sizeof(led_msg), &i2c_response, sizeof(i2c_response));
8388
if (i2c_response != UBNT_LEDBAR_TRANSACTION_SUCCESS) {
84-
dev_err(&ledbar->client->dev, "Failed LED transaction: %02x\n", ret);
89+
dev_err(&ledbar->client->dev, "Failed LED transaction: %02hhx\n", i2c_response);
8590
ret = -EINVAL;
8691
goto out_gpio;
8792
}
8893

8994
msleep(10);
9095
out_gpio:
91-
gpiod_set_raw_value(ledbar->enable_gpio, 0);
96+
gpiod_set_value(ledbar->enable_gpio, 0);
9297

9398
mutex_unlock(&ledbar->lock);
9499

95100
return ret;
96101
}
97102

103+
static void ubnt_ledbar_reset(struct ubnt_ledbar *ledbar)
104+
{
105+
static const char init_msg[16] = {0x02, 0x81, 0xfd, 0x7e,
106+
0x00, 0x00, 0x00, 0x00,
107+
0x00, 0x00, 0x00, 0x00,
108+
0x00, 0x00, 0x00, 0x00};
109+
char init_response[4];
110+
111+
if (!ledbar->reset_gpio)
112+
return;
113+
114+
mutex_lock(&ledbar->lock);
115+
116+
gpiod_set_value(ledbar->reset_gpio, 1);
117+
msleep(10);
118+
gpiod_set_value(ledbar->reset_gpio, 0);
119+
120+
msleep(10);
121+
122+
gpiod_set_value(ledbar->enable_gpio, 1);
123+
msleep(10);
124+
ubnt_ledbar_perform_transaction(ledbar, init_msg, sizeof(init_msg), init_response, sizeof(init_response));
125+
msleep(10);
126+
gpiod_set_value(ledbar->enable_gpio, 0);
127+
128+
mutex_unlock(&ledbar->lock);
129+
}
130+
98131
#define UBNT_LEDBAR_CONTROL_RGBS(name) \
99132
static int ubnt_ledbar_set_##name##_brightness(struct led_classdev *led_cdev,\
100133
enum led_brightness value) \
@@ -153,14 +186,26 @@ static int ubnt_ledbar_probe(struct i2c_client *client,
153186
return ret;
154187
}
155188

156-
gpiod_direction_output(ledbar->enable_gpio, 0);
189+
ledbar->reset_gpio = devm_gpiod_get_optional(&client->dev, "reset", GPIOD_OUT_LOW);
190+
191+
if (IS_ERR(ledbar->reset_gpio)) {
192+
ret = PTR_ERR(ledbar->reset_gpio);
193+
dev_err(&client->dev, "Failed to get reset gpio: %d\n", ret);
194+
return ret;
195+
}
196+
197+
ledbar->led_count = 1;
198+
of_property_read_u32(np, "led-count", &ledbar->led_count);
157199

158200
ledbar->client = client;
159201

160202
mutex_init(&ledbar->lock);
161203

162204
i2c_set_clientdata(client, ledbar);
163205

206+
// Reset and initialize the MCU
207+
ubnt_ledbar_reset(ledbar);
208+
164209
ledbar->led_red.brightness_set_blocking = ubnt_ledbar_set_red_brightness;
165210
ubnt_ledbar_init_led(of_get_child_by_name(np, "red"), ledbar, &ledbar->led_red);
166211

target/linux/generic/backport-5.10/414-v6.1-mtd-allow-getting-MTD-device-associated-with-a-speci.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Signed-off-by: Srinivas Kandagatla <[email protected]>
2525

2626
--- a/drivers/mtd/mtdcore.c
2727
+++ b/drivers/mtd/mtdcore.c
28-
@@ -1070,6 +1070,34 @@ int __get_mtd_device(struct mtd_info *mt
28+
@@ -1009,6 +1009,34 @@ int __get_mtd_device(struct mtd_info *mt
2929
EXPORT_SYMBOL_GPL(__get_mtd_device);
3030

3131
/**

target/linux/generic/backport-5.15/703-00-v5.16-net-convert-users-of-bitmap_foo-to-linkmode_foo.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ Signed-off-by: David S. Miller <[email protected]>
637637
static void macb_usx_pcs_link_up(struct phylink_pcs *pcs, unsigned int mode,
638638
--- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c
639639
+++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c
640-
@@ -940,7 +940,7 @@ static void enetc_pl_mac_validate(struct
640+
@@ -968,7 +968,7 @@ static void enetc_pl_mac_validate(struct
641641
state->interface != PHY_INTERFACE_MODE_2500BASEX &&
642642
state->interface != PHY_INTERFACE_MODE_USXGMII &&
643643
!phy_interface_mode_is_rgmii(state->interface)) {
@@ -646,7 +646,7 @@ Signed-off-by: David S. Miller <[email protected]>
646646
return;
647647
}
648648

649-
@@ -963,10 +963,8 @@ static void enetc_pl_mac_validate(struct
649+
@@ -991,10 +991,8 @@ static void enetc_pl_mac_validate(struct
650650
phylink_set(mask, 2500baseX_Full);
651651
}
652652

0 commit comments

Comments
 (0)