From patchwork Mon Dec 18 09:31:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 10118589 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 F2B6160390 for ; Mon, 18 Dec 2017 09:32:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E85C028BA7 for ; Mon, 18 Dec 2017 09:32:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD23228C6F; Mon, 18 Dec 2017 09:32:25 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY 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 71E2928BA7 for ; Mon, 18 Dec 2017 09:32: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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=crb3xAgfM9IgEHXqbVUeU3BgNUE5sQ6FRW4wD0qUMCE=; b=E0664dt0qKYqwt /Tq6+yilrODA9mSbkwuu025tiV9W4uAN0tYTXLCNPPL/Agp+SIr4bf2dufSJTp4R3Xa5jXHXDVGkD A3Gxq7QwI7Q3sl2hcW5JRrH8TaZTNVMLbXxEtNekxDUR3PQGXv5M82euBPWCpDFU5vWuVY+iLeNON QQqPOXxB1favBmr4vCAiiPxv7ydlUQOxDrvNJjs+Nk/z5KMKHEfZYJi9fTFJtzKSniSKpJAuCy1// XhOVh2SbutEmcNaccKFmqjgj/DmPI2lY19/MtJ2fI6IcdrRjzhy1YbxehXAG/pIiVHOAqJZaBf8mV 1HFjRsQzNDk4SOSSauZQ==; 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 1eQrmb-0006nK-2M; Mon, 18 Dec 2017 09:32:25 +0000 Received: from eddie.linux-mips.org ([148.251.95.138] helo=cvs.linux-mips.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eQrmV-0006m1-KY for linux-arm-kernel@lists.infradead.org; Mon, 18 Dec 2017 09:32:22 +0000 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990477AbdLRJbyvB7HU (ORCPT ); Mon, 18 Dec 2017 10:31:54 +0100 Date: Mon, 18 Dec 2017 10:31:53 +0100 From: Ladislav Michl To: Keerthy Subject: Re: [PATCH v5 7/8] pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops Message-ID: <20171218093153.GA22729@lenoch> References: <1513059137-21593-1-git-send-email-j-keerthy@ti.com> <1513059137-21593-8-git-send-email-j-keerthy@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1513059137-21593-8-git-send-email-j-keerthy@ti.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171218_013220_014618_6F48F591 X-CRM114-Status: GOOD ( 12.29 ) 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, grygorii.strashko@ti.com, aaro.koskinen@iki.fi, tony@atomide.com, daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux@armlinux.org.uk, t-kristo@ti.com, thierry.reding@gmail.com, sebastian.reichel@collabora.co.uk, linux-omap@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 Keerthy, On Tue, Dec 12, 2017 at 11:42:16AM +0530, Keerthy wrote: > Adapt driver to utilize dmtimer pdata ops instead of pdata-quirks. > > Signed-off-by: Keerthy > --- > > Changes in v4: > > * Switched to dev_get_platdata. Where do you expect dev.platform_data to be set? PWM driver is failing with: omap-dmtimer-pwm dmtimer-pwm: dmtimer pdata structure NULL omap-dmtimer-pwm: probe of dmtimer-pwm failed with error -22 Which I fixed with patch bellow, to be able to test your patchset. Also I'm running a bit out of time, so I'll send few clean up patches and event capture code to get some feedback early. Regards, ladis > > Changes in v3: > > * Used of_find_platdata_by_node function to fetch platform > data for timer node. > > drivers/pwm/pwm-omap-dmtimer.c | 39 ++++++++++++++++++++++----------------- > 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/drivers/clocksource/timer-dm.c b/drivers/clocksource/timer-dm.c index 39be39e6a8dd..d3d8a49cae0d 100644 --- a/drivers/clocksource/timer-dm.c +++ b/drivers/clocksource/timer-dm.c @@ -773,6 +773,7 @@ static int omap_dm_timer_probe(struct platform_device *pdev) dev_err(dev, "%s: no platform data.\n", __func__); return -ENODEV; } + dev->platform_data = pdata; irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (unlikely(!irq)) {