From patchwork Fri Sep 6 20:30:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 173300 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp1214279ilq; Fri, 6 Sep 2019 13:31:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzf2nTYaUlpCRobzSVX5nuclOAIHHmNmSDODDEh1a/2bTizAM5S1FEYn7btcvIiNvMKSvR3 X-Received: by 2002:a63:460c:: with SMTP id t12mr9523121pga.69.1567801860874; Fri, 06 Sep 2019 13:31:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567801860; cv=none; d=google.com; s=arc-20160816; b=vpESaCSd1vSDMwPv6wbPGxCgx2O/cZ+3RpkHw2vbMl/4A+g8klTJvzmccajSUjDdNF +RSb3ooMaoJK51z49up3PBpl3A7Fyz/NepLvqjZWGbYB2InbwB0kVSznjEjSUT48ZENu mq35HOVVUzgw1cxHR8z3N4n8ymV+fZva+s5hxSxsRQ0wJapsGTLU4Fo+js8UvyfHQ1jN fNPs8buJa4MqMH8Mhh+TnkhgOCMAoggbgnhvB/UaFu2eRq0TFCuOp9Y/OR4VOzv33tBH 58P0WDPZO3zVAMfrHoo9tYKyly0AoOV9XBEy8GTXP/yqx6fvGg3E92IlWAlpKKLBWhlU wY/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=hJt9ie/CwFH290nioenPt6TarTQUW3TGmI0Z2Dfa+bo=; b=Q8EWDx3+02yc46pHe4WwsnvWgpudlr6lwD9tsFejqi20DH0q4+3RX0a1bVVlhKlP7c PxJEuAkZW9gCnsX/B9O1pQR53IOxSGRjcxW33R4Y5thlNLqIZdIMlnEPF06+J0+tRptK dkmH77cTLLWL51zSazAc0X+B2q50dx4vcvOOntRhl70+e2wpjG3EUSK9nwhDC4wsTWOe bdO0vP/Sy2/okfSU0Liq8fvFUcsWrkFHei3kC2NgFW7GLg1Ct6clVbjKuFNtO4L9Bpz2 c5VCA6UXn5RbHDfo2i6l2XIm/U4WsVDSYrUaXdbo131xq6jjRIrJ1VXYgLBJEXT955jT MuSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rPdyAOLd; spf=pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-watchdog-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2si5222192pgp.475.2019.09.06.13.31.00 for ; Fri, 06 Sep 2019 13:31:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rPdyAOLd; spf=pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-watchdog-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394494AbfIFUbA (ORCPT ); Fri, 6 Sep 2019 16:31:00 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39594 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391941AbfIFUbA (ORCPT ); Fri, 6 Sep 2019 16:31:00 -0400 Received: by mail-wr1-f67.google.com with SMTP id t16so7843914wra.6 for ; Fri, 06 Sep 2019 13:30:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hJt9ie/CwFH290nioenPt6TarTQUW3TGmI0Z2Dfa+bo=; b=rPdyAOLd/hWoLsxQzZ9HfJ2/dCFPB30qpT714bMbwc/FDbzah86xUPeIJBRsqB686W SDSiEx9979Um2y3wOzjNoLPHS9sMCGoeMJFAPqACQRwzY/uHDU0n6Kw6GvNBpB+rf9hL Ci1j3c4sDGeXmhlONiyPRyECkV93S9hInzibe/4/dW2uMCbWbxVVrBeg4fEHbdc3JkZz L9l3wtKtN1ONVcSyRnjDKrRlsP6tvRijb4ILVNCmTrzrjmlDVVz3p6EKLgpOyzpb4d5x 3jrKSbf0bg00KFsFKio7XtmkP945tosJHlEFV/pxv3TktTAxXHhUCDSXd5lZ632Crmb7 cesw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hJt9ie/CwFH290nioenPt6TarTQUW3TGmI0Z2Dfa+bo=; b=PZlytGzKG1iTBriQCpsMaIvYyn3nh9d8YyotaczGBHa2OOXkIxDeMYQiLQZrii+/BY 5I/skektVUwnIrzwKiEj8QUdsrML/kIugOBRzrO+p0UeUHMPLXquhr0sqjro6mRBSz+M nBcp4GYXRIsAYSeVd9iqrfNLcQR44/Q4Yb0WygsJvxHJwpnmxTVkD+D3MdBsPUMmvsGw s4ZzvBi2ocW2u102F0gt+8rBemlTCTMaAQQvB9iQxfRNfR7hX/qx+27ftO4dD6eDmYkx bqChszbNvtm4LxDt7JNUcF9ko9nablOULHKoAv1+pBq4j39WXSvCLZ/uaGu87ymAsOy1 G+gw== X-Gm-Message-State: APjAAAVy2NOcmucuI811J8oiGSzJIK8mim7N9HkHQH1BjCk/BSDzivSP QN1ffE4XrzWSkdoWPhlZmgMPbg== X-Received: by 2002:a5d:6302:: with SMTP id i2mr9065964wru.249.1567801858400; Fri, 06 Sep 2019 13:30:58 -0700 (PDT) Received: from localhost.localdomain (124.red-83-36-179.dynamicip.rima-tde.net. [83.36.179.124]) by smtp.gmail.com with ESMTPSA id t13sm13330734wra.70.2019.09.06.13.30.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 Sep 2019 13:30:57 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, wim@linux-watchdog.org, linux@roeck-us.net Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org Subject: [PATCH 1/2] watchdog: pm8916_wdt: fix pretimeout registration flow Date: Fri, 6 Sep 2019 22:30:53 +0200 Message-Id: <20190906203054.26725-1-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org When an IRQ is present in the dts, the probe function shall fail if the interrupt can not be registered. The probe function shall also be retried if getting the irq is being deferred. Signed-off-by: Jorge Ramirez-Ortiz --- drivers/watchdog/pm8916_wdt.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) -- 2.23.0 Reviewed-by: Loic Poulain Reviewed-by: Guenter Roeck diff --git a/drivers/watchdog/pm8916_wdt.c b/drivers/watchdog/pm8916_wdt.c index 2d3652004e39..cb5304c26ac3 100644 --- a/drivers/watchdog/pm8916_wdt.c +++ b/drivers/watchdog/pm8916_wdt.c @@ -163,9 +163,18 @@ static int pm8916_wdt_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq > 0) { - if (devm_request_irq(dev, irq, pm8916_wdt_isr, 0, "pm8916_wdt", - wdt)) - irq = 0; + err = devm_request_irq(dev, irq, pm8916_wdt_isr, 0, + "pm8916_wdt", wdt); + if (err) + return err; + + wdt->wdev.info = &pm8916_wdt_pt_ident; + + } else { + if (irq == -EPROBE_DEFER) + return -EPROBE_DEFER; + + wdt->wdev.info = &pm8916_wdt_ident; } /* Configure watchdog to hard-reset mode */ @@ -177,7 +186,6 @@ static int pm8916_wdt_probe(struct platform_device *pdev) return err; } - wdt->wdev.info = (irq > 0) ? &pm8916_wdt_pt_ident : &pm8916_wdt_ident, wdt->wdev.ops = &pm8916_wdt_ops, wdt->wdev.parent = dev; wdt->wdev.min_timeout = PM8916_WDT_MIN_TIMEOUT; From patchwork Fri Sep 6 20:30:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 173301 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp1214369ilq; Fri, 6 Sep 2019 13:31:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqycuTMqrh+kpVEXphjGO0/RnuP8fy0hn7C4IkrtQA2qcDbvMBEEuWzCDrSTW5iRiMros38i X-Received: by 2002:a17:902:b58f:: with SMTP id a15mr11199590pls.81.1567801866848; Fri, 06 Sep 2019 13:31:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567801866; cv=none; d=google.com; s=arc-20160816; b=IwW3zLdSHaGcO/aBZNujlDIDu1qQFz4y1rEcRPcxIoEou31UFX8cyzMIBqRYBkgye7 VkTaQ2qTIdU4hfehPFae5QyxKzJOGQAWaG12ITFQDRvgsyLJJy7d5opdPrJelykk6oRW uEhHnF9KLsku9w/m2DRW7kMA0Gla3UCn3xjSLss8e1+p+Q3Ta8rD0ZklwkLe+w86wafq vu+vAh9cF2/LqeC5KM6t69amEOTjydXlOyiwKgbbpeIR4H0bOkN2R9AQ6jDyQ4m0/Ytv cUO4DtKmFqBHIiW5CtCl0j5d0iwy5qtUQRM/En9vKum33ILXnEjHtQ21wgwqKwu6W+yM lP+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DSA+TZh6EFNutVoqp+yeNCXRU52ohS+l6sFwi4Vq/+4=; b=huMH/96IGq/YLVeEKBKDUsbzN3jhlXWJEp9ACjf3hChO556x/eLjJuJ1Cfwn+Xq7d/ VJ1yGTgwOVfY7y8jlUNuXMjAiUnFo8CUzxRPsLP5hfRRzhsaQ5nhdBUZoQFEqvTzJWeR 8VoJzcfCEs53esJeJLUN4NlOLPxnS9DZS6Yk1p4jWTk/qYgFXGg7CsCiSBDxqgVVI+Oq NSXx0QKKacN8ZpvdfnrxnoTr/HaYOaiBJpr/YoZvbNzBzf4HQee84jmq1qUCkdmTEHcm bH/YGgtizaY0sKppYXMWtvXPe//u9uFQIpWCIU1GRvMBIQOLA71DJbBd7hiJeujHPe2q 05vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n+D8yGsx; spf=pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-watchdog-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bc6si1297411plb.199.2019.09.06.13.31.06 for ; Fri, 06 Sep 2019 13:31:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n+D8yGsx; spf=pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-watchdog-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731976AbfIFUbC (ORCPT ); Fri, 6 Sep 2019 16:31:02 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41625 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392704AbfIFUbB (ORCPT ); Fri, 6 Sep 2019 16:31:01 -0400 Received: by mail-wr1-f68.google.com with SMTP id h7so6832514wrw.8 for ; Fri, 06 Sep 2019 13:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DSA+TZh6EFNutVoqp+yeNCXRU52ohS+l6sFwi4Vq/+4=; b=n+D8yGsxYXEEMK1jJ/ysdmtsbtc662AikRKLEAI9XjZGCMzjmhYhwOaRkSO/sU0X/O vcl14UlaTsYSUWdM0IwhAw1P6V2Rs1hLqS0F5h8M9m1e8xreTdJiQ7cCdYMkSRQF5X6a f7IZbgOYv8qjxRrhwx4d6CaGD4KiWNpSvLeXZQn7PkIkBN5Oo6G4BGFUyu0zOToxyuD4 NdPsXzskMlxdq66gCPoo0qfeKEvxJMu03RiQxiAD+SUvMFU668e5hdkwo9MhAlkV2N/D 2bauUat5BFh2guV3vQhaGduzVJ3csYtu+7e6qB58dO56MctI+qjqGttjIv4zxVCkOF0f IBvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DSA+TZh6EFNutVoqp+yeNCXRU52ohS+l6sFwi4Vq/+4=; b=YLRAbH6o+C8v3CJpt+cFYsRDQm03XO7qU1M30LphuNak5Mpt3bxDXHWwws3p1REibn wGKB+RBHyw3gObLBjvYfsUUjdfFXjPA2IjfRanmazOUz6H0OmwexQs/YPQwbXUAeDuqw AonvVx2vXftDzbrz5pDfz34K3YRof28v6GAX8hMDeZTmVzXBtjQGJLJxLPO2nbzpqf1V uWXljbv980X+62p1xB2Uqm9dZZEd2342rcHFR10tINuFuyx+1L5eGUAyZD+6iN8Oq20F 1jSwUzjxUxS73c/pvrjUDmxiDIuegipaAv1EPAce3Rl3gTkqJxXO8mpiy+lyT98/6ZEr otzA== X-Gm-Message-State: APjAAAV/9PUjTgqOkVTZ7oHkD7Kqwele4Yfp+Ws+M0f8VtiTbQ7dctWR Zap7/5JkiDZJ3HiTL6acQCO1zA== X-Received: by 2002:adf:e947:: with SMTP id m7mr9119067wrn.178.1567801859429; Fri, 06 Sep 2019 13:30:59 -0700 (PDT) Received: from localhost.localdomain (124.red-83-36-179.dynamicip.rima-tde.net. [83.36.179.124]) by smtp.gmail.com with ESMTPSA id t13sm13330734wra.70.2019.09.06.13.30.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 Sep 2019 13:30:58 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, wim@linux-watchdog.org, linux@roeck-us.net Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org Subject: [PATCH 2/2] watchdog: pm8916_wdt: fix missing include Date: Fri, 6 Sep 2019 22:30:54 +0200 Message-Id: <20190906203054.26725-2-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190906203054.26725-1-jorge.ramirez-ortiz@linaro.org> References: <20190906203054.26725-1-jorge.ramirez-ortiz@linaro.org> MIME-Version: 1.0 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org As per Documentation/process/submit-checklist.rst, when using a facility #include the file that defines/declares that facility. Don't depend on other header files pulling in ones that you use. Signed-off-by: Jorge Ramirez-Ortiz --- drivers/watchdog/pm8916_wdt.c | 1 + 1 file changed, 1 insertion(+) -- 2.23.0 diff --git a/drivers/watchdog/pm8916_wdt.c b/drivers/watchdog/pm8916_wdt.c index cb5304c26ac3..b8d9df0f96f7 100644 --- a/drivers/watchdog/pm8916_wdt.c +++ b/drivers/watchdog/pm8916_wdt.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include #include #include