From patchwork Mon Jan 24 08:23:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12721651 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96AB0C433F5 for ; Mon, 24 Jan 2022 08:25:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LRUj4h2C5lcEPMCa7fD1Iv10KuZwZesJ8ZoCJV6BXTY=; b=196RCpgBhVN7jP DRYcE4cQz0H7e8I5pWhX7B019tla6rSX0NFZeAWtlxfoPe+EW9W1A15lJqiyjDb8WM8/xsT2ZktG+ 8OSPEpG4GsfOp/nm8xdkemGpqc5513IDelpJDjya4PsH4LV7A5OG+t1Z4H89/SODOF9RsSSa/n8pD MomhB3qmIa6poeWTNe3AZA9Uu9bfY/hrwUHZSrhbaX8ap5ZUeFgq7jQqR9Y/cw2D30EOYljkMREH3 hB4woOC0dxacYLJXg3Skqxh6rPPbuK/RiDpJUrATF0jcv79P7t3b/6GWeijEO2k+6a6ZGGRv8XN7C 2u6Wu6OGLuux7/hpl94w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBueK-002ZTB-VK; Mon, 24 Jan 2022 08:24:29 +0000 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBudq-002ZKM-Fx for linux-arm-kernel@lists.infradead.org; Mon, 24 Jan 2022 08:24:01 +0000 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 8537A3F1C9 for ; Mon, 24 Jan 2022 08:23:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1643012634; bh=jiMCDScLuU3KohhmhePQpbgp7zrXyRnLpy0BQpN+0wk=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=S3hJM+v2ufpqpnlWPsL0zHnMErsiWQr1wAkYScQu1Mdjq3xbolVhZeotq5CyHRl4G PfsxV8PG1NvSA+Rua84OxlvUR1eIP+CZEbosDpH8wPHS0GevqBIktVQ+ZM3XZYB8xT /o30Hq/6/AenUH2rmdnPehpoLYDbCWJnRKxQrT7yc5pbTQwSu/4Cd9db95hSMGzeNl Ig80HHR1itCBngWUPRZySNkZlUCftSVHQ0fpz+b6Eb4Ni+e+JgacqmC2OETkVd9gDp X9GhRNQrHSjDPB64BpUBms/WyaK3hyvoJzbtqPaFPBAsMC6LVghxUQ6bWT/8ZHiSh9 JOD+rGTE2KYbw== Received: by mail-wr1-f70.google.com with SMTP id j26-20020adfb31a000000b001d8e22f75fbso1539435wrd.20 for ; Mon, 24 Jan 2022 00:23:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jiMCDScLuU3KohhmhePQpbgp7zrXyRnLpy0BQpN+0wk=; b=FjOSrT5eO+UU5+pqAxNjAumSv/R4LmZz/6ZrHMq2YWCbbbBa6o9aScWM9iP0aSiYeB W9apHdsICi218we+3xukZAZxzy5WZftmKWhGSfmdhCM1JJvUuYmqtPe5+drLAHr4/qlT Q2wvQc9BvodZRPdYsx+xJlcsaY1u+8CZtBy7cwPOStGH4OWWH6tieZKhgYDtvn6YYchZ yk8r8PDXF8xOXE3qugmAIG6DnQz+Mqw6tRL1dW6e8XUJQFHJOSrJt11E2GkNzFfmXIlv hBzYUMfz/j8T4TAefvTaqnMjtUU8/vDO8YfFunnzINS8UZUXw2ybJ9lOR/Z2zA/269M1 1Q0w== X-Gm-Message-State: AOAM532PbYSXdtGiUG4T+umvta0ItIpHCKA8FG6+PrsbvssqHZN3fAeo LTmnrx1pqkiCcG+F51HTAkx/djN3zMoS73RFqSnQTw8OavEwXbwrAAGcddbIRwx6Z6390+s87AY FaGmgamsALsSbqms/NMDN12pBaRl64kxTlHRHegwxIeNLNQF6HPWJ X-Received: by 2002:a05:6000:15c6:: with SMTP id y6mr7073672wry.636.1643012633714; Mon, 24 Jan 2022 00:23:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJ6R4lLh2NM5hZv0Uug0OotleRkBYiOQpdroPf4UcDtyT0Gb8M8NjVHDpjwdU/dlEgeC8pvw== X-Received: by 2002:a05:6000:15c6:: with SMTP id y6mr7073654wry.636.1643012633476; Mon, 24 Jan 2022 00:23:53 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-168-84.adslplus.ch. [188.155.168.84]) by smtp.gmail.com with ESMTPSA id m64sm7148550wmm.31.2022.01.24.00.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 00:23:53 -0800 (PST) From: Krzysztof Kozlowski To: Lee Jones , Rob Herring , Benson Leung , Guenter Roeck , Krzysztof Kozlowski , Alim Akhtar , Andi Shyti , Mark Brown , Sam Protsenko , Pratyush Yadav , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-spi@vger.kernel.org Subject: [PATCH v6 1/4] spi: dt-bindings: samsung: convert to dtschema Date: Mon, 24 Jan 2022 09:23:44 +0100 Message-Id: <20220124082347.32747-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220124082347.32747-1-krzysztof.kozlowski@canonical.com> References: <20220124082347.32747-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_002358_848494_BE433103 X-CRM114-Status: GOOD ( 33.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert the Samsung SoC (S3C24xx, S3C64xx, S5Pv210, Exynos) SPI controller bindings to DT schema format. The conversion also drops requirement from providing controller-data and its data for each of SPI peripheral device nodes. The dtschema cannot express this and the requirement is being relaxed in the driver now. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sam Protsenko Acked-by: Pratyush Yadav Reviewed-by: Rob Herring Reviewed-by: Mark Brown --- .../bindings/soc/samsung/exynos-usi.yaml | 2 +- .../spi/samsung,spi-peripheral-props.yaml | 33 ++++ .../devicetree/bindings/spi/samsung,spi.yaml | 187 ++++++++++++++++++ .../bindings/spi/spi-peripheral-props.yaml | 1 + .../devicetree/bindings/spi/spi-samsung.txt | 122 ------------ MAINTAINERS | 2 +- 6 files changed, 223 insertions(+), 124 deletions(-) create mode 100644 Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.yaml create mode 100644 Documentation/devicetree/bindings/spi/samsung,spi.yaml delete mode 100644 Documentation/devicetree/bindings/spi/spi-samsung.txt diff --git a/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml b/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml index 58f2e9d8bb0e..d10ec742a6a5 100644 --- a/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml +++ b/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml @@ -22,7 +22,7 @@ description: | [1] Documentation/devicetree/bindings/serial/samsung_uart.yaml [2] Documentation/devicetree/bindings/i2c/i2c-exynos5.txt - [3] Documentation/devicetree/bindings/spi/spi-samsung.txt + [3] Documentation/devicetree/bindings/spi/samsung,spi.yaml properties: $nodename: diff --git a/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.yaml new file mode 100644 index 000000000000..f0db3fb3d688 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.yaml @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/samsung,spi-peripheral-props.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Peripheral-specific properties for Samsung S3C/S5P/Exynos SoC SPI controller + +maintainers: + - Krzysztof Kozlowski + +description: + See spi-peripheral-props.yaml for more info. + +properties: + controller-data: + type: object + additionalProperties: false + + properties: + samsung,spi-feedback-delay: + description: | + The sampling phase shift to be applied on the miso line (to account + for any lag in the miso line). Valid values: + - 0: No phase shift. + - 1: 90 degree phase shift sampling. + - 2: 180 degree phase shift sampling. + - 3: 270 degree phase shift sampling. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2, 3] + default: 0 + +additionalProperties: true diff --git a/Documentation/devicetree/bindings/spi/samsung,spi.yaml b/Documentation/devicetree/bindings/spi/samsung,spi.yaml new file mode 100644 index 000000000000..61c77088e8ee --- /dev/null +++ b/Documentation/devicetree/bindings/spi/samsung,spi.yaml @@ -0,0 +1,187 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/samsung,spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung S3C/S5P/Exynos SoC SPI controller + +maintainers: + - Krzysztof Kozlowski + +description: + All the SPI controller nodes should be represented in the aliases node using + the following format 'spi{n}' where n is a unique number for the alias. + +properties: + compatible: + oneOf: + - enum: + - samsung,s3c2443-spi # for S3C2443, S3C2416 and S3C2450 + - samsung,s3c6410-spi + - samsung,s5pv210-spi # for S5PV210 and S5PC110 + - samsung,exynos5433-spi + - const: samsung,exynos7-spi + deprecated: true + + clocks: + minItems: 2 + maxItems: 3 + + clock-names: + minItems: 2 + maxItems: 3 + + cs-gpios: true + + dmas: + minItems: 2 + maxItems: 2 + + dma-names: + items: + - const: tx + - const: rx + + interrupts: + maxItems: 1 + + no-cs-readback: + description: + The CS line is disconnected, therefore the device should not operate + based on CS signalling. + type: boolean + + num-cs: + minimum: 1 + maximum: 4 + default: 1 + + samsung,spi-src-clk: + description: + If the spi controller includes a internal clock mux to select the clock + source for the spi bus clock, this property can be used to indicate the + clock to be used for driving the spi bus clock. If not specified, the + clock number 0 is used as default. + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 + + reg: + maxItems: 1 + +required: + - compatible + - clocks + - clock-names + - dmas + - dma-names + - interrupts + - reg + +allOf: + - $ref: spi-controller.yaml# + - if: + properties: + compatible: + contains: + const: samsung,exynos5433-spi + then: + properties: + clocks: + minItems: 3 + maxItems: 3 + clock-names: + items: + - const: spi + - enum: + - spi_busclk0 + - spi_busclk1 + - spi_busclk2 + - spi_busclk3 + - const: spi_ioclk + else: + properties: + clocks: + minItems: 2 + maxItems: 2 + clock-names: + items: + - const: spi + - enum: + - spi_busclk0 + - spi_busclk1 + - spi_busclk2 + - spi_busclk3 + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + #include + + spi@14d30000 { + compatible = "samsung,exynos5433-spi"; + reg = <0x14d30000 0x100>; + interrupts = ; + dmas = <&pdma0 11>, <&pdma0 10>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&cmu_peric CLK_PCLK_SPI1>, + <&cmu_peric CLK_SCLK_SPI1>, + <&cmu_peric CLK_SCLK_IOCLK_SPI1>; + clock-names = "spi", + "spi_busclk0", + "spi_ioclk"; + samsung,spi-src-clk = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi1_bus>; + num-cs = <1>; + + cs-gpios = <&gpd6 3 GPIO_ACTIVE_HIGH>; + + audio-codec@0 { + compatible = "wlf,wm5110"; + reg = <0x0>; + spi-max-frequency = <20000000>; + interrupt-parent = <&gpa0>; + interrupts = <4 IRQ_TYPE_NONE>; + clocks = <&pmu_system_controller 0>, + <&s2mps13_osc S2MPS11_CLK_BT>; + clock-names = "mclk1", "mclk2"; + + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + + wlf,micd-detect-debounce = <300>; + wlf,micd-bias-start-time = <0x1>; + wlf,micd-rate = <0x7>; + wlf,micd-dbtime = <0x2>; + wlf,micd-force-micbias; + wlf,micd-configs = <0x0 1 0>; + wlf,hpdet-channel = <1>; + wlf,gpsw = <0x1>; + wlf,inmode = <2 0 2 0>; + + wlf,reset = <&gpc0 7 GPIO_ACTIVE_HIGH>; + wlf,ldoena = <&gpf0 0 GPIO_ACTIVE_HIGH>; + + /* core supplies */ + AVDD-supply = <&ldo18_reg>; + DBVDD1-supply = <&ldo18_reg>; + CPVDD-supply = <&ldo18_reg>; + DBVDD2-supply = <&ldo18_reg>; + DBVDD3-supply = <&ldo18_reg>; + SPKVDDL-supply = <&ldo18_reg>; + SPKVDDR-supply = <&ldo18_reg>; + + controller-data { + samsung,spi-feedback-delay = <0>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml index 5dd209206e88..df885eeb144f 100644 --- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml +++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml @@ -85,5 +85,6 @@ properties: # The controller specific properties go here. allOf: - $ref: cdns,qspi-nor-peripheral-props.yaml# + - $ref: samsung,spi-peripheral-props.yaml# additionalProperties: true diff --git a/Documentation/devicetree/bindings/spi/spi-samsung.txt b/Documentation/devicetree/bindings/spi/spi-samsung.txt deleted file mode 100644 index 49028a4f5df1..000000000000 --- a/Documentation/devicetree/bindings/spi/spi-samsung.txt +++ /dev/null @@ -1,122 +0,0 @@ -* Samsung SPI Controller - -The Samsung SPI controller is used to interface with various devices such as flash -and display controllers using the SPI communication interface. - -Required SoC Specific Properties: - -- compatible: should be one of the following. - - samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms - - samsung,s3c6410-spi: for s3c6410 platforms - - samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms - - samsung,exynos5433-spi: for exynos5433 compatible controllers - - samsung,exynos7-spi: for exynos7 platforms - -- reg: physical base address of the controller and length of memory mapped - region. - -- interrupts: The interrupt number to the cpu. The interrupt specifier format - depends on the interrupt controller. - -- dmas : Two or more DMA channel specifiers following the convention outlined - in bindings/dma/dma.txt - -- dma-names: Names for the dma channels. There must be at least one channel - named "tx" for transmit and named "rx" for receive. - -- clocks: specifies the clock IDs provided to the SPI controller; they are - required for interacting with the controller itself, for synchronizing the bus - and as I/O clock (the latter is required by exynos5433 and exynos7). - -- clock-names: string names of the clocks in the 'clocks' property; for all the - the devices the names must be "spi", "spi_busclkN" (where N is determined by - "samsung,spi-src-clk"), while Exynos5433 should specify a third clock - "spi_ioclk" for the I/O clock. - -Required Board Specific Properties: - -- #address-cells: should be 1. -- #size-cells: should be 0. - -Optional Board Specific Properties: - -- samsung,spi-src-clk: If the spi controller includes a internal clock mux to - select the clock source for the spi bus clock, this property can be used to - indicate the clock to be used for driving the spi bus clock. If not specified, - the clock number 0 is used as default. - -- num-cs: Specifies the number of chip select lines supported. If - not specified, the default number of chip select lines is set to 1. - -- cs-gpios: should specify GPIOs used for chipselects (see spi-bus.txt) - -- no-cs-readback: the CS line is disconnected, therefore the device should not - operate based on CS signalling. - -SPI Controller specific data in SPI slave nodes: - -- The spi slave nodes should provide the following information which is required - by the spi controller. - - - samsung,spi-feedback-delay: The sampling phase shift to be applied on the - miso line (to account for any lag in the miso line). The following are the - valid values. - - - 0: No phase shift. - - 1: 90 degree phase shift sampling. - - 2: 180 degree phase shift sampling. - - 3: 270 degree phase shift sampling. - -Aliases: - -- All the SPI controller nodes should be represented in the aliases node using - the following format 'spi{n}' where n is a unique number for the alias. - - -Example: - -- SoC Specific Portion: - - spi_0: spi@12d20000 { - compatible = "samsung,exynos4210-spi"; - reg = <0x12d20000 0x100>; - interrupts = <0 66 0>; - dmas = <&pdma0 5 - &pdma0 4>; - dma-names = "tx", "rx"; - #address-cells = <1>; - #size-cells = <0>; - }; - -- Board Specific Portion: - - spi_0: spi@12d20000 { - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&spi0_bus>; - cs-gpios = <&gpa2 5 0>; - - w25q80bw@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "w25x80"; - reg = <0>; - spi-max-frequency = <10000>; - - controller-data { - samsung,spi-feedback-delay = <0>; - }; - - partition@0 { - label = "U-Boot"; - reg = <0x0 0x40000>; - read-only; - }; - - partition@40000 { - label = "Kernel"; - reg = <0x40000 0xc0000>; - }; - }; - }; diff --git a/MAINTAINERS b/MAINTAINERS index 77c01b55099c..f0b083b279de 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17114,7 +17114,7 @@ M: Andi Shyti L: linux-spi@vger.kernel.org L: linux-samsung-soc@vger.kernel.org S: Maintained -F: Documentation/devicetree/bindings/spi/spi-samsung.txt +F: Documentation/devicetree/bindings/spi/samsung,spi*.yaml F: drivers/spi/spi-s3c* F: include/linux/platform_data/spi-s3c64xx.h F: include/linux/spi/s3c24xx-fiq.h From patchwork Mon Jan 24 08:23:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12721649 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5E63DC433EF for ; Mon, 24 Jan 2022 08:25:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=04Kc13uRi9uEcYRjQb2QKLNwKm0abgMYMe6duFMAfpg=; b=hliZfUzhr2HMSw lj2/5xmc/lNCty4g9lYkrOQ6vGY4wljt6wt4bZVJpCui9Y0cDLrfDdM2YTimHslV1D/83tM54n/QZ 1bE6tuKPvFb9NpvB+un9RNsmAM3XXO7Z8OOPPuda8ezFICgc/A5DxcBDMMlOgpTZZvebaFAkICWIA k4SX7it5zwAFDAzK7/5wDBkK+rHe32PziXZIhl2tikd9zM18BbVTFJ6jsZciWlTbqjYCfzclF9c3a a2oira+VRyVRGNbM9OUlZABZtZMbIgtBc2vMmd2zLG6tTx06jNLXH0Wfjr5shXb1m//vnyeg6/P7t 1DuhQOBsoxOMp406rvtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBue0-002ZOB-Cl; Mon, 24 Jan 2022 08:24:08 +0000 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBudp-002ZKZ-0w for linux-arm-kernel@lists.infradead.org; Mon, 24 Jan 2022 08:23:58 +0000 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 547513FE09 for ; Mon, 24 Jan 2022 08:23:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1643012635; bh=E9f604EUNMRc1K0x625ft9mXrJ60309YtLmhBOy5gsM=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WmfQ6/k5biHVhPXmcpnVGNMbmiVsK2/ApbS0Ms0uu7oR+Veem+kFqfY8sDudVBP4v w6bizTaONN3RrP5lFxiACL3wwKQF6c1ixs0LxMgLumjsU5pX6dmWB8Zk1fqGcKJ/r9 u4PQCMYDmhB/P+qtVuu1RnMVDbXyV+5f//E8RbSvq8+yosoTY5IATVHZZiXGeTnoO2 wx3DO9ipqsAuNfx+KkkLLCvg5uNt1EqED+NxVUfhgLEI0XBglSQF2Tuw6RmujDMUZe qa0JN+JFlBH8GeW0iV4Kwv2zzZT6YG192YScfm+zvde0PzZTkOaLDxTt7633tCZyK4 u7WTOXS7mN1bQ== Received: by mail-wr1-f72.google.com with SMTP id h12-20020adfa4cc000000b001d474912698so1528536wrb.2 for ; Mon, 24 Jan 2022 00:23:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=E9f604EUNMRc1K0x625ft9mXrJ60309YtLmhBOy5gsM=; b=H+3L/b4n5zng0cXxBkRUIygQVUhk8iSuKhTUdxisChAO5cSOU7u9S819rwtqR2dUtm a5RYCYRzbDe59diDx2WUBE5dPKrOd8hWI358dNJpyuNG8u5Rd8i0NkzyDgy4+2+VNjy7 uzp0aY5CRcM70qtGuCIW7DPQR4fsgbo4hBfVf95Ws0iP7wE7KM2YzZZQ/gNAMDe3fnBG ciXcho3HawY2/RsABsgKZBcWv6moXvwt9KFzR/Oq+lyjVAmu4hxT+DJ54W0YqNMnGfjR Ocp08y/f5rXchUdW/yQfVb28fZwMOXrQ1KTxm4Npu8hIJhL6NmIM15HqzHDQrQfA+iKy OQuA== X-Gm-Message-State: AOAM53320Nk1srNNMC2FF/il2vkHpChxCrzQc3nbeVRsVqPRURIjj2tR ne+vqbFDCRkn0J6WUiK18NZmx6NzXHVdTGd0/J5LSxwv1y/y2LmsQ3m0Nk9b37C0Sltrmap8/YM uRZrPFdxuuBpRm3BTqRQU+teg2jRYls/R6BkmgXOg/+B+x4Jb5u2T X-Received: by 2002:a5d:4803:: with SMTP id l3mr9501290wrq.339.1643012635036; Mon, 24 Jan 2022 00:23:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpvjCvKyZkS3eDZZP0ZWE7Zg9akUafDchzT87csJ7JBjny0Ukmeg3wKlAmCj1K+MrEAi1FMw== X-Received: by 2002:a5d:4803:: with SMTP id l3mr9501274wrq.339.1643012634897; Mon, 24 Jan 2022 00:23:54 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-168-84.adslplus.ch. [188.155.168.84]) by smtp.gmail.com with ESMTPSA id m64sm7148550wmm.31.2022.01.24.00.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 00:23:54 -0800 (PST) From: Krzysztof Kozlowski To: Lee Jones , Rob Herring , Benson Leung , Guenter Roeck , Krzysztof Kozlowski , Alim Akhtar , Andi Shyti , Mark Brown , Sam Protsenko , Pratyush Yadav , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-spi@vger.kernel.org Subject: [PATCH v6 2/4] mfd: dt-bindings: google, cros-ec: reference Samsung SPI bindings Date: Mon, 24 Jan 2022 09:23:45 +0100 Message-Id: <20220124082347.32747-3-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220124082347.32747-1-krzysztof.kozlowski@canonical.com> References: <20220124082347.32747-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_002357_223057_3E3018A1 X-CRM114-Status: GOOD ( 11.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The ChromeOS Embedded Controller appears on boards with Samsung Exynos SoC, where Exynos SPI bindings expect controller-data node. Reference SPI peripheral bindings which include now Samsung SPI peripheral parts. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring --- .../bindings/mfd/google,cros-ec.yaml | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml index d1f53bd449f7..525ab18005b3 100644 --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml @@ -31,7 +31,7 @@ properties: controller-data: description: - SPI controller data, see bindings/spi/spi-samsung.txt + SPI controller data, see bindings/spi/samsung,spi-peripheral-props.yaml type: object google,cros-ec-spi-pre-delay: @@ -148,18 +148,21 @@ patternProperties: required: - compatible -if: - properties: - compatible: - contains: - enum: - - google,cros-ec-i2c - - google,cros-ec-rpmsg -then: - properties: - google,cros-ec-spi-pre-delay: false - google,cros-ec-spi-msg-delay: false - spi-max-frequency: false +allOf: + - if: + properties: + compatible: + contains: + enum: + - google,cros-ec-i2c + - google,cros-ec-rpmsg + then: + properties: + google,cros-ec-spi-pre-delay: false + google,cros-ec-spi-msg-delay: false + spi-max-frequency: false + else: + $ref: /schemas/spi/spi-peripheral-props.yaml additionalProperties: false From patchwork Mon Jan 24 08:23:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12721650 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 00A3FC433F5 for ; Mon, 24 Jan 2022 08:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BgH/q1qpUpHiK00WxJhA8v7TrbvEOwVgN2b5/mrLKIk=; b=BMZ78gmLOfUJli wJXDAbjlgXYK49rhAINLEFrQ5FcT806a5jxHtgwoDxhJh+zBr0s7PH2WqQceeU6EEajVtcGHWrhBm qs5o+Hqpds/jgITfvIjDaZ12G9tTluQSnGdFl7rhrgt4DjcOjSru1597uRH4KYIk/+BRsj78KOtBm 1XIf4FpCTxd0rQRSHnthjTwvWVwxZuYUZCtvL4GF6RlcbfIp43TKLvuqJIPfxfR/wcnLcg7ea+6Cr PV8wEnk/EKIGPSgslLZegrmCVvkcSmfmEgAg2MTxBfhlZZ0MaW+C92deX8Rpx3bSTceRe/nuSVhZ2 OZZD9GeSmk/Ci7c2gwtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBueA-002ZQu-Mx; Mon, 24 Jan 2022 08:24:18 +0000 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBudr-002ZLJ-3i for linux-arm-kernel@lists.infradead.org; Mon, 24 Jan 2022 08:24:00 +0000 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 5165B40045 for ; Mon, 24 Jan 2022 08:23:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1643012637; bh=6MJYb8WcqWhjeyozgAW+GAp1i5m+HDM/agR5Nt4YXgk=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tMcwVFLXCiNxKGqeLD7+mxcuoWX8ukNCXeS31qxRfwwMK34sOU/dmJr7EwYc5w+bs PCrkbv/t9aWqGsUF4PzKkp+m3XCyaSj95jqpLiT2gLmUtu+BDdVuj/3nMsYO4tJJUv GSAzdaEsQjcBoY0387NmmiTWlNNVg8O084Mkk4cJEcC20zf31/4uW/pssqY8JY57Eo EFCjMR85bCFdVeym7pcXHLh0hTuAM1XjlItpGTCq298cA8rjiqtfEcvFdj/NNUWBwv pWIyRGcjBq1NzXzpcDsOzif6bKYmc/XkbI1n1rWbNUdQuKIX1Z0ep+aP3JOjvHOJ0k 37vx+ge/EWbZQ== Received: by mail-wm1-f71.google.com with SMTP id l16-20020a1c7910000000b0034e4206ecb7so6231457wme.7 for ; Mon, 24 Jan 2022 00:23:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6MJYb8WcqWhjeyozgAW+GAp1i5m+HDM/agR5Nt4YXgk=; b=NgJH+QgKFoxiDsN6ElLaT2dZV3rNISmEXf8tPRRdDMNiWM1uVKLe3m1WvNTfF4NyOh HLlYzw9BgE2OEcEs9H4zNf87a8b/xXGGeyEpoXjg2uKRQ2tp43UjhufkbGW4OCqpLVOA WxyuB51zk+lQfym2sPhV07/1/HukdbkYJ3l1hd6SH9LnbLxrSj2U3kPiwn2uVVPPLrnu NEiVfZcGXBB9IwpMOweHX4my/i+9+YwQj7luH0oQp2TDrbmsD/s7fTE23x5J0D8iJjUU RjCLD+EUe7/mI1Og15qfS0EnAwhkdPFsN6u07NwrtGG4ZsefnH6CHCoAwwaGGmoC5Rtd HR0g== X-Gm-Message-State: AOAM532rTDISNNrf7E0SP47jOgVv32yHHV3b/2YrJ3oLKpjL0JuOgNwP OOznhFizkVHy6Et2nijJ3pkwbRYIgrwNFRs/NDCXl3x4yQhUBLizUk4Fv1zdR9i8c+xBwqyCq2R 7dOMEuJekY+IywwzktsGFtNbUlK+KdmhP7U8soOXlfbGOmLwK2Lm1 X-Received: by 2002:a05:6000:1543:: with SMTP id 3mr13030935wry.98.1643012636546; Mon, 24 Jan 2022 00:23:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGKdmyKgG7q+F9YXGqPhXojRHXYyPuTj4cdnyu4gQtA6b0oE0q4HED2u/bDAahosOh4nheLQ== X-Received: by 2002:a05:6000:1543:: with SMTP id 3mr13030924wry.98.1643012636413; Mon, 24 Jan 2022 00:23:56 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-168-84.adslplus.ch. [188.155.168.84]) by smtp.gmail.com with ESMTPSA id m64sm7148550wmm.31.2022.01.24.00.23.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 00:23:55 -0800 (PST) From: Krzysztof Kozlowski To: Lee Jones , Rob Herring , Benson Leung , Guenter Roeck , Krzysztof Kozlowski , Alim Akhtar , Andi Shyti , Mark Brown , Sam Protsenko , Pratyush Yadav , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-spi@vger.kernel.org Subject: [PATCH v6 3/4] mfd: dt-bindings: google, cros-ec: fix indentation in example Date: Mon, 24 Jan 2022 09:23:46 +0100 Message-Id: <20220124082347.32747-4-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220124082347.32747-1-krzysztof.kozlowski@canonical.com> References: <20220124082347.32747-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_002359_325783_E9BAD030 X-CRM114-Status: GOOD ( 14.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Correct level of indentation in the example. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/mfd/google,cros-ec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml index 525ab18005b3..4caadf73fc4a 100644 --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml @@ -203,7 +203,7 @@ examples: spi-max-frequency = <5000000>; proximity { - compatible = "google,cros-ec-mkbp-proximity"; + compatible = "google,cros-ec-mkbp-proximity"; }; cbas { From patchwork Mon Jan 24 08:23:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12721652 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F632C433EF for ; Mon, 24 Jan 2022 08:25:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F9icU3ebQjBEKGo7CyoA8uhWd14eqkqtqx8wPaEdUxc=; b=22rGJWeVh+KW96 9je01YJ98ULtwdIfMF8zNFf/mrrYU4Yba+ELtzQAyBdKslzMMP9OtJj28I/V2RKbGlcerL6064BSD JLFGARP/bsbHRDfv3tDMJX1g5S4U2GM8HohkwBbuzvEKfr615GZvMQEtcBIeVv5lstDKSTxl4+0y3 MNsu2J29HIldxgC84fq8mwIZIzoqzOB1kfwOaABBMRAP17wBuT4LzqG5MDl1emtjS92OyFCv3Ozli mSGz26UfV1HzDsLAVcDMmvoQ9vyeaaSNQBrZz0D7VrnLQadW1bxG4uKXdBSTnlZeZ8EKfxMWCFUl7 3zv3JWVuKncxTiRuIWzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBueX-002ZWP-02; Mon, 24 Jan 2022 08:24:41 +0000 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBudu-002ZMp-J0 for linux-arm-kernel@lists.infradead.org; Mon, 24 Jan 2022 08:24:03 +0000 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 4152A3FFDE for ; Mon, 24 Jan 2022 08:23:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1643012638; bh=bto/xpfUsOVGNmCnHot8/BAzxWmx4lezX3yYM6aPOPk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JSWnxyc6Ynxb4pzX0DEiloksdMGeHVH6a9RN36NM0CxF6rmsONQ+hL2l9dBHMFvjB z6JSuTDgV5/BKMd1xaTWFZK1rPg2NhY4OhzxdCqTYvI3Og0fVfnzpwcon8qI397GjX iK9t4+pMFlgIwuYpspxZ7nUKciXf11UZYK67XL5sEZLgiPP02j+BBixUbYnjA8aJUs z0j7L8lKXGFADXh6fAMbEZDzJWe6YxFdP+I5LFJKRCK7BywQfIGhKAXdicexuhs7tA sNekQUWlnhnJeA24NqgDOwaXGtYXHEGwasAA8yeT93d5s87JDZRCGt4QZfMWAE6uyy aVoeygH+Oaumg== Received: by mail-wm1-f71.google.com with SMTP id m3-20020a7bcb83000000b0034f75d92f27so2381211wmi.2 for ; Mon, 24 Jan 2022 00:23:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bto/xpfUsOVGNmCnHot8/BAzxWmx4lezX3yYM6aPOPk=; b=wLH3BOumPe6UA7aoSZHM6fRK0gLXs6gXnDJPbiG/nx+D9NPIvWPE0Kb9vuuIYoJpZX QW7Oqn7V6FiaI/IE2T7EWIOyxt9fxWhFL3kq1OoYXTDYq5OtLMrAVKxZoJMxyU/UWX6f Pw+KwGB7kDTzxdOfoSI6IJd1879JAEfT7EmmI5TYt5k6sR91OV2Dqbr8eCaii+ccY3W9 cp/vmg/avJKKsw9VN68Oh7j6h1pX6BjVgN9rJUgEh8U2tX8Mpvl9iOKuqMkhgD32d5y6 4n76zJC8iKAzv2zUcWBoB7+j5XRTJaHxT+C1Bm4IkQJ7qG7v+8PvZHZyYbP1fYZt4BNu gUaQ== X-Gm-Message-State: AOAM532U0LpjwsJtpBz9lhCOOkCJE7+5AKVsSXZMYz7tkgs6UmU7na0O iUniY2RfJ/DM3D4Qt5hbxHyfl00vvSOCQm7P2TlDSD46Qc3Dy8rB6tfkRbPaCZf+ilOy+joQWsF D6Vfsqc643sz7qq4U5FDkvhTJXKBCbzQh122zGDeWZ8rz0evskYyb X-Received: by 2002:a5d:64c1:: with SMTP id f1mr13620180wri.214.1643012637896; Mon, 24 Jan 2022 00:23:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbDEtlR+A8QosvqD2D6NDMpI/LZF+F4pIQPaln/inShBkt2VmjdWxKP27qiPZUiadTkD+7Dw== X-Received: by 2002:a5d:64c1:: with SMTP id f1mr13620166wri.214.1643012637710; Mon, 24 Jan 2022 00:23:57 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-168-84.adslplus.ch. [188.155.168.84]) by smtp.gmail.com with ESMTPSA id m64sm7148550wmm.31.2022.01.24.00.23.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 00:23:57 -0800 (PST) From: Krzysztof Kozlowski To: Lee Jones , Rob Herring , Benson Leung , Guenter Roeck , Krzysztof Kozlowski , Alim Akhtar , Andi Shyti , Mark Brown , Sam Protsenko , Pratyush Yadav , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-spi@vger.kernel.org Cc: Rob Herring Subject: [PATCH v6 4/4] spi: s3c64xx: allow controller-data to be optional Date: Mon, 24 Jan 2022 09:23:47 +0100 Message-Id: <20220124082347.32747-5-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220124082347.32747-1-krzysztof.kozlowski@canonical.com> References: <20220124082347.32747-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_002402_784619_C8E56EF4 X-CRM114-Status: GOOD ( 14.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Samsung SoC SPI driver requires to provide controller-data node for each of SPI peripheral device nodes. Make this controller-data node optional, so DTS could be simpler. Suggested-by: Rob Herring Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sam Protsenko Reviewed-by: Andi Shyti --- drivers/spi/spi-s3c64xx.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 8755cd85e83c..386550fca81c 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -796,16 +796,14 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata( return ERR_PTR(-EINVAL); } - data_np = of_get_child_by_name(slave_np, "controller-data"); - if (!data_np) { - dev_err(&spi->dev, "child node 'controller-data' not found\n"); - return ERR_PTR(-EINVAL); - } - cs = kzalloc(sizeof(*cs), GFP_KERNEL); - if (!cs) { - of_node_put(data_np); + if (!cs) return ERR_PTR(-ENOMEM); + + data_np = of_get_child_by_name(slave_np, "controller-data"); + if (!data_np) { + dev_info(&spi->dev, "feedback delay set to default (0)\n"); + return cs; } of_property_read_u32(data_np, "samsung,spi-feedback-delay", &fb_delay);