diff --git a/handheld.patch b/handheld.patch index eb8a83b48..9f1ff5a9d 100644 --- a/handheld.patch +++ b/handheld.patch @@ -11005,6 +11005,66 @@ index fda9dce3da99..e52fb045096a 100644 2.47.0 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Mon, 2 Dec 2024 19:27:56 +0100 +Subject: hwmon: (oxp-sensors) Add other OneXFly models + +Signed-off-by: Antheas Kapenekakis +--- + drivers/hwmon/oxp-sensors.c | 35 +++++++++++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) + +diff --git a/drivers/hwmon/oxp-sensors.c b/drivers/hwmon/oxp-sensors.c +index b6d06370469d..37a3a80457bd 100644 +--- a/drivers/hwmon/oxp-sensors.c ++++ b/drivers/hwmon/oxp-sensors.c +@@ -188,6 +188,41 @@ static const struct dmi_system_id dmi_table[] = { + }, + .driver_data = (void *)oxp_fly, + }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), ++ DMI_MATCH(DMI_BOARD_NAME, "ONEXPLAYER F1 "), ++ }, ++ .driver_data = (void *)oxp_fly, ++ }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), ++ DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER F1L"), ++ }, ++ .driver_data = (void *)oxp_fly, ++ }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), ++ DMI_MATCH(DMI_BOARD_NAME, "ONEXPLAYER F1L "), ++ }, ++ .driver_data = (void *)oxp_fly, ++ }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), ++ DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER F1Pro"), ++ }, ++ .driver_data = (void *)oxp_fly, ++ }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), ++ DMI_MATCH(DMI_BOARD_NAME, "ONEXPLAYER F1Pro "), ++ }, ++ .driver_data = (void *)oxp_fly, ++ }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), +-- +2.47.0 + + From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Sat, 26 Oct 2024 17:34:05 +0200 @@ -11012,8 +11072,8 @@ Subject: hwmon: (oxp-sensors) Add charge threshold and bypass to X1 models --- Documentation/ABI/testing/sysfs-class-power | 5 +- - drivers/hwmon/oxp-sensors.c | 206 +++++++++++++++++++- - 2 files changed, 205 insertions(+), 6 deletions(-) + drivers/hwmon/oxp-sensors.c | 230 +++++++++++++++++++- + 2 files changed, 227 insertions(+), 8 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power index 7c81f0a25a48..85b765df0d45 100644 @@ -11037,7 +11097,7 @@ index 7c81f0a25a48..85b765df0d45 100644 What: /sys/class/power_supply//charge_term_current Date: July 2014 diff --git a/drivers/hwmon/oxp-sensors.c b/drivers/hwmon/oxp-sensors.c -index b6d06370469d..281bf54a0a18 100644 +index 37a3a80457bd..0501cbb41fcc 100644 --- a/drivers/hwmon/oxp-sensors.c +++ b/drivers/hwmon/oxp-sensors.c @@ -27,6 +27,8 @@ @@ -11049,7 +11109,15 @@ index b6d06370469d..281bf54a0a18 100644 /* Handle ACPI lock mechanism */ static u32 oxp_mutex; -@@ -89,6 +91,31 @@ static enum oxp_board board; +@@ -55,6 +57,7 @@ enum oxp_board { + orange_pi_neo, + oxp_2, + oxp_fly, ++ oxp_fly_pro, + oxp_mini_amd, + oxp_mini_amd_a07, + oxp_mini_amd_pro, +@@ -89,6 +92,35 @@ static enum oxp_board board; #define OXP_TURBO_RETURN_VAL 0x00 /* Common return val */ @@ -11057,7 +11125,12 @@ index b6d06370469d..281bf54a0a18 100644 +#define OXP_X1_CHARGE_BYPASS_REG 0xA4 /* X1 bypass charging */ + +#define OXP_X1_CHARGE_BYPASS_MASK_S0 0x01 -+#define OXP_X1_CHARGE_BYPASS_MASK_S3S5 0x0A /* Cannot control S3, S5 individually. */ ++/* ++ * Cannot control S3, S5 individually. ++ * X1 Mask is 0x0A, OneXFly F1Pro is just 0x02 ++ * but the extra bit on the X1 does nothing. ++ */ ++#define OXP_X1_CHARGE_BYPASS_MASK_S3S5 0x02 + +enum charge_type_value_index { + CT_OFF, @@ -11076,12 +11149,60 @@ index b6d06370469d..281bf54a0a18 100644 + [CT_S0] = "BypassS0", + [CT_S5] = "Bypass", +}; -+ + static const struct dmi_system_id dmi_table[] = { { .matches = { -@@ -380,6 +407,172 @@ static ssize_t tt_toggle_show(struct device *dev, +@@ -214,14 +246,14 @@ static const struct dmi_system_id dmi_table[] = { + DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), + DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER F1Pro"), + }, +- .driver_data = (void *)oxp_fly, ++ .driver_data = (void *)oxp_fly_pro, + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), + DMI_MATCH(DMI_BOARD_NAME, "ONEXPLAYER F1Pro "), + }, +- .driver_data = (void *)oxp_fly, ++ .driver_data = (void *)oxp_fly_pro, + }, + { + .matches = { +@@ -300,6 +332,7 @@ static int tt_toggle_enable(void) + break; + case aok_zoe_a1: + case oxp_fly: ++ case oxp_fly_pro: + case oxp_mini_amd_pro: + reg = OXP_TURBO_SWITCH_REG; + val = OXP_TURBO_TAKE_VAL; +@@ -327,6 +360,7 @@ static int tt_toggle_disable(void) + break; + case aok_zoe_a1: + case oxp_fly: ++ case oxp_fly_pro: + case oxp_mini_amd_pro: + reg = OXP_TURBO_SWITCH_REG; + val = OXP_TURBO_RETURN_VAL; +@@ -350,6 +384,7 @@ static umode_t tt_toggle_is_visible(struct kobject *kobj, + case aok_zoe_a1: + case oxp_2: + case oxp_fly: ++ case oxp_fly_pro: + case oxp_mini_amd_a07: + case oxp_mini_amd_pro: + case oxp_x1: +@@ -395,6 +430,7 @@ static ssize_t tt_toggle_show(struct device *dev, + break; + case aok_zoe_a1: + case oxp_fly: ++ case oxp_fly_pro: + case oxp_mini_amd_pro: + reg = OXP_TURBO_SWITCH_REG; + break; +@@ -415,6 +451,177 @@ static ssize_t tt_toggle_show(struct device *dev, static DEVICE_ATTR_RW(tt_toggle); @@ -11090,6 +11211,7 @@ index b6d06370469d..281bf54a0a18 100644 +{ + switch (board) { + case oxp_x1: ++ case oxp_fly_pro: + return 1; + default: + break; @@ -11111,6 +11233,7 @@ index b6d06370469d..281bf54a0a18 100644 + + switch (board) { + case oxp_x1: ++ case oxp_fly_pro: + val = charge_type_values_x1[ret]; + reg = OXP_X1_CHARGE_BYPASS_REG; + break; @@ -11136,6 +11259,7 @@ index b6d06370469d..281bf54a0a18 100644 + + switch (board) { + case oxp_x1: ++ case oxp_fly_pro: + vals = charge_type_values_x1; + reg = OXP_X1_CHARGE_BYPASS_REG; + break; @@ -11176,6 +11300,7 @@ index b6d06370469d..281bf54a0a18 100644 + + switch (board) { + case oxp_x1: ++ case oxp_fly_pro: + reg = OXP_X1_CHARGE_LIMIT_REG; + break; + default: @@ -11198,6 +11323,7 @@ index b6d06370469d..281bf54a0a18 100644 + + switch (board) { + case oxp_x1: ++ case oxp_fly_pro: + reg = OXP_X1_CHARGE_LIMIT_REG; + break; + default: @@ -11254,7 +11380,55 @@ index b6d06370469d..281bf54a0a18 100644 /* PWM enable/disable functions */ static int oxp_pwm_enable(void) { -@@ -623,18 +816,18 @@ static const struct hwmon_channel_info * const oxp_platform_sensors[] = { +@@ -431,6 +638,7 @@ static int oxp_pwm_enable(void) + case aya_neo_kun: + case oxp_2: + case oxp_fly: ++ case oxp_fly_pro: + case oxp_mini_amd: + case oxp_mini_amd_a07: + case oxp_mini_amd_pro: +@@ -457,6 +665,7 @@ static int oxp_pwm_disable(void) + case aya_neo_kun: + case oxp_2: + case oxp_fly: ++ case oxp_fly_pro: + case oxp_mini_amd: + case oxp_mini_amd_a07: + case oxp_mini_amd_pro: +@@ -506,6 +715,7 @@ static int oxp_platform_read(struct device *dev, enum hwmon_sensor_types type, + case aya_neo_geek: + case aya_neo_kun: + case oxp_fly: ++ case oxp_fly_pro: + case oxp_mini_amd: + case oxp_mini_amd_a07: + case oxp_mini_amd_pro: +@@ -554,6 +764,7 @@ static int oxp_platform_read(struct device *dev, enum hwmon_sensor_types type, + break; + case aok_zoe_a1: + case oxp_fly: ++ case oxp_fly_pro: + case oxp_mini_amd_pro: + default: + ret = read_from_ec(OXP_SENSOR_PWM_REG, 1, val); +@@ -577,6 +788,7 @@ static int oxp_platform_read(struct device *dev, enum hwmon_sensor_types type, + case aya_neo_kun: + case oxp_2: + case oxp_fly: ++ case oxp_fly_pro: + case oxp_mini_amd: + case oxp_mini_amd_a07: + case oxp_mini_amd_pro: +@@ -634,6 +846,7 @@ static int oxp_platform_write(struct device *dev, enum hwmon_sensor_types type, + return write_to_ec(OXP_SENSOR_PWM_REG, val); + case aok_zoe_a1: + case oxp_fly: ++ case oxp_fly_pro: + case oxp_mini_amd_pro: + return write_to_ec(OXP_SENSOR_PWM_REG, val); + default: +@@ -658,18 +871,18 @@ static const struct hwmon_channel_info * const oxp_platform_sensors[] = { NULL, }; @@ -11277,7 +11451,7 @@ index b6d06370469d..281bf54a0a18 100644 NULL }; -@@ -693,6 +886,9 @@ static int __init oxp_platform_init(void) +@@ -728,6 +941,9 @@ static int __init oxp_platform_init(void) platform_create_bundle(&oxp_platform_driver, oxp_platform_probe, NULL, 0, NULL, 0); @@ -11287,7 +11461,7 @@ index b6d06370469d..281bf54a0a18 100644 return PTR_ERR_OR_ZERO(oxp_platform_device); } -@@ -700,6 +896,8 @@ static void __exit oxp_platform_exit(void) +@@ -735,6 +951,8 @@ static void __exit oxp_platform_exit(void) { platform_device_unregister(oxp_platform_device); platform_driver_unregister(&oxp_platform_driver); @@ -11306,16 +11480,16 @@ Date: Sat, 26 Oct 2024 17:48:36 +0200 Subject: hwmon: (oxp-sensors) Add turbo led support (partial; for X1) --- - drivers/hwmon/oxp-sensors.c | 62 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 62 insertions(+) + drivers/hwmon/oxp-sensors.c | 60 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 60 insertions(+) diff --git a/drivers/hwmon/oxp-sensors.c b/drivers/hwmon/oxp-sensors.c -index 281bf54a0a18..282389f9375d 100644 +index 0501cbb41fcc..bea31c51c374 100644 --- a/drivers/hwmon/oxp-sensors.c +++ b/drivers/hwmon/oxp-sensors.c -@@ -97,6 +97,11 @@ static enum oxp_board board; - #define OXP_X1_CHARGE_BYPASS_MASK_S0 0x01 - #define OXP_X1_CHARGE_BYPASS_MASK_S3S5 0x0A /* Cannot control S3, S5 individually. */ +@@ -103,6 +103,11 @@ static enum oxp_board board; + */ + #define OXP_X1_CHARGE_BYPASS_MASK_S3S5 0x02 +#define OXP_X1_TURBO_LED_REG 0x57 /* X1 Turbo LED */ + @@ -11325,7 +11499,7 @@ index 281bf54a0a18..282389f9375d 100644 enum charge_type_value_index { CT_OFF, CT_S0, -@@ -407,6 +412,62 @@ static ssize_t tt_toggle_show(struct device *dev, +@@ -451,6 +456,60 @@ static ssize_t tt_toggle_show(struct device *dev, static DEVICE_ATTR_RW(tt_toggle); @@ -11342,7 +11516,6 @@ index 281bf54a0a18..282389f9375d 100644 + return rval; + + switch (board) { -+ case oxp_2: + case oxp_x1: + reg = OXP_X1_TURBO_LED_REG; + val = value ? OXP_X1_TURBO_LED_ON : OXP_X1_TURBO_LED_OFF; @@ -11367,7 +11540,6 @@ index 281bf54a0a18..282389f9375d 100644 + long val; + + switch (board) { -+ case oxp_2: + case oxp_x1: + reg = OXP_2_TURBO_SWITCH_REG; + enval = OXP_X1_TURBO_LED_ON; @@ -11388,7 +11560,7 @@ index 281bf54a0a18..282389f9375d 100644 /* Callbacks for turbo toggle attribute */ static bool charge_control_supported(void) { -@@ -818,6 +879,7 @@ static const struct hwmon_channel_info * const oxp_platform_sensors[] = { +@@ -873,6 +932,7 @@ static const struct hwmon_channel_info * const oxp_platform_sensors[] = { static struct attribute *oxp_turbo_attrs[] = { &dev_attr_tt_toggle.attr, @@ -11400,66 +11572,6 @@ index 281bf54a0a18..282389f9375d 100644 2.47.0 -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Antheas Kapenekakis -Date: Mon, 2 Dec 2024 19:27:56 +0100 -Subject: hwmon: (oxp-sensors) Add other OneXFly models - -Signed-off-by: Antheas Kapenekakis ---- - drivers/hwmon/oxp-sensors.c | 35 +++++++++++++++++++++++++++++++++++ - 1 file changed, 35 insertions(+) - -diff --git a/drivers/hwmon/oxp-sensors.c b/drivers/hwmon/oxp-sensors.c -index 282389f9375d..b95f19568927 100644 ---- a/drivers/hwmon/oxp-sensors.c -+++ b/drivers/hwmon/oxp-sensors.c -@@ -220,6 +220,41 @@ static const struct dmi_system_id dmi_table[] = { - }, - .driver_data = (void *)oxp_fly, - }, -+ { -+ .matches = { -+ DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), -+ DMI_MATCH(DMI_BOARD_NAME, "ONEXPLAYER F1 "), -+ }, -+ .driver_data = (void *)oxp_fly, -+ }, -+ { -+ .matches = { -+ DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), -+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER F1L"), -+ }, -+ .driver_data = (void *)oxp_fly, -+ }, -+ { -+ .matches = { -+ DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), -+ DMI_MATCH(DMI_BOARD_NAME, "ONEXPLAYER F1L "), -+ }, -+ .driver_data = (void *)oxp_fly, -+ }, -+ { -+ .matches = { -+ DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), -+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER F1Pro"), -+ }, -+ .driver_data = (void *)oxp_fly, -+ }, -+ { -+ .matches = { -+ DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), -+ DMI_MATCH(DMI_BOARD_NAME, "ONEXPLAYER F1Pro "), -+ }, -+ .driver_data = (void *)oxp_fly, -+ }, - { - .matches = { - DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), --- -2.47.0 - - From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Tue, 22 Oct 2024 18:00:46 +0200 diff --git a/kernel.spec b/kernel.spec index 492513ff4..cc6b13a22 100644 --- a/kernel.spec +++ b/kernel.spec @@ -170,7 +170,7 @@ Summary: The Linux kernel # This is needed to do merge window version magic %define patchlevel 11 # This allows pkg_release to have configurable %%{?dist} tag -%define specrelease 303%{?buildid}%{?dist} +%define specrelease 304%{?buildid}%{?dist} # This defines the kabi tarball version %define kabiversion 6.11.10