From patchwork Wed Mar 27 00:24:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 10872339 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA13013B5 for ; Wed, 27 Mar 2019 00:25:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0D2428D55 for ; Wed, 27 Mar 2019 00:25:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B502B28D69; Wed, 27 Mar 2019 00:25:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=2.0 tests=BAYES_00,DKIM_ADSP_DISCARD, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 221D628D66 for ; Wed, 27 Mar 2019 00:25:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc: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:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UxCswUsumHsFT14PtTfzgwinNwZtEAZdeIH2ET7Q0tU=; b=AnF2H145EvfpOD OyyaNLfF4R95irajhkTNz9sKOrVEGUGqEHMxvyV9McuGd4TlKDR5jjak4GyUnQmHTU9oXkqN+p0xL 5g7v+VmPOsCcNmpbfd7V5qhN1pvHMkPLz2rFztZqfE4yxpZUXNa8CJYjhrh05kIbUGA/VGrElHVTv hNq92TLrY/M+VHVFmD2w2ZmOmcgWmBlWp3yxjQO/9GEblkbJJ/9OwSenB+HNHNmVIysj387ziqcY4 MDQ4xQaMQFjMtYU0qcKuYfgrzf5ovzNlVCRpV9x3jySodTg0vZZJ0/ymRKp5NW3kvcJKKmG7UvGgw F5RzHjY8+YaU3jvec7dA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8wNk-0008Hh-5S; Wed, 27 Mar 2019 00:25:28 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8wNQ-00079Q-L5 for linux-arm-kernel@lists.infradead.org; Wed, 27 Mar 2019 00:25:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1553646306; bh=XeJO4BlnuiJHnl+F5QEbu+5ZsF1rCA6R8IPqgTmgSPs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BqeXeSVn0Tm9kkyMncY4nQvM1C+HeyhN0QrVpQdYxTsXy5Yinpk0TUY46EzDvG+4l e7HHp57EL49HJhEh+Vy3VBztp3NCgCHZzFt926T7Vje/U7SIKJRMUYmFYLQDfaTAwB gwid2tdIajZCX3B3ky/x3hRzzwvslkowF+lEKfeU= From: megous@megous.com To: maxime.ripard@free-electrons.com, wens@csie.org, robh@kernel.org, mark.rutland@arm.com Subject: [PATCH v4 1/4] input: sun4i-a10-lradc-keys: Add support for A83T Date: Wed, 27 Mar 2019 01:24:58 +0100 Message-Id: <20190327002501.4630-2-megous@megous.com> In-Reply-To: <20190327002501.4630-1-megous@megous.com> References: <20190327002501.4630-1-megous@megous.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190326_172509_045003_2E9A4986 X-CRM114-Status: GOOD ( 11.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ziping Chen , linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ziping Chen Allwinner A83T SoC has a low res adc like the one in Allwinner A10 SoC, however, the A10 SoC's vref of lradc internally is divided by 2/3 and the A83T SoC's vref of lradc internally is divided by 3/4, thus add a hardware variant for it to be compatible with various devices. Signed-off-by: Ziping Chen Acked-by: Maxime Ripard --- drivers/input/keyboard/sun4i-lradc-keys.c | 38 ++++++++++++++++++++--- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/drivers/input/keyboard/sun4i-lradc-keys.c b/drivers/input/keyboard/sun4i-lradc-keys.c index 57272df34cd5..df3eec72a9b2 100644 --- a/drivers/input/keyboard/sun4i-lradc-keys.c +++ b/drivers/input/keyboard/sun4i-lradc-keys.c @@ -46,6 +46,7 @@ #define CONTINUE_TIME_SEL(x) ((x) << 16) /* 4 bits */ #define KEY_MODE_SEL(x) ((x) << 12) /* 2 bits */ #define LEVELA_B_CNT(x) ((x) << 8) /* 4 bits */ +#define HOLD_KEY_EN(x) ((x) << 7) #define HOLD_EN(x) ((x) << 6) #define LEVELB_VOL(x) ((x) << 4) /* 2 bits */ #define SAMPLE_RATE(x) ((x) << 2) /* 2 bits */ @@ -63,6 +64,25 @@ #define CHAN0_KEYDOWN_IRQ BIT(1) #define CHAN0_DATA_IRQ BIT(0) +/* struct lradc_variant - Describe sun4i-a10-lradc-keys hardware variant + * @divisor_numerator: The numerator of lradc Vref internally divisor + * @divisor_denominator: The denominator of lradc Vref internally divisor + */ +struct lradc_variant { + u8 divisor_numerator; + u8 divisor_denominator; +}; + +static const struct lradc_variant lradc_variant_a10 = { + .divisor_numerator = 2, + .divisor_denominator = 3 +}; + +static const struct lradc_variant r_lradc_variant_a83t = { + .divisor_numerator = 3, + .divisor_denominator = 4 +}; + struct sun4i_lradc_keymap { u32 voltage; u32 keycode; @@ -74,6 +94,7 @@ struct sun4i_lradc_data { void __iomem *base; struct regulator *vref_supply; struct sun4i_lradc_keymap *chan0_map; + const struct lradc_variant *variant; u32 chan0_map_count; u32 chan0_keycode; u32 vref; @@ -128,9 +149,9 @@ static int sun4i_lradc_open(struct input_dev *dev) if (error) return error; - /* lradc Vref internally is divided by 2/3 */ - lradc->vref = regulator_get_voltage(lradc->vref_supply) * 2 / 3; - + lradc->vref = regulator_get_voltage(lradc->vref_supply) * + lradc->variant->divisor_numerator / + lradc->variant->divisor_denominator; /* * Set sample time to 4 ms / 250 Hz. Wait 2 * 4 ms for key to * stabilize on press, wait (1 + 1) * 4 ms for key release @@ -222,6 +243,12 @@ static int sun4i_lradc_probe(struct platform_device *pdev) if (error) return error; + lradc->variant = of_device_get_match_data(&pdev->dev); + if (!lradc->variant) { + dev_err(&pdev->dev, "Missing sun4i-a10-lradc-keys variant\n"); + return -EINVAL; + } + lradc->vref_supply = devm_regulator_get(dev, "vref"); if (IS_ERR(lradc->vref_supply)) return PTR_ERR(lradc->vref_supply); @@ -265,7 +292,10 @@ static int sun4i_lradc_probe(struct platform_device *pdev) } static const struct of_device_id sun4i_lradc_of_match[] = { - { .compatible = "allwinner,sun4i-a10-lradc-keys", }, + { .compatible = "allwinner,sun4i-a10-lradc-keys", + .data = &lradc_variant_a10 }, + { .compatible = "allwinner,sun8i-a83t-r-lradc", + .data = &r_lradc_variant_a83t }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, sun4i_lradc_of_match); From patchwork Wed Mar 27 00:24:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 10872337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B77BB922 for ; Wed, 27 Mar 2019 00:25:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B0A928D55 for ; Wed, 27 Mar 2019 00:25:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E89728D5E; Wed, 27 Mar 2019 00:25:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=2.0 tests=BAYES_00,DKIM_ADSP_DISCARD, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1B06E28D63 for ; Wed, 27 Mar 2019 00:25:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc: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:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Z6t2GcQNtGVIAHNzOcCazAJi+Az0tXZQviQ5s7YR/9g=; b=YViRogXemQzWnf DPYMngtomGg/gjAIwG/Xs+xNjaMrfVmv8X6uyRLfH4vobdVPmkidm73ntAZ65hAB6eCJ9FLjrjaHx EZ1ZaoUyk4v9edDstJtz3GhP/BfrVMvpF4W+x758dcjYfwcPnp08tx3xIsvm9WCyd11zc0KrFjpXR RAKm7pJ8qVThE76ku/kav0WWIYYMI2k+txE8Wc8rABFouxualPUmnNHaaSOhPNtOSxYDEoMqaYJ4x HxE78cLMuqtQTjOm791EIfimgqV/SrhC7E1PoXGwqMENhjnK1/GhBUN3MePTLye9FfmoVTpDyrPBE 9V2OVCUfPVHByQPu5zMQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8wNd-00087m-BO; Wed, 27 Mar 2019 00:25:21 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8wNQ-0007B3-GT for linux-arm-kernel@lists.infradead.org; Wed, 27 Mar 2019 00:25:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1553646306; bh=S1jLp574hnK0CY+FYoqQJqxFPycojWM2CD1ibwebjmA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U5dedmVlWOomyVKwzC6zlySyeiozHeVneLWqHFd49It+G3MHcpnMdQ4ZYB4MO7+vC BbazL2lp2auV+VSsNjpWiFXD62S8kjoOJJshgWhpNlQ+Kl5XAisD84bUn+ZXW/RSqH iVFjNxTKGlKJ8TaL2cc3ZSeBZNNTuou2+Bm6sU64= From: megous@megous.com To: maxime.ripard@free-electrons.com, wens@csie.org, robh@kernel.org, mark.rutland@arm.com Subject: [PATCH v4 2/4] dt-bindings: input: Add R_LRADC support for A83T Date: Wed, 27 Mar 2019 01:24:59 +0100 Message-Id: <20190327002501.4630-3-megous@megous.com> In-Reply-To: <20190327002501.4630-1-megous@megous.com> References: <20190327002501.4630-1-megous@megous.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190326_172508_742631_9B0DB010 X-CRM114-Status: UNSURE ( 8.98 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ziping Chen , linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ziping Chen Allwinner A83T SoC has a low res ADC like the one in Allwinner A10 SoC. Add binding for it. Signed-off-by: Ziping Chen Acked-by: Rob Herring --- .../devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt index 1458c3179a63..496125c6bfb7 100644 --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys ------------------------------------------------ Required properties: - - compatible: "allwinner,sun4i-a10-lradc-keys" + - compatible: should be one of the following string: + "allwinner,sun4i-a10-lradc-keys" + "allwinner,sun8i-a83t-r-lradc" - reg: mmio address range of the chip - interrupts: interrupt to which the chip is connected - vref-supply: powersupply for the lradc reference voltage -Each key is represented as a sub-node of "allwinner,sun4i-a10-lradc-keys": +Each key is represented as a sub-node of the compatible mentioned above: Required subnode-properties: - label: Descriptive name of the key. From patchwork Wed Mar 27 00:25:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 10872343 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11FB9922 for ; Wed, 27 Mar 2019 00:26:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC16B28D55 for ; Wed, 27 Mar 2019 00:26:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E067C28D66; Wed, 27 Mar 2019 00:26:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=2.0 tests=BAYES_00,DKIM_ADSP_DISCARD, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9A76B28D55 for ; Wed, 27 Mar 2019 00:26:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc: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:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/OnMZRW3lq1GZ49TQ3VPPAEdYuYFdNNkM516ojqVNak=; b=TdSuJg9dxKB4yr Feffiqhvb395vRUc2eius48V0T9j/tNNAXPsDFvasBeRI9SHKN5TlZN1jZSOTqVO72BX7ZeaCBfpN Ji98QGbzWdMo5EfSO64W9GmPaOn2j5c4pNImAJoctlPMLRXwvJTn9ktJiadoYCu3raDU6qCW3zDql 5lp/9IphwPacujN1dg3RoyIVG9qwG+byDZH9PzpcUEUNbo83jUOVm9yW2CQvzDqu06G8ityfm2Pvr 9R395NURUIbpqYiOzrJQEyjET+Y+nX7WMHMxqMlf5dzQxdL41h1VUAOv0PFxQna8jhdYq61XeQOEY 3tAPz0hQ5CO+7XKSEaRA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8wOM-0000dh-7R; Wed, 27 Mar 2019 00:26:06 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8wNQ-0007C9-JF for linux-arm-kernel@lists.infradead.org; Wed, 27 Mar 2019 00:25:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1553646307; bh=BvNeqUs9hKJFrBRXRuyMj6CRS9tzzF8nDPi9WShJ2lE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NJXaO7MlGQHwaOjnRpYa6/AnhteoX1UKIA5KsJuYFtzfXbxWl4u6VgejAiTt8sgqT 4mh12gJ6rwIJIjLv3DhCKgqpEGQIuTU4/ocxr6fbhCqKjJTi1nyQtwnK6Lgpt6WCR2 mV1/Nnc/FAIFAv/jmZ/w68GGFgIZUfFtpTdY10kE= From: megous@megous.com To: maxime.ripard@free-electrons.com, wens@csie.org, robh@kernel.org, mark.rutland@arm.com Subject: [PATCH v4 3/4] ARM: dts: sunxi: Add R_LRADC support for A83T Date: Wed, 27 Mar 2019 01:25:00 +0100 Message-Id: <20190327002501.4630-4-megous@megous.com> In-Reply-To: <20190327002501.4630-1-megous@megous.com> References: <20190327002501.4630-1-megous@megous.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190326_172509_551887_45735551 X-CRM114-Status: UNSURE ( 7.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ziping Chen , linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ziping Chen Allwinner A83T SoC has a low res adc like the one in Allwinner A10 SoC. Now the driver has been modified to support it. Add support for it. Signed-off-by: Ziping Chen --- arch/arm/boot/dts/sun8i-a83t.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi index fcb7ef5ce2df..de1b77e49f06 100644 --- a/arch/arm/boot/dts/sun8i-a83t.dtsi +++ b/arch/arm/boot/dts/sun8i-a83t.dtsi @@ -1024,6 +1024,13 @@ status = "disabled"; }; + r_lradc: lradc@1f03c00 { + compatible = "allwinner,sun8i-a83t-r-lradc"; + reg = <0x01f03c00 0x100>; + interrupts = ; + status = "disabled"; + }; + r_pio: pinctrl@1f02c00 { compatible = "allwinner,sun8i-a83t-r-pinctrl"; reg = <0x01f02c00 0x400>; From patchwork Wed Mar 27 00:25:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 10872347 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9EDE9139A for ; Wed, 27 Mar 2019 00:37:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82DD128C0C for ; Wed, 27 Mar 2019 00:37:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7551828D6B; Wed, 27 Mar 2019 00:37:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=2.0 tests=BAYES_00,DKIM_ADSP_DISCARD, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B88D528D6A for ; Wed, 27 Mar 2019 00:37:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc: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:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sivoUA7OZUiN4NIDucaJUEWkZuQv0/suCoLCQsk3/tA=; b=onmjuNUVLrTli0 RSWLHaTJZKlhbT9lgyONQstp/Fp7vGPJXcoQ6UHvzslJtMj/xaB/UUlgXfu07+UQrlAec0XLeTyKX Cu5UUcmCEKPnAr9VurdOrEk6KJ+On5QszVeSqdm7tlQSA/zJX8Ah2hZgwvNSyx+hpFeKlQAO2JtkI x3DneDlMaHuP+2S15DIAkKLOWe2LqGiKpg4zyx9tE4HkOqruEqspTlUyqmOOKjWP5ZwHbyHZItWBN txMIZWeVBC7mYUytWa6nA12KaRjIellLkK9EeXbAB0w4sBVVY9NMX3lp6hWMoEv0L9qlJ+cWajROc 9YeknYZCre5mYiljgXZQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8wYz-0004Um-MD; Wed, 27 Mar 2019 00:37:05 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8wNQ-0007EY-Us for linux-arm-kernel@lists.infradead.org; Wed, 27 Mar 2019 00:25:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1553646307; bh=wkW4pbocJoS4nnoajhIfit3K4302v+XeqpmoPTPOOQc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kBoHUS+EDsBYfceR4iTtz/GxwZ72nyfLEkftbqCuQdKI5PMiOo9nsFG5jaFJe1C1U G5dcvlGeamf+MB/5fLVZML9tQpKM/ToaO6nD9btvjBb6kdSIYt03NyGd+hBi7O5+zM hgDIdy+bf4F7xCFQ9jJallcX4WzEUOy310A5ZH6k= From: megous@megous.com To: maxime.ripard@free-electrons.com, wens@csie.org, robh@kernel.org, mark.rutland@arm.com Subject: [PATCH v4 4/4] ARM: dts: sun8i: tbs-a711: Add support for volume keys input Date: Wed, 27 Mar 2019 01:25:01 +0100 Message-Id: <20190327002501.4630-5-megous@megous.com> In-Reply-To: <20190327002501.4630-1-megous@megous.com> References: <20190327002501.4630-1-megous@megous.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190326_172509_255311_335661C1 X-CRM114-Status: UNSURE ( 8.17 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, Ziping Chen , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ondrej Jirman TBS A711 tablet has volume up/down keys connected to r_lradc. Add support for these keys. Signed-off-by: Ondrej Jirman --- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts index 1e840ab5a541..6ecdc11b7059 100644 --- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts @@ -46,6 +46,7 @@ #include #include +#include / { model = "TBS A711 Tablet"; @@ -200,6 +201,25 @@ status = "okay"; }; +&r_lradc { + vref-supply = <®_aldo2>; + status = "okay"; + + button@210 { + label = "Volume Up"; + linux,code = ; + channel = <0>; + voltage = <210000>; + }; + + button@410 { + label = "Volume Down"; + linux,code = ; + channel = <0>; + voltage = <410000>; + }; +}; + &r_rsb { status = "okay";