[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <edc6aa22-3a9a-2a99-ccca-1bd3bf07f04b@ti.com>
Date: Mon, 16 Sep 2019 13:34:53 -0500
From: Dan Murphy <dmurphy@...com>
To: Jacek Anaszewski <jacek.anaszewski@...il.com>, <pavel@....cz>
CC: <robh+dt@...nel.org>, <linux-leds@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 6/9] leds: multicolor: Introduce a multicolor class
definition
Jacek
On 9/15/19 11:20 AM, Jacek Anaszewski wrote:
>
>> +
>> +static int led_multicolor_init_color(struct led_classdev_mc_data *data,
>> + struct led_classdev_mc *mcled_cdev,
>> + int color_id, int color_index)
>> +{
>> + struct led_classdev *led_cdev = mcled_cdev->led_cdev;
>> + struct led_classdev_mc_priv *mc_priv;
>> + int ret;
>> +
>> + mc_priv = devm_kzalloc(led_cdev->dev, sizeof(*mc_priv), GFP_KERNEL);
>> + if (!mc_priv)
>> + return -ENOMEM;
>> +
>> + mc_priv->led_color_id = color_id;
>> + mc_priv->mcled_cdev = mcled_cdev;
>> +
>> + data->led_kobj = kobject_create_and_add(led_colors[color_id],
>> + data->color_kobj);
> No change here since previous version? What prevents you from following
> what has been done for drivers/usb/core/ledtrig-usbport.c?
>
> Use sysfs_create_group() for creating color dir
> and sysfs_add_file_to_group() for adding files to it.
We have nested directories here. colors is a directory and then the LED
color is a directory.
So I am not sure how to create a group under another group without the
colors directory kobj.
Wondering if you know of any examples?
Dan
Powered by blists - more mailing lists