From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (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 8CF531CD2C for ; Sat, 11 Jul 2026 03:37:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783741055; cv=none; b=bD/MB+bZmU2WjZqyYQcexBGkO36d38rgvma+cLM950+r06LgZduXbZ+ydFZV0WOPXtQtSnEoo4rzT7c5CmnVLKITAbWZDQFgvF3wHiAyyZN7J/piskGDTXowthxCHwrPWZLoal01Rq68GOu0mhE7DiqrFdw2mZ/6ThTg60PxZpA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783741055; c=relaxed/simple; bh=UL8h5yA8OtJ++aeghXVsSyAJzYYnK6nFPd/G7ZzKXe8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ci3vCDc6EtKk10px2Qdt+/fH4NR5hheW+V23AsR2gDEBzLe1AZOzNZsmFL9yPoMrewWsBZpgMBSY5DnQ1j9eutGAj9t1Tp0WKd0q0niPAqEMGj3P+4wbXbwE0gBSDQGbbTHuAaoL++Lno8H2tA/6JWVI3dLdFBocFXS4Px1LKkk= 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.216.48 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-pj1-f48.google.com with SMTP id 98e67ed59e1d1-36b9d265355so1308419a91.2 for ; Fri, 10 Jul 2026 20:37:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783741054; x=1784345854; 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=eIzGIpmLRN3M1TgRdSi95Ht9oOEw9xopkeHZ/dEQJJQ=; b=IqHtQL+RfAuGFLu89B+OnYFUSEeJnPBt206gs2gFcwCBT70MDywczlDtHQr+v2kjw+ VcuKAdq9FecAYLjh48QqLg1RLRV6Mc+KTqdIxdxDMpofZsS9EUhBGV6KxMC73TCUWsTq 4A0ePzFXK/48OTLe0Qd3tf3yxoR9AIPMhC7y4qL72sj5b6U5vr+BOT95o3GpKS1q98e9 zMNF2L9jANpm98McdBylzGyOBf/6VP4HIKXtkgW7Q/yHIEbVgRLBpBflPJ8xStxbTiI3 mB1iNgKItWnjjRvfl1ggFPy8LAPfcX0FoEbY8H59W8A6NDR9JtRXwOJQmmCNiSI0pBf0 K/0A== X-Forwarded-Encrypted: i=1; AHgh+Ro4RWM08sscZm/FKMcduhsPdANYe3XCo8+V2hYGDhNMJ9U+b1hWKl9nAuWyMzbSCKl399eLDoHP+8RmO28=@vger.kernel.org X-Gm-Message-State: AOJu0YwpkvQlYzPmAQYhv8BV65YwKjn9mruIMgWpg5osd2CcBLxPxBeb 2PZlkvIXt7LgBqu7mY6lgtF0pXgUfxVkD8DqHfxvnv8HCEj1rqZ6QOFVht7AxKmhxubo X-Gm-Gg: AfdE7clk2Lgec5jdsbTpJilWMjDjERWXVYN7v1Id6mtl+vdQGbPyUCcIirmP+mIQ06w VvIs9qqYTEbVKNPgc+bMlk2bGG2azt3kwTItd+zLvaBCeeXocYf3v4HPv3+YFzdRe0HkUZ93sAG GPH7LP81sZshoACczJLUif+FmSdgEKp9z3STiN/yvteid0RKIFjVPALQy+0o7gHBy71KAUbrrGX 9z4R42vfU4I+pGESo7qslQY2au2qkFevqnXUHfni/aOgtH/U0mpOuJrcKsdrVnDN1cvodRgCFdL Sq3I5CU2QViIXUQm3MKK6UkXi2ljK/JkJnMSNUgtaPSkieurexrWKCUGVb+ssnrrDieSHa1JFPo uxOIbrkBaexAw7L/O6CkZtrI9b3DgCrnb/g23byFmqox9RY0NnZSYu394+n6ELZ3qcbGSKg0zIb 4JNW9Q7QQsAgWqbzimdzndg4eqxtGMBYxsmE4e+LL283iKKdRVWCq2RsHICNhRrmmNcknVaSl1b bTdwwgb5iPL9s19hZi/Et3aiQmW4EzJ2ahm X-Received: by 2002:a17:90b:4e84:b0:381:28e0:6262 with SMTP id 98e67ed59e1d1-38dc74cf2a8mr1540953a91.8.1783741053882; Fri, 10 Jul 2026 20:37:33 -0700 (PDT) Received: from penguin.tail0a1999.ts.net (61-228-52-13.dynamic-ip.hinet.net. [61.228.52.13]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-38dc9fc78ffsm269900a91.9.2026.07.10.20.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2026 20:37:33 -0700 (PDT) From: Shih-Yuan Lee To: Henrik Rydberg , Guenter Roeck Cc: Armin Wolf , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Shih-Yuan Lee Subject: [PATCH v2 0/1] hwmon: (applesmc) Convert to hwmon_device_register_with_info Date: Sat, 11 Jul 2026 11:36:59 +0800 Message-Id: <20260711033700.3693-1-fourdollars@debian.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260710123236.10508-1-fourdollars@debian.org> References: <20260710123236.10508-1-fourdollars@debian.org> 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 Guenter, Armin, and Henrik, This is v2 of the patch series converting the applesmc driver from using the deprecated hwmon_device_register() function to the modern hwmon_device_register_with_info() API. Changes in v2: - Abandon the minimal dummy registration approach in v1. - Fully convert the driver to modern HWMON ABI standards by dynamically allocating temp and fan channels at initialization. - Rename legacy non-standard attributes to comply with the standard HWMON ABI: - fanX_output -> fanX_target (HWMON_F_TARGET) - fanX_manual -> pwmX_enable (HWMON_PWM_ENABLE) - Dynamically register the remaining non-standard fanX_safe attributes under HWMON class directory via extra_groups. - Load and cache fan positions in smcreg.fan_positions to support returning labels by reference in .read_string. - Clean up unused static attribute groups and show/store callback functions to avoid unused symbol compiler warnings. - Verified compilation and successfully tested on real MacBook hardware. We appreciate your review and comments on this proper refactoring. Shih-Yuan Lee (1): hwmon: (applesmc) Convert to hwmon_device_register_with_info drivers/hwmon/applesmc.c | 458 ++++++++++++++++++++++++++------------- 1 file changed, 309 insertions(+), 149 deletions(-) -- 2.39.5