Commit 974099e4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'devicetree-fixes-for-6.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull devicetree fixes from Rob Herring:

 - Disable kunit tests for arm64+ACPI

 - Fix refcount issue in kunit tests

 - Drop constraints on non-conformant 'interrupt-map' in fsl,ls-extirq

 - Drop type ref on 'msi-parent in fsl,qoriq-mc binding

 - Move elgin,jg10309-01 to its own binding from trivial-devices

* tag 'devicetree-fixes-for-6.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  of: Skip kunit tests when arm64+ACPI doesn't populate root node
  of: Fix unbalanced of node refcount and memory leaks
  dt-bindings: interrupt-controller: fsl,ls-extirq: workaround wrong interrupt-map number
  dt-bindings: misc: fsl,qoriq-mc: remove ref for msi-parent
  dt-bindings: display: elgin,jg10309-01: Add own binding
parents 9066258d 6e0391e4
Loading
Loading
Loading
Loading
+54 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/elgin,jg10309-01.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Elgin JG10309-01 SPI-controlled display

maintainers:
  - Fabio Estevam <festevam@gmail.com>

description: |
  The Elgin JG10309-01 SPI-controlled display is used on the RV1108-Elgin-r1
  board and is a custom display.

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

properties:
  compatible:
    const: elgin,jg10309-01

  reg:
    maxItems: 1

  spi-max-frequency:
    maximum: 24000000

  spi-cpha: true

  spi-cpol: true

required:
  - compatible
  - reg
  - spi-cpha
  - spi-cpol

additionalProperties: false

examples:
  - |
    spi {
        #address-cells = <1>;
        #size-cells = <0>;

        display@0 {
            compatible = "elgin,jg10309-01";
            reg = <0>;
            spi-max-frequency = <24000000>;
            spi-cpha;
            spi-cpol;
        };
    };
+23 −3
Original line number Diff line number Diff line
@@ -82,9 +82,6 @@ allOf:
            enum:
              - fsl,ls1043a-extirq
              - fsl,ls1046a-extirq
              - fsl,ls1088a-extirq
              - fsl,ls2080a-extirq
              - fsl,lx2160a-extirq
    then:
      properties:
        interrupt-map:
@@ -95,6 +92,29 @@ allOf:
            - const: 0xf
            - const: 0

  - if:
      properties:
        compatible:
          contains:
            enum:
              - fsl,ls1088a-extirq
              - fsl,ls2080a-extirq
              - fsl,lx2160a-extirq
# The driver(drivers/irqchip/irq-ls-extirq.c) have not use standard DT
# function to parser interrupt-map. So it doesn't consider '#address-size'
# in parent interrupt controller, such as GIC.
#
# When dt-binding verify interrupt-map, item data matrix is spitted at
# incorrect position. Remove interrupt-map restriction because it always
# wrong.

    then:
      properties:
        interrupt-map-mask:
          items:
            - const: 0xf
            - const: 0

additionalProperties: false

examples:
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ properties:

  msi-parent:
    deprecated: true
    $ref: /schemas/types.yaml#/definitions/phandle
    maxItems: 1
    description:
      Describes the MSI controller node handling message
      interrupts for the MC. When there is no translation
+0 −2
Original line number Diff line number Diff line
@@ -101,8 +101,6 @@ properties:
          - domintech,dmard09
            # DMARD10: 3-axis Accelerometer
          - domintech,dmard10
            # Elgin SPI-controlled LCD
          - elgin,jg10309-01
            # MMA7660FC: 3-Axis Orientation/Motion Detection Sensor
          - fsl,mma7660
            # MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer
+15 −0
Original line number Diff line number Diff line
@@ -10,6 +10,19 @@
#include <kunit/test.h>
#include <kunit/resource.h>

#include "of_private.h"

/**
 * of_root_kunit_skip() - Skip test if the root node isn't populated
 * @test: test to skip if the root node isn't populated
 */
void of_root_kunit_skip(struct kunit *test)
{
	if (IS_ENABLED(CONFIG_ARM64) && IS_ENABLED(CONFIG_ACPI) && !of_root)
		kunit_skip(test, "arm64+acpi doesn't populate a root node");
}
EXPORT_SYMBOL_GPL(of_root_kunit_skip);

#if defined(CONFIG_OF_OVERLAY) && defined(CONFIG_OF_EARLY_FLATTREE)

static void of_overlay_fdt_apply_kunit_exit(void *ovcs_id)
@@ -36,6 +49,8 @@ int of_overlay_fdt_apply_kunit(struct kunit *test, void *overlay_fdt,
	int ret;
	int *copy_id;

	of_root_kunit_skip(test);

	copy_id = kunit_kmalloc(test, sizeof(*copy_id), GFP_KERNEL);
	if (!copy_id)
		return -ENOMEM;
Loading