From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69A1DC433F5 for ; Mon, 4 Oct 2021 08:30:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4944261130 for ; Mon, 4 Oct 2021 08:30:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230520AbhJDIcS (ORCPT ); Mon, 4 Oct 2021 04:32:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:42406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230469AbhJDIcS (ORCPT ); Mon, 4 Oct 2021 04:32:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 639EC6124D; Mon, 4 Oct 2021 08:30:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633336228; bh=AGIgwoQNBBt0ACT2Oa703+VXilss9u/HArqWzTXe+jM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Xu8068laLv4h09QdbkgWqg1+Hsrt2pB2Y69WPnlP903fWNJN40bLPIgUB8fTcTLUC x4BGct5hBdnnFcBypf8x7utNBSs6iaKRodKX5yHA39OhoKUatmYRx9HNOrxSXBJi2M GnVRK9NTnZXWHkEyIDE4zSMdlENcN2Uc92Wr0amA= Date: Mon, 4 Oct 2021 10:30:25 +0200 From: Greg Kroah-Hartman To: Pavel Machek Cc: Marek =?iso-8859-1?Q?Beh=FAn?= , Andrew Lunn , "linux-leds@vger.kernel.org" , netdev@vger.kernel.org, Jacek Anaszewski , linux-kernel@vger.kernel.org Subject: Re: are device names part of sysfs ABI? (was Re: devicename part of LEDs under ethernet MAC / PHY) Message-ID: References: <20211001133057.5287f150@thinkpad> <20211001144053.3952474a@thinkpad> <20211003225338.76092ec3@thinkpad> <20211004090438.588a8a89@thinkpad> <20211004073841.GA20163@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211004073841.GA20163@amd> Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org On Mon, Oct 04, 2021 at 09:38:41AM +0200, Pavel Machek wrote: > Hi! > > > > > > Are device names (as returned by dev_name() function) also part of > > > > > sysfs ABI? Should these names be stable across reboots / kernel > > > > > upgrades? > > > > > > > > Stable in what exact way? > > > > > > Example: > > > - Board has an ethernet PHYs that is described in DT, and therefore > > > has stable sysfs path (derived from DT path), something like > > > /sys/devices/.../mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:01 > > > > None of the numbers there are "stable", right? > > At least f1072004 part is stable (and probably whole path). DT has > advantages here, and we should provide stable paths when we can. The kernel should enumerate the devices as best that it can, but it never has the requirement of always enumerating them in the same way each time as many busses are not deterministic.