From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63CBA37B023 for ; Wed, 8 Jul 2026 14:53:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783522429; cv=none; b=nOVl3bWnrRa5D80hGZPItMeCnHoz3C8V7utvA5ZWctYiyV8VOCElMu3sjquKz1NR/SYK+df6suf99j1+k3r7+gwTGuvq/ZWONGJMO8/FZj1g4RuMWPPoa1JzYLXqiNuVV8g2cW9+CdPtkm+/ymymqkvjPP3PsVrkVIydkV227bc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783522429; c=relaxed/simple; bh=Nf5b4hiV8cnlwR8spJ7fIsiXOmlVngm3JAm5mITdJFM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=S7n7OfB4tBkiuH47AoGOFNWZnFbwsGs6UkI6Li1XfGgCTNRg5jfDitdtNhftazV8ScWq0vG5TMTFRLnYnLxebyuG3zCH78Ps/MhcAKVSddXRd2h5x7CTv5+SDzJnZgpOlhFmgIw72HOaFIJdUQ2UCrEaHNw9gb3LpB2BK+j3lIM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kQZo2yzS; arc=none smtp.client-ip=209.85.216.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kQZo2yzS" Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-3817f800c8bso703232a91.1 for ; Wed, 08 Jul 2026 07:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783522428; x=1784127228; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to:content-type; bh=OxRfDNQ3dLfR1mgRSIAPI4DwhSKRcL+nwKZX3ZQfJs8=; b=kQZo2yzSjS79YdlbO5y5Rnxaq+O1S9od0HbfZBUMaqKnQYYRv9Khwk8QpsUm5YmlTW hLaxJSTXLSEevVPFAEe/4MFdFSJz5G7/ln1YSxGrJRiPHIAz4ekOSCOQ+FeN/lqX+JHO Fut/opf9eeBF0JASU/cyyxkOMg/aYpJ5/+aiaW8z00hQLpxnvLhF9YNTItgszJRdwsu9 z5fqevTq4yfvLgro1RRsSRDWCRjjkWINhZ1TBTc9GBXjocYeUPlVQTQIWJcn9uOy313Z QMxjxhQCYT+XMZ0dZhZOddFBgvz/6cxIvianKJerJtJ21ut4u+ES3mZAeGtgVdtXxKnT RE3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783522428; x=1784127228; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:sender:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=OxRfDNQ3dLfR1mgRSIAPI4DwhSKRcL+nwKZX3ZQfJs8=; b=BIzYfpwKeh282xjye+X9EIqgDYvZX/A05W8AU4qwgorf7yyNRMOwzfTjXYkccfRI6b KmCO5cn5YdQPtHKPvoPdUVkNKWw8Ghlm9QnD3NH9EDBxUcLwBAAEIf82zFPFsT32lLH9 FaWCZCnWfmftnKrlhUTnhg03FJM3pzE+feFBVA0h9z814mDkC1H4ONvalUQZnTziR2Cn F/nzrPcCkepSMFik9+bjdcDm/Hyiaj8j6mz+a8jBwEq8s8a4Rx0LKgyUfGu75nSRkzNf tJ0dGRfiqKR2WlZU4yf9/jiZHVWM7ZaORhxFkjUX9jtO0XlsTEh+3dNXwraC3siXTuYj JDsA== X-Forwarded-Encrypted: i=1; AHgh+RrHnXQI8DCdf+CwIORFvWEj5Xq15CAdWNp6zNzg/WgFl2r/T6PoQOoMFGqpV5BNvGiIrHWMxJXzh0ZrSAc=@vger.kernel.org X-Gm-Message-State: AOJu0YzJWfiRiH6CvR4w/DM/2LlgYtytfnNu9dv6OjpibllAGyBTCqXy FCQHUmMar2dtSbQWW4oz3gOQ5Mz+85Ln3pyKUU5xKsNTKh9X2UGNCyGX X-Gm-Gg: AfdE7cnYog2DPWGlOfYQk2pFBKBQ5i25lv0zLIDmwl036auet+XhDQK425Pnkbe+1wn ciGleBuUgmddOHAltFST3g9aymqyzOKNfXjza321xBOy8Bx6pNFnXGoNllCFRiI1DL123d+Pfco 12YJhtB+gdC8F+sNEPH4Yc/hsD+xg93XsF7tbcScGivMNR86EPxPaoQT+Tt4Kp8YOFDTrzGkcdt oDaWX18QGcXtmSOjRcU4z5zO60Z1TFzf5kKiXd6loNl57CjOWm6yCHtA7OLLi6keHZzRbT/ZYsF mipqaP9yKFnXUZPEN2glxgi0U1olyzfdCz9Hn48ro9z0hf5r20/i/lLhCUYg/lVN6kHWCJ701RK p9XVdX8mmeohsuEf9vDTV4witkrLn3w76hbRAyJP3sBse1SUdlbddyZ1rj4UqnSkSHM1h4ZYXrc xCErVuUAeOJQU67WjyWDcsCijo7g== X-Received: by 2002:a17:90b:554e:b0:37f:ceed:e1d8 with SMTP id 98e67ed59e1d1-389406352cemr2617332a91.12.1783522427666; Wed, 08 Jul 2026 07:53:47 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-387d20a32e3sm2893525a91.14.2026.07.08.07.53.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2026 07:53:47 -0700 (PDT) Sender: Guenter Roeck Date: Wed, 8 Jul 2026 07:53:46 -0700 From: Guenter Roeck To: Rasmus Villemoes Cc: Wim Van Sebroeck , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] watchdog: take all OF aliases into account when assigning id Message-ID: <15a059c9-b922-4d10-9ee2-3f362b5b603c@roeck-us.net> References: <20260615145759.3142743-1-linux@rasmusvillemoes.dk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260615145759.3142743-1-linux@rasmusvillemoes.dk> On Mon, Jun 15, 2026 at 04:57:59PM +0200, Rasmus Villemoes wrote: > If some, but not all, watchdog devices have device tree aliases, those > without aliases might (depending on probe order) be assigned an id > which would otherwise be assigned to one of those with an alias. > > This is problematic when for example watchdog0 is an alias for an > always-running gpio watchdog that userspace must handle, but the SOC's > watchdog device(s) get probed first and thus one of those become > /dev/watchdog0. > > Ensure that ids for devices without a device tree alias are allocated > from above the highest numbered alias, if any. > > Signed-off-by: Rasmus Villemoes > --- > > This is similar to how the mmc, i2c, i3c and spi subsystems handle > device tree aliases and avoid using an id that might be assigned to a > device/bus that is probed later. The patch makes sense. Unfortunately, there are systems with aliased watchdogs which do not enable "watchdog0" (e.g., several Nuvoton based boards). On such systems, if they do have an unaliased / auto-generated watchdog, /dev/watchdog0 and with it /dev/watchdog would no longer be created. This would result in a ABI break. On top of that, the patch only affects systems with both aliased and un-aliased watchdogs, which makes me even more concerned. To apply this or a similar patch, we would have to ensure that there is no enabled watchdog with ID == 0. Thanks, Guenter