Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable building linux-system76 for arm64 #314

Merged
merged 2 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion debian.master/control.stub.in
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Description: Complete Generic Linux kernel and headers

Package: SRCPKGNAME-system76
Build-Profiles: <!stage1>
Architecture: amd64
Architecture: amd64 arm64
Section: kernel
Depends:
${misc:Depends},
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Description: Complete Generic Linux kernel and headers

Package: linux-system76
Build-Profiles: <!stage1>
Architecture: amd64
Architecture: amd64 arm64
Section: kernel
Depends:
${misc:Depends},
Expand Down
7 changes: 7 additions & 0 deletions drivers/leds/led-class.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,10 @@ int led_classdev_register_ext(struct device *parent,
fwnode_property_read_u32(init_data->fwnode,
"max-brightness",
&led_cdev->max_brightness);

if (fwnode_property_present(init_data->fwnode, "color"))
fwnode_property_read_u32(init_data->fwnode, "color",
&led_cdev->color);
}
} else {
proposed_name = led_cdev->name;
Expand All @@ -500,6 +504,9 @@ int led_classdev_register_ext(struct device *parent,
if (ret < 0)
return ret;

if (led_cdev->color >= LED_COLOR_ID_MAX)
dev_warn(parent, "LED %s color identifier out of range\n", final_name);

mutex_init(&led_cdev->led_access);
mutex_lock(&led_cdev->led_access);
led_cdev->dev = device_create_with_groups(&leds_class, parent, 0,
Expand Down
1 change: 1 addition & 0 deletions include/linux/leds.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ struct led_classdev {
const char *name;
unsigned int brightness;
unsigned int max_brightness;
unsigned int color;
int flags;

/* Lower 16 bits reflect status */
Expand Down