Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1412987lqe; Mon, 8 Apr 2024 08:13:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXhvd+girsIdppcHlM/23C+Ie3X7+IIhxH+WkMZftILnGOIe9YxWfnT/qf/rMVfe1C3Bp7Ie9KIcZwncuf0QmOWwP7mvrN7/rCaE6kyrQ== X-Google-Smtp-Source: AGHT+IHdXEl6Aq186pog1hTW1QSJQja1Bafr96jfR/4iCclXqmX4Sv7v8CAXMrXk1tcb1uWb1RWn X-Received: by 2002:a05:6102:4412:b0:47a:68d:f6e7 with SMTP id df18-20020a056102441200b0047a068df6e7mr1908622vsb.11.1712589203364; Mon, 08 Apr 2024 08:13:23 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m16-20020a05610206d000b0047a0fb1b637si151879vsg.122.2024.04.08.08.13.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 08:13:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135580-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=neutral (body hash did not verify) header.i=@weissschuh.net header.s=mail header.b=oDSGbC8e; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-135580-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135580-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 AD19F1C23B15 for ; Mon, 8 Apr 2024 15:12:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3938113F45A; Mon, 8 Apr 2024 15:12:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="oDSGbC8e" Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E25E13F439; Mon, 8 Apr 2024 15:12:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712589129; cv=none; b=ZMAlqIWfRy7r474Q+yCoFJpnI1CxHzymhmdoDcGVl96tuKtfxEHgqfJnOeMDAHrwpPxk0YnUxmhqpk6lB/g9mWJ3rGwBw988bOcjRkQwAc0MEmBfqr+rejyt674zORimgwQTrmZCUy0OipLqxmbmB57tQDefYBfP4P1exMyJ5LE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712589129; c=relaxed/simple; bh=qr2rFW6w9/fvO6Ij1T8ekWnLY0TacXSC2/hiYqqAFmQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XUys2MXJX7h9dWNfUS1k6KdWhsUPz78B+PdGcOqudKlb0Z6CqeLXwtEYqaHm/GcxHLAY5m7M+FxM3/OW4L64pLAIT4QyI1jyQjiUxc5NZKcI1d5445P16aKoQb2eRnthMb0B2hjhliiIdyi05r+Zx4aLfO9HnyEqSDlenCVDCTw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=oDSGbC8e; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1712589118; bh=qr2rFW6w9/fvO6Ij1T8ekWnLY0TacXSC2/hiYqqAFmQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oDSGbC8elT7mNaWJPttrR6M96crZSrhUQpXj4MBczDc6c+xxtAjQJ4AJcVjQn1u8S pbPg25UPAmUENh1PRbCXrDz2HFCvnqBqP52ovQH0yqcAo9SFZZiUL1nGhMaLCEryLi D53tuPWKGc/8UPFAbtyb8RV9asVDuasmnU+S5Kz8= Date: Mon, 8 Apr 2024 17:11:57 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Armin Wolf Cc: mlj@danelec.com, rafael.j.wysocki@intel.com, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: Re: [PATCH] ACPI: fan: Add hwmon support Message-ID: <8bccc21e-58ce-460f-b73b-de3b4cf383dd@t-8ch.de> References: <20240408123718.15512-1-W_Armin@gmx.de> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240408123718.15512-1-W_Armin@gmx.de> Hi, On 2024-04-08 14:37:18+0200, Armin Wolf wrote: > Currently, the driver does only supports a custom sysfs > interface to allow userspace to read the fan speed. > Add support for the standard hwmon interface so users > can read the fan speed with standard tools like "sensors". > > Signed-off-by: Armin Wolf > --- > drivers/acpi/Makefile | 1 + > drivers/acpi/fan.h | 2 ++ > drivers/acpi/fan_core.c | 7 ++++ > drivers/acpi/fan_hwmon.c | 78 ++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 88 insertions(+) > create mode 100644 drivers/acpi/fan_hwmon.c [snip] > + > +int devm_acpi_fan_create_hwmon(struct acpi_device *device) > +{ > + struct device *hdev; > + > + hdev = devm_hwmon_device_register_with_info(&device->dev, "acpi_fan", device, > + &acpi_fan_chip_info, NULL); This fails to link if CONFIG_ACPI_FAN=y and CONFIG_HWMON=n: ld: vmlinux.o: in function `devm_acpi_fan_create_hwmon': ../drivers/acpi/fan_hwmon.c:74:(.text+0x819e65): undefined reference to `devm_hwmon_device_register_with_info' With this fixed: Reviewed-by: Thomas Weißschuh > + > + return PTR_ERR_OR_ZERO(hdev); > +} > -- > 2.39.2 > >