Skip to content

Commit

Permalink
Merge tag 'devicetree-fixes-for-4.3' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/robh/linux

Pull DeviceTree fixes from Rob Herring:
 - Silence bogus warning for of_irq_parse_pci
 - Fix typo in ARM idle-states binding doc and dts files
 - Various minor binding documentation updates

* tag 'devicetree-fixes-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  Documentation: arm: Fix typo in the idle-states bindings examples
  gpio: mention in DT binding doc that <name>-gpio is deprecated
  of_pci_irq: Silence bogus "of_irq_parse_pci() failed ..." messages.
  devicetree: bindings: Extend the bma180 bindings with bma250 info
  of: thermal: Mark cooling-*-level properties optional
  of: thermal: Fix inconsitency between cooling-*-state and cooling-*-level
  Docs: dt: add #msi-cells to GICv3 ITS binding
  of: add vendor prefix for Socionext Inc.
  • Loading branch information
Linus Torvalds committed Sep 25, 2015
2 parents cc8b8fa + a13f18f commit 4401555
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 27 deletions.
5 changes: 5 additions & 0 deletions Documentation/devicetree/bindings/arm/gic-v3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ used to route Message Signalled Interrupts (MSI) to the CPUs.
These nodes must have the following properties:
- compatible : Should at least contain "arm,gic-v3-its".
- msi-controller : Boolean property. Identifies the node as an MSI controller
- #msi-cells: Must be <1>. The single msi-cell is the DeviceID of the device
which will generate the MSI.
- reg: Specifies the base physical address and size of the ITS
registers.

Expand All @@ -83,6 +85,7 @@ Examples:
gic-its@2c200000 {
compatible = "arm,gic-v3-its";
msi-controller;
#msi-cells = <1>;
reg = <0x0 0x2c200000 0 0x200000>;
};
};
Expand All @@ -107,12 +110,14 @@ Examples:
gic-its@2c200000 {
compatible = "arm,gic-v3-its";
msi-controller;
#msi-cells = <1>;
reg = <0x0 0x2c200000 0 0x200000>;
};

gic-its@2c400000 {
compatible = "arm,gic-v3-its";
msi-controller;
#msi-cells = <1>;
reg = <0x0 0x2c400000 0 0x200000>;
};
};
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/arm/idle-states.txt
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ cpus {
};

