Received: by 2002:a05:7208:3003:b0:81:def:69cd with SMTP id f3csp4332914rba; Tue, 2 Apr 2024 13:59:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8idZn9ozeMmclcwjvKAboLvY/znGbon+ryg453YGGJoZsXF+U0tWJ99hmPSuud6B3lh0QoOHnsBBAWkOk15AZZcNM7LDTUdw8qaog/g== X-Google-Smtp-Source: AGHT+IFtHE8+Ds8EqrGVI4G2VKxhZ+95EOY/MKq/qUo5gJK9WpEXSp3BXPA2z0CewoC0dNqp16vf X-Received: by 2002:a05:620a:3907:b0:78d:36dc:ebc5 with SMTP id qr7-20020a05620a390700b0078d36dcebc5mr639653qkn.3.1712091593647; Tue, 02 Apr 2024 13:59:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712091593; cv=pass; d=google.com; s=arc-20160816; b=V1nQKjcbKaLvT6KG1+a7eMrW3KdCApIdfhmXoHPNoK3ChHsc15feDD48Vn3v5D0vS5 3x495l1rwnwI12IsdzCYrj/0UxjI/NWS8UdtU9lUdoTXDCILroqgV+E/055TGEK8AOu9 mrigHXpMcSDIn0ph4e6E4y42EdTTcoWDZ8DTXMM6PrMrj01Kgx2JfbkEuV2QoHfcgalc gV5wZ5LmTh/yxnlDbu/28Kq/sgkykh/E/QVoy8hLvmAEHHf1DAIqTaLLsUTahHt/gwq2 73zklj7WyMurMybzr0gGbHCoXr0ISWSafSxXQ5ZCpdC05PfxbtGzGW6n4F+6nUoKGLli J/rw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=+K9JJATGbeqkgwim+AVY7UCJMuhkOONoGwaNDd6YxPI=; fh=/W1DKwt5wRyhZlg1fhCR/QstEM4LSrnp3P636KFnpWk=; b=d+rg/3evHmvI3E5eIn44O8qu2XWm2sYyR6OhFUxsWqmf5U58XZPeyDLixqJcCkMUZ8 3tFC7zpBJeA65n6tKQ9EqL9roXxHyjOzMEdEIUyBaoUPavas13bpjgDMiZCro5BdToaz DKSggAOxlv1utGFxbY/qL7cPS0STU7CuqW92m2S5oyJ8RhE0fFOsCPZczBpnw44FTFj+ 2PX2saZGh/e3T9qAgIIuJmCvkjCu7XgY9UmYsyx93BWJ/xc4QMHmaNXzdLjLgzIwoMcZ NS1w1G8otHRr8L5FIh0vEZNC9SPG206sPx4unG86hG1IgnMgrzMMBFOYLHHWg7AcpINA CiJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Kw5oMGix; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-128688-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128688-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id vq12-20020a05620a558c00b00789f368e10dsi12506934qkn.643.2024.04.02.13.59.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 13:59:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128688-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Kw5oMGix; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-128688-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128688-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 62DB81C2265B for ; Tue, 2 Apr 2024 20:59:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C50915E209; Tue, 2 Apr 2024 20:59:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Kw5oMGix" Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (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 BFB1915E1F5; Tue, 2 Apr 2024 20:59:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712091586; cv=none; b=PufYvvlrw0u5P8m68sBtk0QXhGaMXnHHBSluiIbjOR1rGy+MtFI8GhmEjNIRpOnX6tYHMsyTQ6i7+EXQ6ylvz+colppUDs2/U+gcf7+n6xQO5z8Yha9J+YFeIKQ3bafhi0VBiNiAFVFXOyBx2BrPV4r/oQokWR9vg22UdkwQa4Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712091586; c=relaxed/simple; bh=nAOFCAedsf0hKd3f54Osliv0hXUk7LCjiOLBeBM2DcI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rhbeMvLruXPS6ov0MjFJNLyw8RrjbXA1/gUHZkL2YV9ubQ0QPuY9npvip0oh5ElKOyiVLGWxo1l/3UCUHOACiDzLreK396qr2wi7ngb1LCktbpHptvU0yYTy0D3SsCxbn5dgsi8/5LOaHn7mIh4juZuOyc4erh9/9Nw8+/D9KTU= 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=Kw5oMGix; arc=none smtp.client-ip=209.85.214.174 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 Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1e0878b76f3so2499965ad.0; Tue, 02 Apr 2024 13:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712091584; x=1712696384; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=+K9JJATGbeqkgwim+AVY7UCJMuhkOONoGwaNDd6YxPI=; b=Kw5oMGixNhLqKkreD9rRYn3dLx1WFF7VK1xavCyehsDHhh0Xx7n/zFh82/gkekiGQN XN1ePpMFEV1zuoHPja2JflYCMg91DJN/HaaCTPD5USXgeCrhT6ugZ+esSC5sT4KmADsw 7Ya+bS3IYloojpFlKm7eRw3S5YKe+DM0f5gl8YGZImYEh8I1dmUqHZpTHoeEnCg0NVKe wdBMpHLSeCZ41/trOre43dJ0Vxz3SKyantoCjSKN63b8cYMBErzzuRNWEk4F4crFjzvG hEaO6r8Sdq0m9RmMd+TuS48j7BSZvt935c4mlnDoB1/rLNsGggnJX5J6j3dEUMjGUjaq pzkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712091584; x=1712696384; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+K9JJATGbeqkgwim+AVY7UCJMuhkOONoGwaNDd6YxPI=; b=mavcwJhk7NlkciROLCMvmqc7b+rWlOLf2tldIiPKfQYe3NI2WHToLmFvflTXk3RygT iXX/k/ax/lOtGCj449lk2C2TG7kMQY63Hov6IhcCNfW1scM9tlmT53n51sIPrudtzP1f fW1oaEWdGlxDopcUYi+kKTiLIiJcTB5CkGWK3x4gYFWxLqZGlJF1ZYKsn/zAe/n7CRG2 5k8Z7VIcPCLl7FHKsj84Pvqbd7V5vWcSKeTZfYncyarXyRkDP1zRegnKRcO3h06LMi4W UyPpfBoiuK1rY1gwCJCzcsZhSewV3yA97XWwI1/cO8zPD05OjlAYgrCuWq96uTQJohmy +Sig== X-Forwarded-Encrypted: i=1; AJvYcCWH/0iSCtAtLre5TjjyBs5qaxtnHcd/O3iZ5m1tSITSLmO+VMRn7xMTlEgom/UEVTWrHxNh5hw8VEs8mW2bdHZn8cllvfklj4UXMGm4ExQvGflLymmSa7kBPcfzzbBDqxrfpRO/JpzbGoI= X-Gm-Message-State: AOJu0YwvNoZb9GYVDwwv8Hux4cIEDuKXSlsqX6VJSegeOFpWEUBOGobR i3i25Ah5KU2u5Q9+hPBrYqB00jAMPPymgM9vaYjYYp7FtUIw9tYC8tEyXbaK X-Received: by 2002:a17:902:c412:b0:1de:fdf2:b483 with SMTP id k18-20020a170902c41200b001defdf2b483mr926879plk.8.1712091584001; Tue, 02 Apr 2024 13:59:44 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id q6-20020a17090311c600b001defd404efdsm11665292plh.13.2024.04.02.13.59.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 13:59:43 -0700 (PDT) Sender: Guenter Roeck Date: Tue, 2 Apr 2024 13:59:41 -0700 From: Guenter Roeck To: Chris Packham Cc: "jdelvare@suse.com" , "linux-hwmon@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: hwmon: label vs temp%d_label Message-ID: References: <9a09bf46-d097-4e5b-bdb3-cc9dc6f5d01c@alliedtelesis.co.nz> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9a09bf46-d097-4e5b-bdb3-cc9dc6f5d01c@alliedtelesis.co.nz> On Tue, Apr 02, 2024 at 08:24:37PM +0000, Chris Packham wrote: > Hi Guenter, Jean, > > I've got a requirement to add some meaningful names to some hwmon > sensors (LM75 specifically) so that we can provide some indication of > where on a board the sensor is located (e.g. "Intake" vs "Exhaust" vs > "Near that really hot chip"). > > I see that the sysfs ABI documents both "label" for the chip and > "temp[1-*]_label" (as well as similar fan and Vin attributes). The > latter seem to be supported by the hwmon core but I don't see anything > for the former (I'm struggling to find any driver that supports a > chip-wide label). > > Assuming I want to have a label added in the device tree to a lm75 would > something like the following be acceptable > > ????? sensor@48 { > ??????? compatible = "national,lm75"; > ??????? reg = <0x48>; > ??????? label = "Intake"; > ????? }; > > I'd then update the lm75 driver to grab that from the devicetree and use > it to provide the hwmon_temp_label attribute. > Have you tried just declaring the label property as you suggested above in your system without doing anything else, and looked at the generated sysfs attributes ? Guenter