From patchwork Sat Feb 25 07:42:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9591507 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5536A6042C for ; Sat, 25 Feb 2017 07:49:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D3B32863A for ; Sat, 25 Feb 2017 07:49:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E73F286B4; Sat, 25 Feb 2017 07:49:23 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 B3F7C2863A for ; Sat, 25 Feb 2017 07:49:22 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=DNO1dQgk8eGeb84tGZ5/Hgq8FOvg+y3hBTIvDHgROFo=; b=QEEbK6gxURYbLn6v3S20Rplsjz RkBmN8W1OZ4gBy3l6HXVDuVq+HF/i+phYvIN+8nqGo9JVYb6JYMb4BlhiEH4cF/K6QIOpurxlHVTt kBwhrYKFkZWznFNAQm6NJEMaxiNkvj63WcPCzihjcMOXIOlBfxe1VlqDrF5PG23etKKmrUwe3W0Ez riHhXqBzhnHgKuMSD70IuztRJzogBbRIvvkPECcRCJ8O/8ZvxrG9EeKRb3Z8t+GkCALZdLk7v3gAK Rj+yRnD+L/t7HFrqIe/C4EpOjPRXgAX+yN9wiELChWq8H0mflnSI/8j5SLgheBMN2kZaQbrgGaOQC 0JORBP6A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1chX6V-00080k-6Q; Sat, 25 Feb 2017 07:49:19 +0000 Received: from forward7h.cmail.yandex.net ([87.250.230.218]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1chX0s-0005cH-Lt for linux-arm-kernel@lists.infradead.org; Sat, 25 Feb 2017 07:43:33 +0000 Received: from smtp1m.mail.yandex.net (smtp1m.mail.yandex.net [IPv6:2a02:6b8:0:2519::121]) by forward7h.cmail.yandex.net (Yandex) with ESMTP id D621321EA6; Sat, 25 Feb 2017 10:43:03 +0300 (MSK) Received: from smtp1m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1m.mail.yandex.net (Yandex) with ESMTP id 6BD7963C0C92; Sat, 25 Feb 2017 10:42:57 +0300 (MSK) Received: by smtp1m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id FYvF4qBOGA-gpt0ec06; Sat, 25 Feb 2017 10:42:56 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aosc.xyz; s=mail; t=1488008576; bh=uTmE9y9bw/aacU5mfpQ0yJi54epCKS1Ex6dWHrzuTIc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=lOU7TI7/gpp3yL+L73uZHG0B+IC90MeJXhzZOtoFSK8sQGtVvWm2GrtpjZt19NMKF Jgg+gOFNeprReSx1HbXwuPiSevgEZq6g3wgumd+X4/5FczTQhFwU9+wXY8s5F2dsz1 3CvDHj5So1sI9aC0kgxZn3VXCqphdqAvKTj26C8A= Authentication-Results: smtp1m.mail.yandex.net; dkim=pass header.i=@aosc.xyz X-Yandex-ForeignMX: US X-Yandex-Suid-Status: 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 1130000036118848 From: Icenowy Zheng To: Thierry Reding , Rob Herring , Maxime Ripard , Chen-Yu Tsai Subject: [PATCH 2/3] pwm: sunxi: Add A64 support Date: Sat, 25 Feb 2017 15:42:15 +0800 Message-Id: <20170225074216.64868-2-icenowy@aosc.xyz> X-Mailer: git-send-email 2.11.1 In-Reply-To: <20170225074216.64868-1-icenowy@aosc.xyz> References: <20170225074216.64868-1-icenowy@aosc.xyz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170224_234330_962319_B288BBB1 X-CRM114-Status: UNSURE ( 8.46 ) 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: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Icenowy Zheng , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 A64 PWM controller has same register layout as sun4i driver, so it works by adding A64 specific data. Signed-off-by: Icenowy Zheng --- drivers/pwm/pwm-sun4i.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c index 1284ffa05921..ca3431e03fb8 100644 --- a/drivers/pwm/pwm-sun4i.c +++ b/drivers/pwm/pwm-sun4i.c @@ -290,6 +290,12 @@ static const struct sun4i_pwm_data sun4i_pwm_data_h3 = { .npwm = 1, }; +static const struct sun4i_pwm_data sun4i_pwm_data_a64 = { + .has_prescaler_bypass = true, + .has_rdy = true, + .npwm = 1, +}; + static const struct of_device_id sun4i_pwm_dt_ids[] = { { .compatible = "allwinner,sun4i-a10-pwm", @@ -307,6 +313,9 @@ static const struct of_device_id sun4i_pwm_dt_ids[] = { .compatible = "allwinner,sun8i-h3-pwm", .data = &sun4i_pwm_data_h3, }, { + .compatible = "allwinner,sun50i-a64-pwm", + .data = &sun4i_pwm_data_a64, + }, { /* sentinel */ }, };