Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e880e874 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull driver core updates from Greg KH:
 "Here's the "big" driver core updates for 4.4-rc1.  Primarily a bunch
  of debugfs updates, with a smattering of minor driver core fixes and
  updates as well.

  All have been in linux-next for a long time"

* tag 'driver-core-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  debugfs: Add debugfs_create_ulong()
  of: to support binding numa node to specified device in devicetree
  debugfs: Add read-only/write-only bool file ops
  debugfs: Add read-only/write-only size_t file ops
  debugfs: Add read-only/write-only x64 file ops
  debugfs: Consolidate file mode checks in debugfs_create_*()
  Revert "mm: Check if section present during memory block (un)registering"
  driver-core: platform: Provide helpers for multi-driver modules
  mm: Check if section present during memory block (un)registering
  devres: fix a for loop bounds check
  CMA: fix CONFIG_CMA_SIZE_MBYTES overflow in 64bit
  base/platform: assert that dev_pm_domain callbacks are called unconditionally
  sysfs: correctly handle short reads on PREALLOC attrs.
  base: soc: siplify ida usage
  kobject: move EXPORT_SYMBOL() macros next to corresponding definitions
  kobject: explain what kobject's sd field is
  debugfs: document that debugfs_remove*() accepts NULL and error values
  debugfs: Pass bool pointer to debugfs_create_bool()
  ACPI / EC: Fix broken 64bit big-endian users of 'global_lock'
parents 118c216e c23fe831
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -63,6 +63,20 @@ runtime memory footprint:
	int platform_driver_probe(struct platform_driver *drv,
			  int (*probe)(struct platform_device *))

Kernel modules can be composed of several platform drivers. The platform core
provides helpers to register and unregister an array of drivers:

	int __platform_register_drivers(struct platform_driver * const *drivers,
				      unsigned int count, struct module *owner);
	void platform_unregister_drivers(struct platform_driver * const *drivers,
					 unsigned int count);

If one of the drivers fails to register, all drivers registered up to that
point will be unregistered in reverse order. Note that there is a convenience
macro that passes THIS_MODULE as owner parameter:

	#define platform_register_driver(drivers, count)


Device Enumeration
~~~~~~~~~~~~~~~~~~
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ a variable of type size_t.
Boolean values can be placed in debugfs with:

    struct dentry *debugfs_create_bool(const char *name, umode_t mode,
				       struct dentry *parent, u32 *value);
				       struct dentry *parent, bool *value);

A read on the resulting file will yield either Y (for non-zero values) or
N, followed by a newline.  If written to, it will accept either upper- or
+2 −2
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ static u32 mdscr_read(void)
 * Allow root to disable self-hosted debug from userspace.
 * This is useful if you want to connect an external JTAG debugger.
 */
static u32 debug_enabled = 1;
static bool debug_enabled = true;

static int create_debug_debugfs_entry(void)
{
@@ -71,7 +71,7 @@ fs_initcall(create_debug_debugfs_entry);

static int __init early_debug_disable(char *buf)
{
	debug_enabled = 0;
	debug_enabled = false;
	return 0;
}

+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ static int acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count)
	if (!debugfs_create_x32("gpe", 0444, dev_dir, (u32 *)&first_ec->gpe))
		goto error;
	if (!debugfs_create_bool("use_global_lock", 0444, dev_dir,
				 (u32 *)&first_ec->global_lock))
				 &first_ec->global_lock))
		goto error;

	if (write_support)
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ struct acpi_ec {
	unsigned long gpe;
	unsigned long command_addr;
	unsigned long data_addr;
	unsigned long global_lock;
	bool global_lock;
	unsigned long flags;
	unsigned long reference_count;
	struct mutex mutex;
Loading