From patchwork Tue Aug 6 08:48:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Utsav Agarwal via B4 Relay X-Patchwork-Id: 13754566 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E9431BD02E; Tue, 6 Aug 2024 08:49:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722934168; cv=none; b=CfIuz+vnXWODpQBipymdIyITyZWXFLqR94YpZ9h+VzZfnSnuTv+kA8b9Lbr1dFiaVXZsv9eULkp1dYUqk39qXJa03uMrHXwJ23OMC8d65VkBmX7sXBTMuncqxLzGDLLw+R0wNbqe+Q1qRJAoO5LDR+eQFg/4HXZ8WNzZiKvGKRw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722934168; c=relaxed/simple; bh=tJoJFGQ6IN0XztrjKcoZyFy8IrqvD4zzAblubbny+Ew=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iKuZSizfGT6Icv+dLIsr+c2Wf7UrTqkocOahgVWSQV9Kds0G4ETg7KL9wd79G79xJKpd+hOu2lA7e9Kro09VgaVuBKSAabe9VN9RE7oj9ElprCK/Y4ak8Iq/nWdPmxfBlt5EBhieCsZ+SvlQFqhd9LlvhTkyZrWjA6gHurlos8o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rKONZjv7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rKONZjv7" Received: by smtp.kernel.org (Postfix) with ESMTPS id 2B5F7C4AF13; Tue, 6 Aug 2024 08:49:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722934168; bh=tJoJFGQ6IN0XztrjKcoZyFy8IrqvD4zzAblubbny+Ew=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=rKONZjv7/XPGBfVjmQBQT1aC+lQ5O6yiy/A1VO+S+Rxxb6U0AouGsRdvV9Olq4js5 WpGLN7ZgNJ8EzqAXtJZZWjGg183m+oNn9/9Ds/OiLSwPBGZpvBbhZgQNSxEmKEt9UM JnygT81oLgSyH4EuS4QsEfUvhbZRPV8DBWPfBMqmgqyZ+EswNp93eTQkcHVE3oEXi7 65LF+MSp5mGS94uECWoL4VrX8vu1XQtk/bhdm66ihpyCbzy5lJ01fnvkybm71UsTC2 +PVfR60hxr5A6oeHsfATMov4BrjWvy9kn0iLaDPw+51nu/LyeXTgoqFoOyhkIN/fIL BX7kWuc/91R6A== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C353C52D74; Tue, 6 Aug 2024 08:49:28 +0000 (UTC) From: Utsav Agarwal via B4 Relay Date: Tue, 06 Aug 2024 09:48:04 +0100 Subject: [PATCH v9 3/3] dt-bindings: input: Update dtbinding for adp5588 Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240806-adp5588_gpio_support-v9-3-4d6118b6d653@analog.com> References: <20240806-adp5588_gpio_support-v9-0-4d6118b6d653@analog.com> In-Reply-To: <20240806-adp5588_gpio_support-v9-0-4d6118b6d653@analog.com> To: Utsav Agarwal , Michael Hennerich , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?utf-8?q?Nuno_S=C3=A1?= Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Arturs Artamonovs , Vasileios Bimpikas , Oliver Gaskell X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1722934106; l=2787; i=utsav.agarwal@analog.com; s=20240701; h=from:subject:message-id; bh=IDMT5Xee1oJ9GPx4m0/4wO3JYqcHE0m3oSwjk4wtz/Q=; b=1VJE7OxfyBh+HyB2sg8jCGAiaPX6IljGy32ThG2UCCSgwOUQ9DJdVWiS64yEjyUaQ1PN3ItWR M/7PbvE7P8bCWHc+iIrmLFeRpgnneDx3o+/vrid2ZPlKrw3sItod4ci X-Developer-Key: i=utsav.agarwal@analog.com; a=ed25519; pk=mIG5Dmd3TO5rcICwTsixl2MoUcf/i2u+jYqifd7+fmI= X-Endpoint-Received: by B4 Relay for utsav.agarwal@analog.com/20240701 with auth_id=178 X-Original-From: Utsav Agarwal Reply-To: utsav.agarwal@analog.com From: Utsav Agarwal Updating dt bindings for adp5588. Since the device can now function in a purely gpio mode, the following keypad specific properties are now made optional: - interrupts - keypad,num-rows - keypad,num-columns - linux,keymap However the above properties are required to be specified when configuring the device as a keypad, dependencies have been added such that specifying either one would require the remaining as well. Note that interrupts are optional, but required when the device has either been configured in keypad mode or as an interrupt controller. Signed-off-by: Utsav Agarwal --- .../devicetree/bindings/input/adi,adp5588.yaml | 51 +++++++++++++++++++--- 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/input/adi,adp5588.yaml b/Documentation/devicetree/bindings/input/adi,adp5588.yaml index 26ea66834ae2..827d72ece54b 100644 --- a/Documentation/devicetree/bindings/input/adi,adp5588.yaml +++ b/Documentation/devicetree/bindings/input/adi,adp5588.yaml @@ -49,7 +49,12 @@ properties: interrupt-controller: description: This property applies if either keypad,num-rows lower than 8 or - keypad,num-columns lower than 10. + keypad,num-columns lower than 10. This property is optional if + keypad,num-rows or keypad,num-columns are not specified since the + device then acts as gpio only, during which interrupts may or may + not be utilized. If specified however, interrupts must be also be + provided as all interrupt communication is handled via a single + interrupt line. '#interrupt-cells': const: 2 @@ -65,13 +70,30 @@ properties: minItems: 1 maxItems: 2 + +dependencies: + keypad,num-rows: + - linux,keymap + - keypad,num-columns + keypad,num-columns: + - linux,keymap + - keypad,num-rows + linux,keymap: + - keypad,num-rows + - keypad,num-columns + interrupt-controller: + - interrupts + +if: + required: + - linux,keymap +then: + required: + - interrupts + required: - compatible - reg - - interrupts - - keypad,num-rows - - keypad,num-columns - - linux,keymap unevaluatedProperties: false @@ -108,4 +130,21 @@ examples: >; }; }; -... + + - | + #include + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + gpio@34 { + compatible = "adi,adp5588"; + reg = <0x34>; + + #gpio-cells = <2>; + gpio-controller; + }; + }; + +.