Thread (31 messages) 31 messages, 5 authors, 2019-02-13

Re: [PATCH v3 09/11] leds: max77650: add LEDs support

From: Pavel Machek <hidden>
Date: 2019-02-12 12:10:37
Also in: linux-devicetree, linux-gpio, linux-leds, linux-pm, lkml

Hi!

quoted
quoted
+static struct max77650_led *max77650_to_led(struct led_classdev *cdev)
+{
+    return container_of(cdev, struct max77650_led, cdev);
+}
+
+static int max77650_led_brightness_set(struct led_classdev *cdev,
+                       enum led_brightness brightness)
+{
+    struct max77650_led *led = max77650_to_led(cdev);
+    int val, mask;
+
The register value and bits are only 8 bit why an int?
int is word size CPU prefers. It is ok here. If you force u8, it may
actually result in slower/bigger code.
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help