Message ID | 20240131005856.10180-1-ivor@iwanders.net |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-45553-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1595696dyb; Tue, 30 Jan 2024 16:59:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IENy89yc7RTZ1SzuWwcZpcvXbWbRBsMX9hjz1Qupl9welPg8m3fj1QaZsLt6pMtX/6MhyPS X-Received: by 2002:a0d:dbc7:0:b0:603:fc97:128b with SMTP id d190-20020a0ddbc7000000b00603fc97128bmr1707005ywe.94.1706662771177; Tue, 30 Jan 2024 16:59:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706662771; cv=pass; d=google.com; s=arc-20160816; b=LuN1+GML2uoKrQEmFDxZjsZa2ZEb7HF9UR/u3L9A133oHcqgtPfyl5+qRWLyVtGiAa qLN6et3rSI0t0S772rJ4UQO1wc5jSBknwYwo9w55J7rg10WG8hNuS6n22XCR3AUoOYTG c330qpLFBrHYQ6etPrBXjTfQ1jMq+grEDbv1UcAbqmRl+EZdKnox9wHmtNu259E4qSQb 41VRLge0BDMIr9gjucs9Sh79vRhb7Ju2aV4kIzHiorymO5IK84e4k9jtsrWtqrXvnHLX iFVVFNOwy1qVLAU1jeraLVGL/762xp6VF1TJSHsM4aigdZ/MS0wmgisbV8io1HJsxMda eogA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature; bh=GPv2vZK/ahua8U6na2hpRBqLQcV3hwENVO3BpyQ9lBQ=; fh=ZzUuutQMJJjtCx5UG2dj7VDq6gTeO/qukWhR+5kJWNM=; b=kTR+kR/L/Kd4Gf53haoonsLz9HKVbM8KiE1df3TgVUFSX5Ws1UTtHfHbnrRHWxjcIc HKoanxDK4Ks/9GMSAZh7ZUqg02A9OWC8KSQIqsJL7OFllqfFoeVgKtsV0KxbghOVJ4fM 3DwDh1Vj9QFQmYivMzrL5hNN6BmhoqVvSnIWnKpNTWEXE/puxjCNfon3W6WuyzM7YUCn p8TUTpANDYhA9+xOgbnw0iR9Hav5wvFTpdo2jeURMxmdgI2e54DwGNJMSibyU99PVyMe Dj/ttJCdCQ16YqYuJlRju7u03iNCwGP2i0ZcHyKAMiOOVlOXxSRRnF6tEEw+T8HCxPfH FjSQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@iwanders.net header.s=google header.b="Gs3/kGy+"; arc=pass (i=1 spf=pass spfdomain=iwanders.net dkim=pass dkdomain=iwanders.net); spf=pass (google.com: domain of linux-kernel+bounces-45553-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45553-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWMQWOdYKw0Ha3idqSVMNWzNnBJzZ1YZ2T2mziduPmli9e8luuD1pRv436wVBnji3iy2+3L7hzl1sv2n9QMU7EfkiYTWg== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j186-20020a638bc3000000b005cdfdfcd033si8381907pge.180.2024.01.30.16.59.31 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 16:59:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45553-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@iwanders.net header.s=google header.b="Gs3/kGy+"; arc=pass (i=1 spf=pass spfdomain=iwanders.net dkim=pass dkdomain=iwanders.net); spf=pass (google.com: domain of linux-kernel+bounces-45553-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45553-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E6D6E289A7A for <ouuuleilei@gmail.com>; Wed, 31 Jan 2024 00:59:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF8E74C65; Wed, 31 Jan 2024 00:59:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=iwanders.net header.i=@iwanders.net header.b="Gs3/kGy+" Received: from mail-yw1-f176.google.com (mail-yw1-f176.google.com [209.85.128.176]) (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 1AAA67EB for <linux-kernel@vger.kernel.org>; Wed, 31 Jan 2024 00:59:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706662743; cv=none; b=GqVqlAFLlk979fhwOQuvRr9eLP/+97ol1fP8LL5SUE6zODG24Z+qSKxZILAHXu7XrNmyKSxAW2/b4R/a9Loe/K6Le4WGYRG0IC6uRjVrSj2nz11xD2w8HD3ZbvWoxcYfTZgRXvtlPjyT6Wqh3RTFMcf4t6uHfeWQ7piK1qmUPUo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706662743; c=relaxed/simple; bh=QfBbzX85e6nFzmW1qFHgs2po2/nDytRsoCO0GDboz/k=; h=From:To:Cc:Subject:Date:Message-Id; b=QQPTT5W1j8181eLInHpF3YjTLWVU2d7Z4i8JLQd79VfJgbKKWPksrmSEyvTnXQlTU/sDikPXjZLAvq+Fa+BJa/i7nuwHnBD90RcSZPDMjJWqhn0EyhAGV5n9Cr/nDSNHov1aktzLYQ48GsLOJR5231bwQV5Ii57o9L0871Bsm1A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iwanders.net; spf=pass smtp.mailfrom=iwanders.net; dkim=pass (1024-bit key) header.d=iwanders.net header.i=@iwanders.net header.b=Gs3/kGy+; arc=none smtp.client-ip=209.85.128.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iwanders.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iwanders.net Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-5ffee6e8770so54319967b3.0 for <linux-kernel@vger.kernel.org>; Tue, 30 Jan 2024 16:59:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iwanders.net; s=google; t=1706662740; x=1707267540; darn=vger.kernel.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GPv2vZK/ahua8U6na2hpRBqLQcV3hwENVO3BpyQ9lBQ=; b=Gs3/kGy+AXFHMcUEsVkvexvsSfM0UK/whGL5+kQU/6vz6BxxBDJXYRU7H/mgq5nVuW vcodvH0S66fWPwiaYO7rt9E3nq5z8czRGKOrFs6Iu7MRlZMzvZelXcpeYyldSpycRwDD KsY1JASWUpcZOqmsY4RHm+E3/jVCTBuUnnYj4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706662740; x=1707267540; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GPv2vZK/ahua8U6na2hpRBqLQcV3hwENVO3BpyQ9lBQ=; b=g6YOgRy9rC/UstObSfDKWShvnyiYT7I93DbjqQW4E+KnPDsRgs0BP/4LmLn8a3+Azj WtrPy3Ezp/950Y+sNZAeJchNCFLZVB46j69qaDf1Q5ADVv+ma4PRtmnXzjDk/pYJ0gZU 6kueRPvZcrDYerHzqxLqLwf0DcLHZuONTrPN++13p0wFWSWgYKfjgub6ThX/DGk3PmQy xEWiKI1tvX4L08h+/7uoRLK/xMZDulLtm7fsQxKQRN1Kr+2PjPShkhQ9JOgJFjYJerkE A+jjvh9f9Z0MN9DixP9FQUZIgIFWKZtIDXg22msDBNfHjLwtAL8177kebvJIOOi+vuht 6EOg== X-Gm-Message-State: AOJu0YwAlg0YasSzJMLnVWb8km4eM9FcP8hz4kFpOI+WaJ8IlnjJteHT l1kzSqq4VhzWLDCy7yCcclZx9TXyBNeCLRR4tKdQFuuUYQW1MIGwLU8VrV/JNGM= X-Received: by 2002:a81:ae04:0:b0:5fc:111d:abc2 with SMTP id m4-20020a81ae04000000b005fc111dabc2mr367ywh.49.1706662740070; Tue, 30 Jan 2024 16:59:00 -0800 (PST) Received: from eagle.lan (24-246-30-234.cable.teksavvy.com. [24.246.30.234]) by smtp.gmail.com with ESMTPSA id ld27-20020a056214419b00b006869e0eed00sm4969090qvb.26.2024.01.30.16.58.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 16:58:59 -0800 (PST) From: Ivor Wanders <ivor@iwanders.net> To: Jean Delvare <jdelvare@suse.com>, Guenter Roeck <linux@roeck-us.net>, Jonathan Corbet <corbet@lwn.net>, Maximilian Luz <luzmaximilian@gmail.com>, Ivor Wanders <ivor@iwanders.net>, Hans de Goede <hdegoede@redhat.com>, Mark Gross <markgross@kernel.org> Cc: linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH v5 0/2] Surface fan monitoring driver Date: Tue, 30 Jan 2024 19:58:54 -0500 Message-Id: <20240131005856.10180-1-ivor@iwanders.net> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789558594231103934 X-GMAIL-MSGID: 1789565621599027156 |
Series |
Surface fan monitoring driver
|
|
Message
Ivor Wanders
Jan. 31, 2024, 12:58 a.m. UTC
Fifth version of a hwmon driver to monitor the fan's rpm on Microsoft Surface devices, originally submitted in [1], [2], [3], v4 at [4]. Only change since v4 is rebasing on mainline kernel tree's master. Changes in v5: - Rebased on mainline kernel tree's master branch. Changes in v4: - Return 0 from surface_fan_hwmon_read instead of ret. - Use PTR_ERR_OR_ZERO in probe instead of if statement. Changes in v3: - Removed type and attr checks in read and is_visible. - Removed assigning sdev to ssam_device drvdata. - Propagate return from __ssam_fan_rpm_get. - Renamed hwmon chip name from 'fan' to 'surface_fan'. - Removed unnecessary platform_device header. Changes in v2: - Removed all unsupported sysfs attributes from the hwmon driver, leaving the fan input as the only supported attribute. [1] https://lore.kernel.org/linux-hwmon/20231220234415.5219-1-ivor@iwanders.net/T/ [2] https://lore.kernel.org/linux-hwmon/20231228003444.5580-1-ivor@iwanders.net/T/ [3] https://lore.kernel.org/linux-hwmon/20240113183306.9566-1-ivor@iwanders.net/T/ [4] https://lore.kernel.org/linux-hwmon/20240130230654.4218-1-ivor@iwanders.net/T/ Ivor Wanders (2): hwmon: add fan speed monitoring driver for Surface devices platform/surface: aggregator_registry: add entry for fan speed Documentation/hwmon/index.rst | 1 + Documentation/hwmon/surface_fan.rst | 25 +++++ MAINTAINERS | 8 ++ drivers/hwmon/Kconfig | 13 +++ drivers/hwmon/Makefile | 1 + drivers/hwmon/surface_fan.c | 91 +++++++++++++++++++ .../surface/surface_aggregator_registry.c | 7 ++ 7 files changed, 146 insertions(+) create mode 100644 Documentation/hwmon/surface_fan.rst create mode 100644 drivers/hwmon/surface_fan.c