Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375551
b: refs/heads/master
c: 3065023
h: refs/heads/master
i:
  375549: f7c0b73
  375547: deee0c6
  375543: 9ca30e0
  375535: c7b66fb
  375519: 9eaffd2
  375487: 6d93d6d
  375423: e1cb875
  375295: 2ea8356
v: v3
  • Loading branch information
Alistair Popple authored and Benjamin Herrenschmidt committed May 7, 2013
1 parent 941e5c1 commit ce0d482
Show file tree
Hide file tree
Showing 1,970 changed files with 37,029 additions and 107,660 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 674825d05001e218afe5a04438683e1e597e14fb
refs/heads/master: 30650239adc9e4e9439256d6988e521518dccbb3
156 changes: 0 additions & 156 deletions trunk/Documentation/ABI/testing/sysfs-block-bcache

This file was deleted.

20 changes: 20 additions & 0 deletions trunk/Documentation/ABI/testing/sysfs-bus-rbd
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,27 @@ current_snap

The current snapshot for which the device is mapped.

snap_*

A directory per each snapshot

parent

Information identifying the pool, image, and snapshot id for
the parent image in a layered rbd image (format 2 only).

Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name>
-------------------------------------------------------------

snap_id

The rados internal snapshot id assigned for this snapshot

snap_size

The size of the image when this snapshot was taken.

snap_features

A hexadecimal encoding of the feature bits for this snapshot.

6 changes: 4 additions & 2 deletions trunk/Documentation/ABI/testing/sysfs-class-mtd
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ Description:
The /sys/class/mtd/mtd{0,1,2,3,...} directories correspond
to each /dev/mtdX character device. These may represent
physical/simulated flash devices, partitions on a flash
device, or concatenated flash devices.
device, or concatenated flash devices. They exist regardless
of whether CONFIG_MTD_CHAR is actually enabled.

What: /sys/class/mtd/mtdXro/
Date: April 2009
KernelVersion: 2.6.29
Contact: linux-mtd@lists.infradead.org
Description:
These directories provide the corresponding read-only device
nodes for /sys/class/mtd/mtdX/ .
nodes for /sys/class/mtd/mtdX/ . They are only created
(for the benefit of udev) if CONFIG_MTD_CHAR is enabled.

What: /sys/class/mtd/mtdX/dev
Date: April 2009
Expand Down
109 changes: 1 addition & 108 deletions trunk/Documentation/acpi/enumeration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,83 +66,6 @@ the ACPI device explicitly to acpi_platform_device_ids list defined in
drivers/acpi/acpi_platform.c. This limitation is only for the platform
devices, SPI and I2C devices are created automatically as described below.

DMA support
~~~~~~~~~~~
DMA controllers enumerated via ACPI should be registered in the system to
provide generic access to their resources. For example, a driver that would
like to be accessible to slave devices via generic API call
dma_request_slave_channel() must register itself at the end of the probe
function like this:

err = devm_acpi_dma_controller_register(dev, xlate_func, dw);
/* Handle the error if it's not a case of !CONFIG_ACPI */

and implement custom xlate function if needed (usually acpi_dma_simple_xlate()
is enough) which converts the FixedDMA resource provided by struct
acpi_dma_spec into the corresponding DMA channel. A piece of code for that case
could look like:

#ifdef CONFIG_ACPI
struct filter_args {
/* Provide necessary information for the filter_func */
...
};

static bool filter_func(struct dma_chan *chan, void *param)
{
/* Choose the proper channel */
...
}

static struct dma_chan *xlate_func(struct acpi_dma_spec *dma_spec,
struct acpi_dma *adma)
{
dma_cap_mask_t cap;
struct filter_args args;

/* Prepare arguments for filter_func */
...
return dma_request_channel(cap, filter_func, &args);
}
#else
static struct dma_chan *xlate_func(struct acpi_dma_spec *dma_spec,
struct acpi_dma *adma)
{
return NULL;
}
#endif

dma_request_slave_channel() will call xlate_func() for each registered DMA
controller. In the xlate function the proper channel must be chosen based on
information in struct acpi_dma_spec and the properties of the controller
provided by struct acpi_dma.

Clients must call dma_request_slave_channel() with the string parameter that
corresponds to a specific FixedDMA resource. By default "tx" means the first
entry of the FixedDMA resource array, "rx" means the second entry. The table
below shows a layout:

Device (I2C0)
{
...
Method (_CRS, 0, NotSerialized)
{
Name (DBUF, ResourceTemplate ()
{
FixedDMA (0x0018, 0x0004, Width32bit, _Y48)
FixedDMA (0x0019, 0x0005, Width32bit, )
})
...
}
}

So, the FixedDMA with request line 0x0018 is "tx" and next one is "rx" in
this example.

In robust cases the client unfortunately needs to call
acpi_dma_request_slave_chan_by_index() directly and therefore choose the
specific FixedDMA resource by its index.

SPI serial bus support
~~~~~~~~~~~~~~~~~~~~~~
Slave devices behind SPI bus have SpiSerialBus resource attached to them.
Expand Down Expand Up @@ -276,29 +199,17 @@ the device to the driver. For example:
{
Name (SBUF, ResourceTemplate()
{
...
// Used to power on/off the device
GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
IoRestrictionOutputOnly, "\\_SB.PCI0.GPI0",
0x00, ResourceConsumer,,)
{
// Pin List
0x0055
}

// Interrupt for the device
GpioInt (Edge, ActiveHigh, ExclusiveAndWake, PullNone,
0x0000, "\\_SB.PCI0.GPI0", 0x00, ResourceConsumer,,)
{
// Pin list
0x0058
}

...

Return (SBUF)
}

Return (SBUF)
}

These GPIO numbers are controller relative and path "\\_SB.PCI0.GPI0"
Expand All @@ -309,24 +220,6 @@ The driver can do this by including <linux/acpi_gpio.h> and then calling
acpi_get_gpio(path, gpio). This will return the Linux GPIO number or
negative errno if there was no translation found.

In a simple case of just getting the Linux GPIO number from device
resources one can use acpi_get_gpio_by_index() helper function. It takes
pointer to the device and index of the GpioIo/GpioInt descriptor in the
device resources list. For example:

int gpio_irq, gpio_power;
int ret;

gpio_irq = acpi_get_gpio_by_index(dev, 1, NULL);
if (gpio_irq < 0)
/* handle error */

gpio_power = acpi_get_gpio_by_index(dev, 0, NULL);
if (gpio_power < 0)
/* handle error */

/* Now we can use the GPIO numbers */

Other GpioIo parameters must be converted first by the driver to be
suitable to the gpiolib before passing them.

Expand Down
Loading

0 comments on commit ce0d482

Please sign in to comment.