Re: [PATCH v3 2/2] leds: Add LED1202 I2C driverr

From: Markus Elfring
Date: Sun Jul 21 2024 - 09:55:59 EST


> The LED1202 is a 12-channel low quiescent current LED driver.


1. How do you think about to improve such a change description with imperative wordings?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10#n94

2. Would you like to avoid a typo in the summary phrase?



> +++ b/drivers/leds/leds-st1202.c
> @@ -0,0 +1,899 @@

> +#define ST1202_LED_CHANNEL_10 10
> +#define ST1202_LED_CHANNEL_11 11
> +#define ST1202_MAX_LEDS 12

> +#define ST1202_PATTERN_6 6
> +#define ST1202_PATTERN_7 7
> +#define ST1202_PATTERNS_NR 8

Can such identifiers be a bit nicer as part of enumerations?




> +static ssize_t st1202_patt_seq_rep_show(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{

> + chip = dev_get_drvdata(dev);
> +
> + mutex_lock(&chip->lock);

> + mutex_unlock(&chip->lock);


Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&chip->lock);”?
https://elixir.bootlin.com/linux/v6.10/source/include/linux/mutex.h#L196

Regards,
Markus