<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/base.h, branch v4.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-05-27T19:37:18Z</updated>
<entry>
<title>driver core: Move driver_data back to struct device</title>
<updated>2014-05-27T19:37:18Z</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2014-04-14T10:54:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1bb6c08abfb653ce6e65d8ab4ddef403227afedf'/>
<id>urn:sha1:1bb6c08abfb653ce6e65d8ab4ddef403227afedf</id>
<content type='text'>
Having to allocate memory as part of dev_set_drvdata() is a problem
because that memory may never get freed if the device itself is not
created. So move driver_data back to struct device.

This is a partial revert of commit b4028437.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ACPI / hotplug / driver core: Handle containers in a special way</title>
<updated>2013-12-29T14:25:48Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2013-12-29T14:25:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=caa73ea158de9419f08e456f2716c71d1f06012a'/>
<id>urn:sha1:caa73ea158de9419f08e456f2716c71d1f06012a</id>
<content type='text'>
ACPI container devices require special hotplug handling, at least
on some systems, since generally user space needs to carry out
system-specific cleanup before it makes sense to offline devices in
the container.  However, the current ACPI hotplug code for containers
first attempts to offline devices in the container and only then it
notifies user space of the container offline.

Moreover, after commit 202317a573b2 (ACPI / scan: Add acpi_device
objects for all device nodes in the namespace), ACPI device objects
representing containers are present as long as the ACPI namespace
nodes corresponding to them are present, which may be forever, even
if the container devices are physically detached from the system (the
return values of the corresponding _STA methods change in those
cases, but generally the namespace nodes themselves are still there).
Thus it is useful to introduce entities representing containers that
will go away during container hot-unplug.

The goal of this change is to address both the above issues.

The idea is to create a "companion" container system device for each
of the ACPI container device objects during the initial namespace
scan or on a hotplug event making the container present.  That system
device will be unregistered on container removal.  A new bus type
for container devices is added for this purpose, because device
offline and online operations need to be defined for them.  The
online operation is a trivial function that is always successful
and the offline uses a callback pointed to by the container device's
offline member.

For ACPI containers that callback simply walks the list of ACPI
device objects right below the container object (its children) and
checks if all of their physical companion devices are offline.  If
that's not the case, it returns -EBUSY and the container system
devivce cannot be put offline.  Consequently, to put the container
system device offline, it is necessary to put all of the physical
devices depending on its ACPI companion object offline beforehand.

Container system devices created for ACPI container objects are
initially online.  They are created by the container ACPI scan
handler whose hotplug.demand_offline flag is set.  That causes
acpi_scan_hot_remove() to check if the companion container system
device is offline before attempting to remove an ACPI container or
any devices below it.  If the check fails, a KOBJ_CHANGE uevent is
emitted for the container system device in question and user space
is expected to offline all devices below the container and the
container itself in response to it.  Then, user space can finalize
the removal of the container with the help of its ACPI device
object's eject attribute in sysfs.

Tested-by: Yasuaki Ishimatsu &lt;isimatu.yasuaki@jp.fujitsu.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: bus_type: add drv_groups</title>
<updated>2013-08-12T22:33:31Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-08-08T22:22:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ed0617b5c0bcd7fd04053568aa0cc19a977a1f26'/>
<id>urn:sha1:ed0617b5c0bcd7fd04053568aa0cc19a977a1f26</id>
<content type='text'>
attribute groups are much more flexible than just a list of attributes,
due to their support for visibility of the attributes, and binary
attributes. Add drv_groups to struct bus_type which should be used
instead of drv_attrs.

drv_attrs will be removed from the structure soon.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: bus_type: add dev_groups</title>
<updated>2013-08-12T22:33:31Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-08-08T22:22:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fa6fdb33b486a8afc5439c504da8d581e142c77d'/>
<id>urn:sha1:fa6fdb33b486a8afc5439c504da8d581e142c77d</id>
<content type='text'>
attribute groups are much more flexible than just a list of attributes,
due to their support for visibility of the attributes, and binary
attributes. Add dev_groups to struct bus_type which should be used
instead of dev_attrs.

dev_attrs will be removed from the structure soon.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver/base: implement subsys_virtual_register()</title>
<updated>2013-03-12T18:36:35Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2013-03-12T18:30:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d73ce004225a7b2ed75f4340bb63721d55552265'/>
<id>urn:sha1:d73ce004225a7b2ed75f4340bb63721d55552265</id>
<content type='text'>
Kay tells me the most appropriate place to expose workqueues to
userland would be /sys/devices/virtual/workqueues/WQ_NAME which is
symlinked to /sys/bus/workqueue/devices/WQ_NAME and that we're lacking
a way to do that outside of driver core as virtual_device_parent()
isn't exported and there's no inteface to conveniently create a
virtual subsystem.