idle-states {
entry-method = "arm,psci";
entry-method = "psci";

CPU_RETENTION_0_0: cpu-retention-0-0 {
compatible = "arm,idle-state";
Expand Down
4 changes: 3 additions & 1 deletion Documentation/devicetree/bindings/gpio/gpio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ properties, each containing a 'gpio-list':
GPIO properties should be named "[<name>-]gpios", with <name> being the purpose
of this GPIO for the device. While a non-existent <name> is considered valid
for compatibility reasons (resolving to the "gpios" property), it is not allowed
for new bindings.
for new bindings. Also, GPIO properties named "[<name>-]gpio" are valid and old
bindings use it, but are only supported for compatibility reasons and should not
be used for newer bindings since it has been deprecated.

GPIO properties can contain one or more GPIO phandles, but only in exceptional
cases should they contain more than one. If your device uses several GPIOs with
Expand Down
8 changes: 6 additions & 2 deletions Documentation/devicetree/bindings/iio/accel/bma180.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
* Bosch BMA180 triaxial acceleration sensor
* Bosch BMA180 / BMA250 triaxial acceleration sensor

http://omapworld.com/BMA180_111_1002839.pdf
http://ae-bst.resource.bosch.com/media/products/dokumente/bma250/bst-bma250-ds002-05.pdf

Required properties:

- compatible : should be "bosch,bma180"
- compatible : should be "bosch,bma180" or "bosch,bma250"
- reg : the I2C address of the sensor

Optional properties:
Expand All @@ -13,6 +14,9 @@ Optional properties:

- interrupts : interrupt mapping for GPIO IRQ, it should by configured with
flags IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING
For the bma250 the first interrupt listed must be the one
connected to the INT1 pin, the second (optional) interrupt
listed must be the one connected to the INT2 pin.

Example:

Expand Down
27 changes: 14 additions & 13 deletions Documentation/devicetree/bindings/thermal/thermal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,11 @@ of heat dissipation). For example a fan's cooling states correspond to
the different fan speeds possible. Cooling states are referred to by
single unsigned integers, where larger numbers mean greater heat
dissipation. The precise set of cooling states associated with a device
(as referred to be the cooling-min-state and cooling-max-state
(as referred to by the cooling-min-level and cooling-max-level
properties) should be defined in a particular device's binding.
For more examples of cooling devices, refer to the example sections below.

Required properties:
- cooling-min-state: An integer indicating the smallest
Type: unsigned cooling state accepted. Typically 0.
Size: one cell

- cooling-max-state: An integer indicating the largest
Type: unsigned cooling state accepted.
Size: one cell

- #cooling-cells: Used to provide cooling device specific information
Type: unsigned while referring to it. Must be at least 2, in order
Size: one cell to specify minimum and maximum cooling state used
Expand All @@ -77,6 +69,15 @@ Required properties:
See Cooling device maps section below for more details
on how consumers refer to cooling devices.

Optional properties:
- cooling-min-level: An integer indicating the smallest
Type: unsigned cooling state accepted. Typically 0.
Size: one cell

- cooling-max-level: An integer indicating the largest
Type: unsigned cooling state accepted.
Size: one cell

* Trip points

The trip node is a node to describe a point in the temperature domain
Expand Down Expand Up @@ -225,8 +226,8 @@ cpus {
396000 950000
198000 850000
>;
cooling-min-state = <0>;
cooling-max-state = <3>;
cooling-min-level = <0>;
cooling-max-level = <3>;
#cooling-cells = <2>; /* min followed by max */
};
...
Expand All @@ -240,8 +241,8 @@ cpus {
*/
fan0: fan@0x48 {
...
cooling-min-state = <0>;
cooling-max-state = <9>;
cooling-min-level = <0>;
cooling-max-level = <9>;
#cooling-cells = <2>; /* min followed by max */
};
};
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/vendor-prefixes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ sitronix Sitronix Technology Corporation
skyworks Skyworks Solutions, Inc.
smsc Standard Microsystems Corporation
snps Synopsys, Inc.
socionext Socionext Inc.
solidrun SolidRun
solomon Solomon Systech Limited
sony Sony Corporation
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/mediatek/mt8173.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
};

idle-states {
entry-method = "arm,psci";
entry-method = "psci";

CPU_SLEEP_0: cpu-sleep-0 {
compatible = "arm,idle-state";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/rockchip/rk3368.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
};

idle-states {
entry-method = "arm,psci";
entry-method = "psci";

cpu_sleep: cpu-sleep-0 {
compatible = "arm,idle-state";
Expand Down
22 changes: 14 additions & 8 deletions drivers/of/of_pci_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq
*/
rc = pci_read_config_byte(pdev, PCI_INTERRUPT_PIN, &pin);
if (rc != 0)
return rc;
/* No pin, exit */
goto err;
/* No pin, exit with no error message. */
if (pin == 0)
return -ENODEV;

Expand All @@ -53,8 +53,10 @@ int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq
ppnode = pci_bus_to_OF_node(pdev->bus);

/* No node for host bridge ? give up */
if (ppnode == NULL)
return -EINVAL;
if (ppnode == NULL) {
rc = -EINVAL;
goto err;
}
} else {
/* We found a P2P bridge, check if it has a node */
ppnode = pci_device_to_OF_node(ppdev);
Expand Down Expand Up @@ -86,7 +88,13 @@ int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq
out_irq->args[0] = pin;
laddr[0] = cpu_to_be32((pdev->bus->number << 16) | (pdev->devfn << 8));
laddr[1] = laddr[2] = cpu_to_be32(0);
return of_irq_parse_raw(laddr, out_irq);
rc = of_irq_parse_raw(laddr, out_irq);
if (rc)
goto err;
return 0;
err:
dev_err(&pdev->dev, "of_irq_parse_pci() failed with rc=%d\n", rc);
return rc;
}
EXPORT_SYMBOL_GPL(of_irq_parse_pci);

Expand All @@ -105,10 +113,8 @@ int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin)
int ret;

ret = of_irq_parse_pci(dev, &oirq);
if (ret) {
dev_err(&dev->dev, "of_irq_parse_pci() failed with rc=%d\n", ret);
if (ret)
return 0; /* Proper return code 0 == NO_IRQ */
}

return irq_create_of_mapping(&oirq);
}
Expand Down

0 comments on commit 4401555

Please sign in to comment.