Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4249234rdb; Thu, 28 Dec 2023 15:50:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHy16417svMDV8/lQpQ98qiP5wraM744Un+NKWgQ5KmADHRdooR9pBk1lh5F9uSwzy/cGI6 X-Received: by 2002:a50:8e56:0:b0:543:5cfa:ba41 with SMTP id 22-20020a508e56000000b005435cfaba41mr4783593edx.25.1703807451287; Thu, 28 Dec 2023 15:50:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703807451; cv=none; d=google.com; s=arc-20160816; b=TXTfAXK/w/4LnPAuraMrZSzCKIyBfZbda6c7YGngY4w4Rbm++IoX2gwEsaQSqNS3O1 vVXzrxAvtePEPuvDvaLvqgGESwVXdPs8cJ0QmUWs4fhTtVykHOb20aSlEx1pZAvcFLDA sgAAfLWnVK03K97z5ng30kr8AA3SO1ZHTR+V0F6gWVa5DNSRIA82SoXr0/+EBJZLz6vX PsivNnKUaOD0BiAkKM3YbBXsT64Qpl0bCoCyHnZ4Bf1Q7wjml4Ye68DMlRCc94VoTkC/ 8Dla7jFE4bB/D06CPCEI/ktmCzydNQ7GF+5edp50nW/JV8VUjREAvXVoRpzMn7hKId64 L3Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=9darX8R7g5MjCyzy3Z8xvlLW0J2TPRLyQHjGa081eZM=; fh=AZKpBq+DSXAgcWh1hBmGJZYmiH5WlenACAo0e5hB/10=; b=zujE7/SpsnjPy6fw2KQPUh0nlg8SS21bvtM8GMZIR97+ZDs+vVNgVjBKdHJsCY0dn9 NiP9UxOmkMv9jTJOjLSNfTgEJTwRcecLhImyc24hXlo6BuNuhrgv9rNQiC8jzSsBHiHG hbkL5HRgyvvNqhKEu8tBx/ZYKdmu4aqhkl9XRs0+EXnb8MHUz+9Bo9392pBt4Z0k5XQj XYXBGbBcC6mhOPFKfSBfxHEwWNx/EJtJQfay9ua6dy+/vUwElx7xaktMoX35UJQVv1vL LYHrwarIFo6BDo8R29u/HVDbu+hS/zeDGDKvQ0O6D0booFvG2fnxUf4gBbdlXghCkzyN 4oqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@iwanders.net header.s=google header.b="OajBQIF/"; spf=pass (google.com: domain of linux-kernel+bounces-12884-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12884-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r9-20020a50aac9000000b0055563c24460si1553197edc.98.2023.12.28.15.50.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 15:50:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12884-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@iwanders.net header.s=google header.b="OajBQIF/"; spf=pass (google.com: domain of linux-kernel+bounces-12884-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12884-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0D6A21F244D4 for ; Thu, 28 Dec 2023 23:50:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5E0510A1F; Thu, 28 Dec 2023 23:50:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=iwanders.net header.i=@iwanders.net header.b="OajBQIF/" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) (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 B273210A01 for ; Thu, 28 Dec 2023 23:50:39 +0000 (UTC) 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-qv1-f44.google.com with SMTP id 6a1803df08f44-67f91d48863so46867656d6.0 for ; Thu, 28 Dec 2023 15:50:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iwanders.net; s=google; t=1703807438; x=1704412238; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=9darX8R7g5MjCyzy3Z8xvlLW0J2TPRLyQHjGa081eZM=; b=OajBQIF/DJsOz2h9p1hlTFLSgnN0xUGk63DuiQPswLqADAzjqPMy9RekQcRl0l9Frg G+5fK6xLeOQawcOaKIXI3svM9687TszhV2C13v5dVyceScHcoF8Td76lyeiJdxNjYYhw QdcmC+iPMQZwowwigRIRuK8nwETTnIj9gjVmI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703807438; x=1704412238; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9darX8R7g5MjCyzy3Z8xvlLW0J2TPRLyQHjGa081eZM=; b=qAXeM3cVWyyl5X/vPHFkM9HlEeXxQvqd4rWqqH/GH2ZpiRSR8iHkRaXv62X24PDMPm H8neZR7KXCa3W6eYCdarzp5dxjcxueE6qu+IgHCJsMukLwICt8Pi+Z2yLngHNx6y+jjK 60BpqWp0aET2H+to2cLvuaBAqF23RnWHvO0KFtIFqjJQfFhRk/sVYyaBcGHG+hDG/4p4 0Lm7BXH2VU44squXy2r25LgljZIJ/1AN9VACDvQfR1o+z2Kn/iwXYux8mMreGt/BlIf8 3T4iph/FTfh/4rRnqM00eGZKwYXG/2CLFn5QsAc83issm78mk9kv5kHBK8MJB/ddAAJq O3nQ== X-Gm-Message-State: AOJu0YxFdWt1OxN+uST/4QSzAxGwX5niCJ6H5MfXRRuWdX7liWzoJ6Ks uwcZPN2akP1mFSb5BUzo/9FF4Z/6ZdySP61sVlNSV160TrdNyQ== X-Received: by 2002:a0c:e70d:0:b0:67f:c3da:f1db with SMTP id d13-20020a0ce70d000000b0067fc3daf1dbmr9540051qvn.93.1703807438659; Thu, 28 Dec 2023 15:50:38 -0800 (PST) Received: from eagle.lan (24-246-30-234.cable.teksavvy.com. [24.246.30.234]) by smtp.gmail.com with ESMTPSA id mm7-20020a0562145e8700b00680608371adsm1597663qvb.18.2023.12.28.15.50.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 15:50:38 -0800 (PST) From: Ivor Wanders To: w_armin@gmx.de Cc: corbet@lwn.net, hdegoede@redhat.com, ivor@iwanders.net, jdelvare@suse.com, linux-doc@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, linux@roeck-us.net, luzmaximilian@gmail.com, markgross@kernel.org, platform-driver-x86@vger.kernel.org Subject: Re: [PATCH v2 1/2] hwmon: add fan speed monitoring driver for Surface devices Date: Thu, 28 Dec 2023 18:50:30 -0500 Message-Id: <20231228235030.6526-1-ivor@iwanders.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <764c0645-674a-4a25-9bdb-2707e9532af7@gmx.de> References: <764c0645-674a-4a25-9bdb-2707e9532af7@gmx.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Hi Armin, thank you for your time and comments. > You can drop those checks, the hwmon core. > Maybe you could use a more unique name for the hwmon chip, like "surface_fan". Sure, incorporated both suggestions. > Please propagate the error from __ssam_fan_rpm_get(). Done. Currently that function can only return -EIO and 0, but indeed best to propagate that in case more error codes are returned in the future. > What exactly is the purpose of calling ssam_device_set_drvdata() here? That line was necessary when this driver also hooked into the thermal subsystem. Integration with the thermal subsystem was removed in downstream iterations when I discovered we can't directly control the fan speed, see [1] for more info. I've removed this line, as it no longer serves any purpose here. ~Ivor [1]: https://github.com/linux-surface/kernel/pull/144#issuecomment-1853123261