From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 D3367410D3B for ; Mon, 20 Jul 2026 13:55:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784555758; cv=none; b=CKIA2NLAGmFA1MPsDMsVb+n2d3m/4FHvDcDpZsj6p1wo7g141f73fFO9+fXGT+soCzmpsLF2kPhC2+dr4Od4DWDi+NeoagqYbh86V7xcFoPnKH321AA5t3nN406B7e/8dTPIzrQ8NwSr9NUvVWmBE7teuNXxONKkgsvBmASc5rw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784555758; c=relaxed/simple; bh=ZNw0bddlHrYOs23SRfLRhVW1FeTrm8OR0JmZNjXWpaA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cAPWKBo7jZPMZxM9sZnbr0kZcH2eoFaTvYuUqKRW3EeGQoCRXDhJktk60YBEEftiMUoXG2U3x/WLvK7xTT3+Ii9Js7/EHBbUr0Tj6V21h0ABNzIfXNcThPWHpokOkuX+s1JJdY8FsLMfHGn7hXbDyJ6Y2uViHx72ok7FkAE4wYo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Nn4W9Arr; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com 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="Nn4W9Arr" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-495437bb891so30666115e9.1 for ; Mon, 20 Jul 2026 06:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784555755; x=1785160555; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=6M7h3bjk6MLKww33sscI9ms6FX75LwP2psgjho2G4Rc=; b=Nn4W9Arr5yBF9mYs8Rkxj8mm0XVYzDfoRHObGl24fayaLhcUmqHp0blRxtrJmGzYIY 9rs0DqQdOZ8MFHQkGMLl71998qFBQV28g5VqQMJU13kp6R9tamszMe1T61laepxvWMbS MQIkArmMzx3ccJSEani7k4qsFxsBVF3lXrpnweiMW8UBCxGagwK3uBI8L0j7J5n50i4L ZjBZDtWLZJqr4nA4+/uaTDTw3N8x3k4NIIRW1c4TvxobXJV+pbS5fCdBGZ0sYpMtvWOL otp1ahmNvc9S8jesqHkllwZ4yPQy1t3XhJ9Prk4xXuBR7ux7xE9cMxsYIrTz/sbk9RNP nSPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784555755; x=1785160555; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=6M7h3bjk6MLKww33sscI9ms6FX75LwP2psgjho2G4Rc=; b=V6udhq05umubk4y1ttSUMvXvQSyM1PlBFXaLxAB2n9ragHvSfjOakHJOwqU14rPlOS kjb/cQYZYxRJhPih8+Pjj6z5SSmE7G+CDILamXXxaqRagx/nJq+Z4dcPHsq1rJr9d/Un IvMd9abAjJ0c/5vMERhkMti/lbXezqw1a5YEYyuRatJMSd7Lx5fXdbKQpZY6zCa1kPUL xU/AeuDP657TjSPahTV6bAXm3YGyDSYx3hEcCekT0PNgzw+JKW4ITiCuWyahij+WT+qn UVONjxzVFjbx7hetXqblSoiXkGWgsyENuQK7CbMvH8JN+k794Iv8ubPX2x2bfLWi8LJW gmgg== X-Forwarded-Encrypted: i=1; AHgh+Rox9gm5Qot16/0lqGnksYr5oBgEFJYQu+5dF+IDqzPWHIelFz3mX3ZpOUFmAdOqzw5Dbb/vGrRM4TrIQCs=@vger.kernel.org X-Gm-Message-State: AOJu0YxrownhwFKv+vTq7riIcwg9gCcfToGaDCWTJP6m0W0ixNWxbLXM yM+oitjr1ZogUCnAWjsMIM8FTZS6CGnP+QZE8IhYUChq7b8IeepFyGo4 X-Gm-Gg: AfdE7cmITRcFZOmiydSsFqc7csWB7Z0i3+VpQ9bLsk4U8J+WGg62HklrcpPm2cwMv+4 l7NHeETASAcThuHCth4Jtw3l0YC74/EIr+YypV60B2tPwAS4HAg1XQhXNtAAH5VWPlRQpxWSPZh ZtnilaN3KZZZzUPJA6rWOWweR+i2w95weOuiTD5/8DYHHga74sOyhhfwa9hwHHgofudhMfykIbg jW3jqFtvMvEStZCD6GntPhH7Gj7pMFi4VYiMVa0Yf3Z/TuBAq3E+U6wFclYtY9D6RVG+NRmbCmN cH9t3t3FnWdEVpffYJQuoq6vpmR9/qSp9YJwEwnj9EVRtfBhbJkn9pMAjvfn2BFgcsGFEFfhxh7 VjQBfleyg+SXnEn04PTZKPc5TJgxuMzDPzn4ZLd08SEqKjCvHs4srJdJG4baaLtttBYB+vzDSUN q1QOlMtbaoUSyGScqQ/PZEiUQ5TQL8hbS+rS/PKPlvR7Q5W2IWxg== X-Received: by 2002:a05:600c:1381:b0:493:b698:9247 with SMTP id 5b1f17b1804b1-4954a33dd74mr161258265e9.14.1784555754079; Mon, 20 Jul 2026 06:55:54 -0700 (PDT) Received: from flaviu-Aspire-E5-572G.. ([5.15.69.50]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4954c0a81f7sm193185025e9.1.2026.07.20.06.55.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 06:55:53 -0700 (PDT) From: Flaviu Nistor To: Guenter Roeck Cc: Jean Delvare , Flaviu Nistor , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] hwmon: (lm90) Switch channel parsing to fwnode APIs Date: Mon, 20 Jul 2026 16:55:50 +0300 Message-ID: <20260720135550.10654-1-flaviu.nistor@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Fri, Jul 19, 2026 at 17:06:00, Guenter Roeck wrote: >On Fri, Jul 17, 2026 at 09:37:30AM +0300, Flaviu Nistor wrote: >> Replace OF property handling with fwnode in the probe function to read >> the channels properties, improving the driver compatibility since this >> method is not limited to Device Tree only. >> Add also the needed headers for explicit include and clean up related >> function naming. >> >> Signed-off-by: Flaviu Nistor >> --- >> Changes in v2: >> - Remove as suggested by Uwe Kleine-Konig. >> - Link to v1: https://lore.kernel.org/all/20260713190659.4511-1-flaviu.nistor@gmail.com/ >> >> drivers/hwmon/lm90.c | 47 +++++++++++++++++++++----------------------- >> 1 file changed, 22 insertions(+), 25 deletions(-) >> >> diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c >> >... > >> - err = of_property_read_s32(child, "temperature-offset-millicelsius", &val); >> + err = fwnode_property_read_u32(child, "temperature-offset-millicelsius", &val); > >I understand you consider it to be irrelevant, but temperature offsets can >be negative. Please explain how this is handled. > It is no about the fact that I consider it irrelevant, but rather I was mislead that of_property_read_s32 maps to of_property_read_u32(), and the new fwnode API does not have a dedicated function for signed values. I see as a solution to add a similar approach to include/linux/property.h. Add a new fwnode_property_read_s32 that maps to fwnode_property_read_u32, and then use it in the driver. I will try to send a new patch series to have a working solution. Thanks and best regards, Flaviu >Thanks, >Guenter