From patchwork Fri Apr 12 19:17:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2437831 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id A838C3FD1A for ; Fri, 12 Apr 2013 20:02:12 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UQjYV-0005hI-8p; Fri, 12 Apr 2013 19:22:43 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UQjWd-0002UV-8g; Fri, 12 Apr 2013 19:20:43 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UQjVg-0002Qg-47 for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2013 19:19:46 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0ML500BZ4POV9DC0@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Sat, 13 Apr 2013 04:19:43 +0900 (KST) X-AuditID: cbfee61a-b7fa86d0000045ae-dd-51685e4eec06 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 69.08.17838.E4E58615; Sat, 13 Apr 2013 04:19:43 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0ML500CT6PL8T090@mmp2.samsung.com>; Sat, 13 Apr 2013 04:19:42 +0900 (KST) From: Tomasz Figa To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 14/14] clocksource: samsung-pwm: Prepare for clocksource_of_init Date: Fri, 12 Apr 2013 21:17:30 +0200 Message-id: <1365794250-14436-15-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1365794250-14436-1-git-send-email-t.figa@samsung.com> References: <1365794250-14436-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPIsWRmVeSWpSXmKPExsVy+t9jQV3/uIxAgwO+Fn8nHWO32Pv2H6PF v9mn2CxufX7EbrFx5Uc2iwOzH7JaHO2xs/j/6DWrxelL1xgtDq5bympx5reuRe+Cq2wWK7Ze YLE42/SG3WLT42usFjPO72OyuH2Z1+L3tkYWi7VH7rJbLL1+kcni0rwmFovv376xWcz7vJPJ Yv2M1ywWmzdNZbZYtesPo4OUx5p5axg9Wpp72Dx+/5rE6LFz1l12jzvX9rB5vDt3jt1j85J6 j/MzFjJ6vJz4m82jb8sqRo/zb6ayeGy/No/ZY9rr82wenzfJeby+MZsxgD+KyyYlNSezLLVI 3y6BK+PRL76Ck3wVE+buYGtgPMfTxcjJISFgIrHlzh5WCFtM4sK99WxdjFwcQgLTGSU+nVjM DOF0MUlMW/CUDaSKTUBN4nPDIzBbREBDYkrXY3aQImaBTywSG/9NAUpwcAgLhEpMXcALUsMi oCqxaPt5ZhCbV8BZYumja+wQ2+Qlnt7vA5vDCRSffPcZmC0k4CTRv7GfcQIj7wJGhlWMoqkF yQXFSem5hnrFibnFpXnpesn5uZsYwdH2TGoH48oGi0OMAhyMSjy8B2QyAoVYE8uKK3MPMUpw MCuJ8MbsTQsU4k1JrKxKLcqPLyrNSS0+xCjNwaIkznug1TpQSCA9sSQ1OzW1ILUIJsvEwSnV wCi9d0KBYLtcSdi2/VdWZP02YVTY5rM00qLv4LGwky97Et/tvNO70Ntk7Qu5tOiHCS86Zu2u nP16ebsF+yyZ+om8b3fce3J3qvC1S75C+zSL539sqP583+GFv8x03sL6x3de9a8RyuWp+/P/ E3dE/RztjktlzEFMcxbtVrM5EqD8W2vh7vn5R9OVWIozEg21mIuKEwFjcjqksgIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130412_151945_459934_77AD275A X-CRM114-Status: UNSURE ( 8.80 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.5 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.24 listed in list.dnswl.org] 1.7 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -2.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: mark.rutland@arm.com, heiko@sntech.de, Tomasz Figa , tomasz.figa@gmail.com, buserror@gmail.com, jacmet@sunsite.dk, augulis.darius@gmail.com, christer@weinigel.se, sylvester.nawrocki@gmail.com, m.szyprowski@samsung.com, kgene.kim@samsung.com, linux@arm.linux.org.uk, kwangwoo.lee@gmail.com, mcuelenaere@gmail.com, arnd@arndb.de, devicetree-discuss@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org, john.stultz@linaro.org, ghcstop@gmail.com, linux@simtec.co.uk, broonie@opensource.wolfsonmicro.com, jekhor@gmail.com, kyungmin.park@samsung.com, tglx@linutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch adds support for clocksource instantiation using clocksource_of_init, by declaring OF clocksources with CLOCKSOURCE_OF_DECLARE() macro. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park --- drivers/clocksource/samsung_pwm.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/samsung_pwm.c b/drivers/clocksource/samsung_pwm.c index b816b65..a12ee08 100644 --- a/drivers/clocksource/samsung_pwm.c +++ b/drivers/clocksource/samsung_pwm.c @@ -590,12 +590,13 @@ static void __init samsung_timer_resources(void) } } -void __init samsung_pwm_clocksource_init(struct platform_device *pdev) +static void __init __samsung_pwm_clocksource_init( + struct platform_device *pdev, struct device_node *np) { u8 mask; int channel; - pwm = samsung_pwm_get(pdev, NULL); + pwm = samsung_pwm_get(pdev, np); if (IS_ERR(pwm)) panic("failed to get PWM device"); @@ -615,3 +616,21 @@ void __init samsung_pwm_clocksource_init(struct platform_device *pdev) samsung_clockevent_init(); samsung_clocksource_init(); } + +static void __init samsung_pwm_clocksource_init_of(struct device_node *np) +{ + __samsung_pwm_clocksource_init(NULL, np); +} +CLOCKSOURCE_OF_DECLARE(s3c2410_pwm, "samsung,s3c2410-pwm", + samsung_pwm_clocksource_init_of); +CLOCKSOURCE_OF_DECLARE(s3c6400_pwm, "samsung,s3c6400-pwm", + samsung_pwm_clocksource_init_of); +CLOCKSOURCE_OF_DECLARE(s5p6440_pwm, "samsung,s5p6440-pwm", + samsung_pwm_clocksource_init_of); +CLOCKSOURCE_OF_DECLARE(s5pc100_pwm, "samsung,s5pc100-pwm", + samsung_pwm_clocksource_init_of); + +void __init samsung_pwm_clocksource_init(struct platform_device *pdev) +{ + __samsung_pwm_clocksource_init(pdev, NULL); +}