mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
To: Lee Jones <lee@kernel.org>
Cc: <pavel@ucw.cz>, <robh+dt@kernel.org>,
	<krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>,
	<linux-leds@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v9 5/5] leds: Add a multicolor LED driver to group monochromatic LEDs
Date: Thu, 22 Jun 2023 19:49:12 +0200	[thread overview]
Message-ID: <e9d23080-3916-f8ff-e179-4572d02c57b0@traphandler.com> (raw)
In-Reply-To: <20230621193321.GU10378@google.com>



On 21/06/2023 21:33, Lee Jones wrote:
> On Fri, 16 Jun 2023, Jean-Jacques Hiblot wrote:
> 
>>   create mode 100644 drivers/leds/rgb/leds-group-multicolor.c
> 
> Sorry to do this too you, but there are too many nits that I can't pass by.
That's alright. I'll fix them in the next (hopefully last) round
> 
>> +		/* Restore sysfs access when the multicolor LED is released */
> 

> Out of interest, why are we doing this?
To prevent the user to play with the individual LEDs of the group, their 
sysfs interface is disabled (read-only). The interface must be 
re-enabled when the group is destroyed.
> 
>> +		devm_add_action_or_reset(dev, restore_sysfs_access, led_cdev);
>> +	}
>> +
>> +	return 0;
>> +}
>> +
>> +static const struct of_device_id of_led_group_multicolor_match[] = {
> 
> "leds"
> 
>> +	{ .compatible = "leds-group-multicolor" },
>> +	{}
>> +};
>> +MODULE_DEVICE_TABLE(of, of_led_group_multicolor_match);
>> +
>> +static struct platform_driver led_group_multicolor_driver = {
> 
> "leds"
> 
>> +	.probe		= led_mcg_probe,
>> +	.driver		= {
>> +		.name	= "leds_group_multicolor",
>> +		.of_match_table = of_led_group_multicolor_match,
>> +	}
>> +};
>> +module_platform_driver(led_group_multicolor_driver);
>> +
>> +MODULE_AUTHOR("Jean-Jacques Hiblot <jjhiblot@traphandler.com>");
>> +MODULE_DESCRIPTION("LEDs group multicolor driver");
>> +MODULE_LICENSE("GPL");
>> +MODULE_ALIAS("platform:leds-group-multicolor");
>> -- 
>> 2.34.1
>>
> 

  reply	other threads:[~2023-06-22 18:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16  9:57 [PATCH v9 0/5] Add a multicolor LED driver for groups of " Jean-Jacques Hiblot
2023-06-16  9:57 ` [PATCH v9 1/5] devres: provide devm_krealloc_array() Jean-Jacques Hiblot
2023-06-16  9:57 ` [PATCH v9 2/5] leds: provide devm_of_led_get_optional() Jean-Jacques Hiblot
2023-06-16  9:57 ` [PATCH v9 3/5] leds: class: store the color index in struct led_classdev Jean-Jacques Hiblot
2023-06-16  9:57 ` [PATCH v9 4/5] dt-bindings: leds: Add binding for a multicolor group of LEDs Jean-Jacques Hiblot
2023-06-16  9:57 ` [PATCH v9 5/5] leds: Add a multicolor LED driver to group monochromatic LEDs Jean-Jacques Hiblot
2023-06-21 19:33   ` Lee Jones
2023-06-22 17:49     ` Jean-Jacques Hiblot [this message]
2023-06-26 15:42       ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e9d23080-3916-f8ff-e179-4572d02c57b0@traphandler.com \
    --to=jjhiblot@traphandler.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®