Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753593AbbHOPNN (ORCPT ); Sat, 15 Aug 2015 11:13:13 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:44790 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752179AbbHOPNL (ORCPT ); Sat, 15 Aug 2015 11:13:11 -0400 Date: Sat, 15 Aug 2015 08:13:02 -0700 From: Guenter Roeck To: Dustin Byford Cc: Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, jarkko.nikula@linux.intel.com, jdelvare@suse.com, lm-sensors@lm-sensors.org, rjw@rjwysocki.net, linux-acpi@vger.kernel.org Subject: Re: [RFC 0/1] i2c: acpi: revert setting a "stable" device name Message-ID: <20150815151302.GA10020@roeck-us.net> References: <1439581034-5972-1-git-send-email-dustin@cumulusnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1439581034-5972-1-git-send-email-dustin@cumulusnetworks.com> User-Agent: Mutt/1.5.23 (2014-03-12) 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-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2211 Lines: 60 On Fri, Aug 14, 2015 at 12:37:13PM -0700, Dustin Byford wrote: > 70762ab from 11/2014 (i2c: Use stable dev_name for ACPI enumerated I2C > slaves) modified the sysfs-visible dev_name() for ACPI enumerated I2C > devices. With that change, /sys/bus/i2c/devices/i2c-0-004a, for > example, became /sys/bus/i2c/devices/i2c-PNPXXXX:xx > > That causes problems for userspace code such as 'sensors' which does > this: > > lib/sysfs.c:665: > if ((!subsys || !strcmp(subsys, "i2c")) && > sscanf(dev_name, "%hd-%x", &entry.chip.bus.nr, > &entry.chip.addr) == 2) { > ... > > Therefore, in theory, sensors that were previously visible by running > 'sensors' no longer show up. On the other hand, there are probably few, > if any, cases of this because ACPI enumerated I2C hwmon devices are not > common. > > I'm not defending the 'sensors' code, I'm sure there are better ways to > discover a hwmon I2C device from userspace. But, I'm also not sure Is it necessary to defend user space applications nowadays if a kernel change breaks a well established ABI ? WHat happened to "Thou Shalt Not Break Userspace" ? I absolutely agree that i2c bus renumbering across reboots is a problem. However, it seems to me that 70762ab doesn't solve that problem, it just paints it over. And, as you have noticed, it introduces new problems along the way. Guenter > 70762ab achieved its stated goal in a meaningful way. Won't > "i2c-" also vary with ACPI scan order, BIOS settings, > firmware upgrades, etc...? > > Hence the RFC patch. To submit a change like this I would need to > consider the fallout for ALSA SoC. The other option is to see what can > be done in 'sensors' to include the ACPI enumerated hwmon devices. > > Any opinions on which way to go? > > --Dustin > > Dustin Byford (1): > i2c: acpi: revert setting a "stable" device name > > drivers/i2c/i2c-core.c | 7 ------- > 1 file changed, 7 deletions(-) > > -- > 2.1.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/