public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] Introduce and use device_create_groups
@ 2013-07-06 17:24 Guenter Roeck
  2013-07-06 17:24 ` [RFC PATCH 1/5] driver core: Introduce device_create_groups Guenter Roeck
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Guenter Roeck @ 2013-07-06 17:24 UTC (permalink / raw)
  To: Jean Delvare, Greg Kroah-Hartman; +Cc: lm-sensors, linux-kernel, Guenter Roeck

This patch series introduces the new driver core API function
device_create_groups().

device_create_groups() lets callers create devices as well as associated
sysfs attributes with a single call. This avoids potential race conditions
seen if sysfs attributes on new devices are created later.

The rationale for the new API is that sysfs attributes should be created
synchronously with device creation to avoid race conditions, as outlined in
http://www.linuxfoundation.org/news-media/blogs/browse/2013/06/how-create-sysfs-file-correctly.

Unfortunately, the only API function to create a device dynamically is
device_create, which does not support the notion of adding sysfs attributes
when creating a device. The new API call is similar but lets the caller provide
a list of sysfs attribute groups.

The first patch in the series introduces the new driver core API function.

The second patch introduces hwmon_device_register_groups(), which uses the new
API call.

The remaining patches convert some hwmon drivers to use the new API to show and
test its use.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-07-06 20:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-06 17:24 [RFC PATCH 0/5] Introduce and use device_create_groups Guenter Roeck
2013-07-06 17:24 ` [RFC PATCH 1/5] driver core: Introduce device_create_groups Guenter Roeck
2013-07-06 17:47   ` Greg Kroah-Hartman
2013-07-06 19:22     ` Guenter Roeck
2013-07-06 17:24 ` [RFC PATCH 2/5] hwmon: Introduce hwmon_device_register_groups Guenter Roeck
2013-07-06 17:24 ` [RFC PATCH 3/5] hwmon: (ds1621) Convert to use hwmon_device_register_groups Guenter Roeck
2013-07-06 17:57   ` Greg Kroah-Hartman
2013-07-06 18:01     ` Jean Delvare
2013-07-06 19:18       ` Guenter Roeck
2013-07-06 19:31         ` Greg Kroah-Hartman
2013-07-06 19:48           ` Guenter Roeck
2013-07-06 19:59             ` Jean Delvare
2013-07-06 20:14               ` Guenter Roeck
2013-07-06 19:54           ` Jean Delvare
2013-07-06 20:45             ` Guenter Roeck
2013-07-06 17:24 ` [RFC PATCH 4/5] hwmon: (gpio-fan) " Guenter Roeck
2013-07-06 17:24 ` [RFC PATCH 5/5] hwmon: (ltc4245) " Guenter Roeck
2013-07-06 17:33 ` [RFC PATCH 0/5] Introduce and use device_create_groups Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox