Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp3076117imc; Sat, 23 Feb 2019 19:21:27 -0800 (PST) X-Google-Smtp-Source: AHgI3IasfifISySVF6goLInHS+VFEITvQVOKUcJ2Da0/r3Ic85tmTZEfsHSeGSS15m8Alg9AW1R4 X-Received: by 2002:a63:e952:: with SMTP id q18mr11137543pgj.156.1550978487746; Sat, 23 Feb 2019 19:21:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550978487; cv=none; d=google.com; s=arc-20160816; b=qE7T4TKC34W0HAhMj14cgyZV/EQY3UUkhadAV8ebGvDihf6jbxtlWnF3R+W6+TDi8c grVxeBhQYTV7k2z0gl8is3lTWG4pw8bQ/oL5Bek0Vdd/RfZKK5fhh67sSlZsCy81QTTR Iq7fgOEUE6ujdqRX/2YFpHUxE4VjSiChxixQ5Ll2nJZr46yh25dNG2QcV++e9D0y8qr2 kl72+s4taVrjwlYT7HkJkBL4oYhRmYStnChbaP65Kson/QtgryhsWClyHnpiATmdXucj M9x3czi38CekmppvtwiuHQu3bqMzxokgCitFUNR4YZGrTBa2RigQoBxLy/vCcUbGOs6T N07Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=yiEhL0DGWWum/tuGZwjPTbXUSmgMoh8TiLPmsv85WSw=; b=rzdso2TZkyncR03Jyb7KIoAuqwTWsApKggACVWF5uxQOYzEW7M8aBszeeNGm9KEVtk 3IDxO7tQAZpX5Xib45+Hl57CW7AkC9FwQqawk2fwNeuWWGp66uFuRpiDoRgXQM+MAF9L zqAieeJMPH4E09T1NEpr8+NanWGrfzTMCdgWMYd13HkqTUVQvU0g3hZDk7ourEEtE3KI gICGxcdtX+ghog5ImWZLYscZfVrjYq5v4IZsmf8TbSEbo3kckPI+DeAQQJIHLCZWaZHg smmRPIYX+HsRBtj0lTih0wdZJ8qVSWJK2hxyXVpEJ7IzjFAM08YSJPJCfa++NutuGM84 590Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bN2yG6j4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8si5237733pgo.166.2019.02.23.19.20.59; Sat, 23 Feb 2019 19:21:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bN2yG6j4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728085AbfBXDU1 (ORCPT + 99 others); Sat, 23 Feb 2019 22:20:27 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42793 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727800AbfBXDU0 (ORCPT ); Sat, 23 Feb 2019 22:20:26 -0500 Received: by mail-pg1-f195.google.com with SMTP id b2so2896283pgl.9; Sat, 23 Feb 2019 19:20:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=yiEhL0DGWWum/tuGZwjPTbXUSmgMoh8TiLPmsv85WSw=; b=bN2yG6j4ZAgHA0RKnJA1/KiYbgp2tIcvSiJAh/tRE2byCafAFshloQTv5u74uwO2vF +2PzIn2wCXbo2hx6UynbB8bMMhQfMyHES+4uol2MtrQRxtGtOEWklumSik7YYjuKXZtc EeKou036QEjedNaOH8k4p26kBDMA/nwVRBrFTQN2Ft13Bm5X9A/aZAnM5gkh146VZkW7 Ori9ea/+BWiYRgt7M7QXAHW2NrtUSOvDRBZIFwikw7Sbxr9COy0orYAZ+1lB2Y3PBTQ1 /j34DjE+4uJtRf/1LJmhmE8C3FZQ/S0UMbGPhLkqY8uDJ9OVYiUUQZnPwo+zJfeASGWG Scbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yiEhL0DGWWum/tuGZwjPTbXUSmgMoh8TiLPmsv85WSw=; b=DfhYcH5tizK+sSH6MzJZ1mcl9w8rOmAZUm+mrJQ7R+LRxdIdduaAucAYK5xUf69pE2 kvwbuBiNOfGGIp6p5FO2hGd3R27XW6ZT5+W5gYV5rZ5euhVMJCNb0o+kwzbNn0F8XMbn ZXi2bE9MYB1hUtGkQJz0mG10Zm+EOr316w/df+NONG0HEijGd2tUyaza0XqsRjXzlGV1 8KnDMyvvm2P/MBABA3zeGNSNJH3dkUNh9/F5ybORGO6QCm+ftG2OwLE/czs1CToi8yU2 YL3MgiPJYmcee9hn0tf2n2z0CLwT80BPUMSnDysXxNg4bTOpzbnqEhezh6NHvtxeRWg5 pcgg== X-Gm-Message-State: AHQUAuYgtTrBqTyX/WCNvJfMEBlqjkRNnWq+5NcLLQIxsZ3/wYWp0dFl sQaeUczJGKw0B+Pud9vC7MqaHC55 X-Received: by 2002:a63:aa46:: with SMTP id x6mr11416392pgo.452.1550978425602; Sat, 23 Feb 2019 19:20:25 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id d131sm9830977pfd.108.2019.02.23.19.20.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Feb 2019 19:20:24 -0800 (PST) Subject: Re: [PATCH RESEND V2 1/4] dt-bindings: fsl: scu: add watchdog binding To: Anson Huang , Rob Herring Cc: "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "wim@linux-watchdog.org" , Aisheng Dong , "ulf.hansson@linaro.org" , Daniel Baluta , Andy Gross , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "arnd@arndb.de" , "bjorn.andersson@linaro.org" , "jagan@amarulasolutions.com" , "enric.balletbo@collabora.com" , "marc.w.gonzalez@free.fr" , "olof@lixom.net" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-watchdog@vger.kernel.org" , dl-linux-imx References: <1550472539-16590-1-git-send-email-Anson.Huang@nxp.com> <1550472539-16590-2-git-send-email-Anson.Huang@nxp.com> <20190222195217.GA22194@bogus> From: Guenter Roeck Message-ID: <96932b3e-87f1-d8f2-95bc-0e9a8d5d45ed@roeck-us.net> Date: Sat, 23 Feb 2019 19:20:21 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/23/19 7:04 PM, Anson Huang wrote: > Hi, Guenter/Rob > > Best Regards! > Anson Huang > >> -----Original Message----- >> From: Guenter Roeck [mailto:groeck7@gmail.com] On Behalf Of Guenter >> Roeck >> Sent: 2019年2月24日 1:08 >> To: Rob Herring ; Anson Huang >> Cc: mark.rutland@arm.com; shawnguo@kernel.org; >> s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com; >> catalin.marinas@arm.com; will.deacon@arm.com; wim@linux-watchdog.org; >> Aisheng Dong ; ulf.hansson@linaro.org; Daniel >> Baluta ; Andy Gross ; >> horms+renesas@verge.net.au; heiko@sntech.de; arnd@arndb.de; >> bjorn.andersson@linaro.org; jagan@amarulasolutions.com; >> enric.balletbo@collabora.com; marc.w.gonzalez@free.fr; olof@lixom.net; >> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm- >> kernel@lists.infradead.org; linux-watchdog@vger.kernel.org; dl-linux-imx >> >> Subject: Re: [PATCH RESEND V2 1/4] dt-bindings: fsl: scu: add watchdog >> binding >> >> On 2/22/19 11:52 AM, Rob Herring wrote: >>> On Mon, Feb 18, 2019 at 06:53:48AM +0000, Anson Huang wrote: >>>> Add i.MX8QXP system controller watchdog binding. >>>> >>>> Signed-off-by: Anson Huang >>>> --- >>>> Changes since V1: >>>> - update dts node name to "watchdog"; >>>> --- >>>> Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 10 >> ++++++++++ >>>> 1 file changed, 10 insertions(+) >>>> >>>> diff --git >>>> a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt >>>> b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt >>>> index 4b79751..f388ec6 100644 >>>> --- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt >>>> +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt >>>> @@ -136,6 +136,12 @@ Required properties: >>>> resource id for thermal driver to get temperature >> via >>>> SCU IPC. >>>> >>>> +Watchdog bindings based on SCU Message Protocol >>>> +------------------------------------------------------------ >>>> + >>>> +Required properties: >>>> +- compatible: should be "fsl,imx8qxp-sc-wdt"; >>>> + >>>> Example (imx8qxp): >>>> ------------- >>>> lsio_mu1: mailbox@5d1c0000 { >>>> @@ -188,6 +194,10 @@ firmware { >>>> tsens-num = <1>; >>>> #thermal-sensor-cells = <1>; >>>> }; >>>> + >>>> + watchdog: watchdog { >>>> + compatible = "fsl,imx8qxp-sc-wdt"; >>> >>> As-is, there's no reason for this to be in DT. The parent node's >>> driver can instantiate the wdog. >>> >> >> As the driver is currently written, you are correct, since it doesn't accept >> watchdog timeout configuration through devicetree. >> >> Question is if that is intended. Is it ? > > I am a little confused, do you mean we no need to have "watchdog" node in side "scu" > node? Or we need to modify the watchdog node's compatible string to " fsl,imx-sc-wdt" to make > it more generic for other platforms? If yes, I can resend the patch series to modify it. > I think Rob suggested that the SCU parent driver should instantiate the watchdog without explicit watchdog node. That would be possible, but it currently uses devm_of_platform_populate() to do the instantiation, and changing that would be a mess. Besides, it does sem to me that your suggested node would describe the hardware, so I am not sure I understand the reasoning. For my part I referred to watchdog_init_timeout(imx_sc_wdd, DEFAULT_TIMEOUT, &pdev->dev); in the driver, which guarantees that the timeout property will not be used to set the timeout. A more common implementation would have been imx_sc_wdd->timeout = DEFAULT_TIMEOUT; ret = watchdog_init_timeout(imx_sc_wdd, timeout, &pdev->dev); where 'timeout' is the module parameter. Which is actually not used in your driver. Hmm ... I wasn't careful enough with my review. The timeout initialization as-is doesn't make sense. I'll comment on that in the patch. Guenter > Anson. > >> >> Thanks, >> Guenter