lkml.org 
[lkml]   [2021]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [v2,1/1] adv_mix955x is a scheme that multiplexes PCA9554/PCA9555 into LED and GPIO
On Tue 2021-04-27 08:32:05, yuechao.zhao(赵越超) wrote:
> From: Yuechao Zhao <yuechao.zhao@advantech.com.cn>
>
> With this driver, we can multiplex PCA9554/PCA9555 into LED and GPIO based on the ACPI data of BIOS.
>
> Signed-off-by: Yuechao Zhao <yuechao.zhao@advantech.com.cn>
> Signed-off-by: Sui Jia <jia.sui@advantech.com.cn>

Please Cc LED drivers to the LED maintainers...

> +
> +static inline u8 amix955x_set_bit(u8 val, int led_id, enum AMIX955X_LED
> +state) {
> + led_id %= BANK_SIZE;
> +
> + switch (state) {
> + case AMIX955X_LED_ON:
> + val &= ~(1 << led_id); //Clear bit
> + break;
> + case AMIX955X_LED_OFF:
> + val |= 1 << led_id; //Set bit
> + break;
> + }
> +
> + return val;

Please check CodingStyle, avoid useless comments and check word
wrapping in your email settings.

Best regards,
Pavel

--
http://www.livejournal.com/~pavelmachek
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-04-27 15:55    [W:0.108 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site