From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753539AbdA3XMI (ORCPT ); Mon, 30 Jan 2017 18:12:08 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:38847 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753050AbdA3XMG (ORCPT ); Mon, 30 Jan 2017 18:12:06 -0500 Date: Mon, 30 Jan 2017 15:11:49 -0800 From: Guenter Roeck To: Daniel Walker Cc: "xe-kernel@external.cisco.com" , Greg Kroah-Hartman , Jean Delvare , lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org Subject: Re: unstable /sys interface from hmon Message-ID: <20170130231149.GB14987@roeck-us.net> References: <99aae36e-ddfd-dcd2-e544-9c28ae373959@cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <99aae36e-ddfd-dcd2-e544-9c28ae373959@cisco.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 30, 2017 at 12:37:14PM -0800, Daniel Walker wrote: > Hi, > > Cisco recently upgraded to kernel 4.4.. We have applications which use the /sys interfaces for some hmon drivers. > We found that the following patches, > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=bab2243ce1897865e31ea6d59b0478391f51812b > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c3b7cddc70075d525db6b3068d8b2b9158eedc84 > > Altered the interface as seen from userspace. These patches changed the paths in the following way, > > Before, > /sys/bus/i2c/devices/14-0050/ > > After, > /sys/bus/i2c/devices/14-0050/hwmon/hwmon7 > Actually, the stable link to use would be /sys/class/hwmon/hwmon7 in both cases, and to check if the name attribute resides in hwmon7 or in hwmon7/device (which is the real change in your case - it moved from hwmon7/device to hwmon7, ie from the parent device to the hwmon device). > My impression was that /sys was suppose to be stable, and debugfs was unstable. I'm not sure what the current guidelines are > for this, but we would request that hmon drivers maintain a stable interface from /sys. This change has cause upgrade issues > for us which we would like to avoid in the future. > The key transition is the move from attaching the attributes to the parent device (here: the i2c device) to the hwmon device. libsensors handles this transition transparently; I assume you are not using it ? > A patch to add in a compatibility layer would be welcome. > A compatibility layer would have to link each attribute back to the parent device. Interesting idea, actually. I'll check if that is possible. Thanks, Guenter