This patch implements subsys_virtual_register() by factoring out
subsys_register() from subsys_system_register() and using it with
virtual_device_parent() as the origin directory.  It's identical to
subsys_system_register() other than the origin directory but we aren't
gonna restrict the device names which should be used under it.

This will be used to expose workqueue attributes to userland.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
</content>
</entry>
<entry>
<title>driver core: move the deferred probe pointer into the private area</title>
<updated>2012-03-08T20:17:22Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-03-08T20:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ef8a3fd6e5e12e8989dae97ba5491c2e39369af9'/>
<id>urn:sha1:ef8a3fd6e5e12e8989dae97ba5491c2e39369af9</id>
<content type='text'>
Nothing outside of the driver core needs to get to the deferred probe
pointer, so move it inside the private area of 'struct device' so no one
tries to mess around with it.

Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivercore: Add driver probe deferral mechanism</title>
<updated>2012-03-08T19:53:13Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2012-03-05T15:47:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d1c3414c2a9d10ef7f0f7665f5d2947cd088c093'/>
<id>urn:sha1:d1c3414c2a9d10ef7f0f7665f5d2947cd088c093</id>
<content type='text'>
Allow drivers to report at probe time that they cannot get all the resources
required by the device, and should be retried at a later time.

This should completely solve the problem of getting devices
initialized in the right order.  Right now this is mostly handled by
mucking about with initcall ordering which is a complete hack, and
doesn't even remotely handle the case where device drivers are in
modules.  This approach completely sidesteps the issues by allowing
driver registration to occur in any order, and any driver can request
to be retried after a few more other drivers get probed.

v4: - Integrate Manjunath's addition of a separate workqueue
    - Change -EAGAIN to -EPROBE_DEFER for drivers to trigger deferral
    - Update comment blocks to reflect how the code really works
v3: - Hold off workqueue scheduling until late_initcall so that the bulk
      of driver probes are complete before we start retrying deferred devices.
    - Tested with simple use cases.  Still needs more testing though.
      Using it to get rid of the gpio early_initcall madness, or to replace
      the ASoC internal probe deferral code would be ideal.
v2: - added locking so it should no longer be utterly broken in that regard
    - remove device from deferred list at device_del time.
    - Still completely untested with any real use case, but has been
      boot tested.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Dilan Lee &lt;dilee@nvidia.com&gt;
Cc: Manjunath GKondaiah &lt;manjunath.gkondaiah@linaro.org&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Reviewed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: David Daney &lt;david.daney@cavium.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cpu: Do not return errors from cpu_dev_init() which will be ignored</title>
<updated>2012-01-11T23:49:43Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2012-01-10T02:59:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=024f78462c3da710642a54939888a92e28704653'/>
<id>urn:sha1:024f78462c3da710642a54939888a92e28704653</id>
<content type='text'>
cpu_dev_init() is only called from driver_init(), which does not check
its return value.  Therefore make cpu_dev_init() return void.

We must register the CPU subsystem, so panic if this fails.

If sched_create_sysfs_power_savings_entries() fails, the damage is
contained, so ignore this (as before).

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>driver-core: implement 'sysdev' functionality for regular devices and buses</title>
<updated>2011-12-14T22:29:38Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2011-12-14T22:29:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ca22e56debc57b47c422b749c93217ba62644be2'/>
<id>urn:sha1:ca22e56debc57b47c422b749c93217ba62644be2</id>
<content type='text'>
All sysdev classes and sysdev devices will converted to regular devices
and buses to properly hook userspace into the event processing.

There is no interesting difference between a 'sysdev' and 'device' which
would justify to roll an entire own subsystem with different userspace
export semantics. Userspace relies on events and generic sysfs subsystem
infrastructure from sysdev devices, which are currently not properly
available.

Every converted sysdev class will create a regular device with the class
name in /sys/devices/system and all registered devices will becom a children
of theses devices.

For compatibility reasons, the sysdev class-wide attributes are created
at this parent device. (Do not copy that logic for anything new, subsystem-
wide properties belong to the subsystem, not to some fake parent device
created in /sys/devices.)

Every sysdev driver is implemented as a simple subsystem interface now,
and no longer called a driver.

After all sysdev classes are ported to regular driver core entities, the
sysdev implementation will be entirely removed from the kernel.

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>drivers/base: base.h implicitly depends on &lt;linux/notifier.h&gt;</title>
<updated>2011-10-31T23:31:39Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-05-26T22:08:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ba33162a2c3c847c02e42b9193b250217fdbbd9d'/>
<id>urn:sha1:ba33162a2c3c847c02e42b9193b250217fdbbd9d</id>
<content type='text'>
This file is currently relying on &lt;linux/module.h&gt; sneaking it in
through the implicit include paths from device.h.  Once that
is cleaned up, this will happen:

In file included from drivers/base/init.c:12:
drivers/base/base.h:34: error: field ‘bus_notifier’ has incomplete type
make[3]: *** [drivers/base/init.o] Error 1

Fix it up in advance, so the cleanup can continue.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
</feed>
