From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (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 C4C60367281 for ; Fri, 10 Jul 2026 12:32:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783686766; cv=none; b=SflApIN9op9p21lfoQoWw5AGugVxbbvnrAxuMutg+9vZox1OCkeIsDy2S4A1Z8JDLs/c3OXMVEC8/WfbJqD97f2vYlAlDO1P4Gvou8R9sTXhurpUOo6HLbuS+Ax0K7obzUA6CdJ1zY4gBI7BIwNUx+6MKEqgeIfpqilQCb3/PfI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783686766; c=relaxed/simple; bh=6VYu5Ln2dGULSfG+3BTeihBgx8YyS2T+l9vLZX9vPfs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=hZobW/fwWuTqGlBcwQ25EBBj6Ee2yTiIqMjpVC9PSnC+kIE1Kte0cTs3Js1YmJFBy4bI02Bbvvnf+Brj4BYu8aDfY7sx2irzeLix/Kr2Zt62a619UroQF1J6iWf80z6aNM5R81xfX8QA669eTmeesX20hJ17g5Xz8ZBp0ig1Lvo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.210.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-845b6d9bf39so865647b3a.1 for ; Fri, 10 Jul 2026 05:32:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783686762; x=1784291562; h=content-transfer-encoding:mime-version: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=iG62tnW4pdhMeJbfpvvvkEJyUp5+t4TXXdqe5pWpdVg=; b=cZo97cRUCxFBZS7KPqpdMCgNR6K4wwCo3x2/ubZ9rZPFSnlSzV7euZqw2Ae8CJldL0 tgHGtXfGqe94xZdH7u6EpaQWnBfw4U9Ft0M7d7SqEdWJfGBABbh5AafOiE3oCZ6qrfvF xaj2KOptDAH5+EyxHkheBY0/47/Ygut6TI2I72zpYoYVgvTw0iVc3nijTFKQX98IQUqL G4py3sPlYA4ZnzMV4129Zixb7fYY2KFeoUXk/7w7JMvr/7SSXawza9HaqSK4TmFtlK84 xCHGrEr3xFVYfCG2/b9/OV5eBTO8LUdj5On0U97JwQnApMKi37wmftSA3nFt3v330227 tusA== X-Forwarded-Encrypted: i=1; AHgh+Rq81qVHdAYtup44Tbytrbtjw8BAU34lF3is9RTWRWfNjwkWkUA1l+42urVu7HVdBnBY6TBcKZVOabAxV+0=@vger.kernel.org X-Gm-Message-State: AOJu0YxMaiKJbvrIUEwOCFH/wa1hZJ2T5jLhy1iQCalxeGs4suVxE/we jnOyDtroiExweNrZ3PNaLLb9xLDm/D3mlXZFy1xIiLVdvgR6aBP8R1k= X-Gm-Gg: AfdE7ckMITK2dGtWEKLPp4HAbmndXRKbkiZ218k1AMr4ELP/H+hx55qcJD+HU+VnEW/ dsfa/mCTUXK+iMV61eGzxeKWPUtLg7/RDqgHP4gRR9NiFqCjerE4Qx4fIbVp786QtwPYN1vjWTN Vw2kIZ+SucCqq3N6ZMIp0nSwXaWtlDGA3SkrzHDqwFuZvn6XpU/fsYXjCxniH3Xk4Ob8CWCNQmC TQEzxt8N3uXDzdZzhm1FfMJvd4m1nJkPRa3VFL4Cwjfw4vmkNhwFIeSKT6UkgcPSWWAUHOSguK0 GgoXdu+R5ub7lMS8E/m3zlca6nu4C3hqsapeDpL/25779Lm+lN4LnJR3i/BfGeIkDwAIOXCtFww K+cme68B9ET+F6ELEITAdavGk8Tx6uHNXEZt70ySZR9UbrSD9Vw/SZmxQuJ/Dc7fqyRHYtXRiCw Q7l4kDAQ4xsfO1336XsJ22T9oDvooksDA98NR4p8tS/ZPg+Tx/67Yz4bN/xXqxhfC2kjOazMttS JT/4fMuMbGiGWE7J9mvQ0T7rg== X-Received: by 2002:a05:6a00:b8a:b0:842:63f5:d097 with SMTP id d2e1a72fcca58-848703459d7mr3207122b3a.3.1783686762398; Fri, 10 Jul 2026 05:32:42 -0700 (PDT) Received: from penguin.tail0a1999.ts.net (61-228-54-80.dynamic-ip.hinet.net. [61.228.54.80]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-848686d6e86sm1929058b3a.19.2026.07.10.05.32.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2026 05:32:41 -0700 (PDT) From: Shih-Yuan Lee To: Henrik Rydberg , Guenter Roeck Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Shih-Yuan Lee Subject: [PATCH 0/1] hwmon: (applesmc) Convert to hwmon_device_register_with_info Date: Fri, 10 Jul 2026 20:32:35 +0800 Message-Id: <20260710123236.10508-1-fourdollars@debian.org> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Henrik and Guenter, This patch converts the applesmc driver from using the deprecated hwmon_device_register() function to the modern hwmon_device_register_with_info() API. This silences the following deprecation warning from dmesg on load: [ 24.706091] applesmc: key=620 fan=0 temp=37 index=36 acc=0 lux=2 kbd=0 [ 24.706270] applesmc applesmc.768: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info(). Because the driver creates all its sysfs attributes dynamically on the platform device, we define a minimal struct hwmon_chip_info with a single temperature channel and implement a visibility callback that returns 0 (hidden) for it. This satisfies the new API requirements while keeping all existing sysfs paths and attributes completely unchanged under the platform device directory (/sys/devices/platform/applesmc.768/), ensuring 100% backwards compatibility with existing user-space fan control tools (such as mbpfan and macfanctld). Shih-Yuan Lee (1): hwmon: (applesmc) Convert to hwmon_device_register_with_info drivers/hwmon/applesmc.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) -- 2.39.5