From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (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 771D930E84E for ; Wed, 29 Jul 2026 02:08:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785290928; cv=none; b=EgS+dGCRp4AznpYwDTVnuOp7OwE8UhYpcgfXLqRdG6ztAWaXbQ5LJr1l5qNUwmqEOV3gcbm2dtNVBFEoKSo6HkEQnhDYRcmimiUplof6SJQ+oo4pXfii9Ggu+aGMPWgr0FoaSncaYCCUBSjtwi8SqD/ZPAKV2MXqqD4lN3r3qmA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785290928; c=relaxed/simple; bh=roYhyZV8X4uM/O+75tBihxvmxW4jnEm0s3TSZL3MJOk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ndWXeKE4a5MekQTeMhTevciT8T3NJTYOJV/As1WRelrfcP9qwJBa6Hmfq5QNg/0RHbO1uQYO9+qJvg3615Rb7De8KEiG4FkuWrjOwW4nNIl/W3BMnba4vKvi6UpEYDWBkLZHfX0FS5LIhJ/fbJWm9EC7KMww44Vu6ANz6vm8fAE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ad65iZVY; arc=none smtp.client-ip=209.85.219.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ad65iZVY" Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-8ff88549786so4468326d6.3 for ; Tue, 28 Jul 2026 19:08:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785290925; x=1785895725; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=8G4pIhNG8aXKSlvoYcB/w186WkTgZyB4Tj6gt5d/Gtw=; b=ad65iZVYEfcnzTzux+tFtRPzH+LbJqo+OX+dkCCJnYjc+6M+cuxUxM3hk9YeidmUSk yI22BSDzVUgDh50xBW95zDSxJsV2jjCHQsrYv9UQqUrfCz6E2vhtmW5TLnmCAkSFmlYD 85AjMSyt4eTzz4Sf0KVM1b2rKlzCirgsYNnL1mW6k9A6NkwH3d4PqKgAcRv33eQuzulz mj7VKL04IU3XsaAH2GDx2kTLmshI/TVxPUqtATjo9pPw0hUf5VLyJZduOjp5gSNovYWX fen7nR9+xkINcre8jd0UQbf0td8sVTHMgIfxlGOgkgUwN2ds2zc3C9biSIptvmtFsJfH g5uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785290925; x=1785895725; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=8G4pIhNG8aXKSlvoYcB/w186WkTgZyB4Tj6gt5d/Gtw=; b=fzRvIR7qX6avcv3qRC/j+EkeQb28e5862c64hFSFYsGWE5LAcnLtPEhNWqwlWvi8mX XAYU2Thv6a4EGKlqjs3Fdp2+PSYHJSE/1Z7tL+WeVlVN3c71Sq1469THynm2VHZzIyfZ TOK1tdXKedAD2Sf6hGttzEc3x/ATeixEWgpOAs8JSZC3yqCbk3fHdtEgZZPPchwwV7WD fnI6dGYS4GYUutpAdJ4ZTqwmvdJonTHxLJCDFnLLhcGDdKlHqJTeFQmKfuAIOr9W3MV5 p5gIsa9sHxoQxoGP9d4ToAAfLp6rh5XdVW2QJELrKf19vcy1r8zQVIcwcLqTM7L8/wfY Hfzw== X-Forwarded-Encrypted: i=1; AHgh+RpJKudJA23srCZV7iLZidGLsfL+QONaUITyINM4LPxnZqsGZNMD4eNXRNqMIK5Zlf1OfyN+VwogtLhi3/A=@vger.kernel.org X-Gm-Message-State: AOJu0Yz9tw6iPTTr57GpgoOGeczI8xv4KDvTXHbELjawOTtlf1DWV/6s PwIB4Tvau+s44UNn3LxCqKSIrGhTD9vU9pc4yeaeBv0vPhKBcI1jr6Op X-Gm-Gg: AR+sD132dbyZOdOvh1rZ35aCupLiq7VUBIRNBG7D7yWEQQJqAC7zEdDv7+VCuhsDflY AVR7hC4puHAyyqxySc2WDBt0UiIyggwxQb2K9m3MYqH2SUtQPILeAIyJ1mw/gVt3MV3i6zrJ8y2 Mpg7v3pZr+IpXGGZasGVXCDDtPU2abFXwiKRHwT52/fPjha0TB4uKvP8h3ynaMJd2NmW22NOSGp 1NPJn1qhwsUoxHy5lzH3Sj6CdDSYTda2MeF26i7EM0qgNaugb1uhmWH8SaqTaWSztBPJ0diKKWv vwKFOYLvldEN7EG9KrCgbSJv5VcEn/Z79lSKy8HMH1QNvEM1m7mKa4lbqGxiVL0/eT71wYGQNTp ZTLR7ZGL5z5KGn66qqkXiVwB9TeiCDCqbHawzRAvVElEJTMXkkA1ERA+ifVB88BIbSKpjfMSwXb Dh8WNOd95nOazbKOja/4pj5gQV4llQ8XVJCdCkhH43/6MhY8sEqTBDh0BIWvBsUyNaYxX52YP3O a9FrFiaAn2yjzqyqC5EDZruuFKbYDwnFnYTwpXyf1Szxms= X-Received: by 2002:a05:6214:29eb:b0:907:c234:809c with SMTP id 6a1803df08f44-90817378090mr52884706d6.65.1785290925173; Tue, 28 Jul 2026 19:08:45 -0700 (PDT) Received: from [192.168.60.4] ([207.115.103.98]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-9081db0ddd5sm13656026d6.0.2026.07.28.19.08.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Jul 2026 19:08:44 -0700 (PDT) Message-ID: Date: Wed, 29 Jul 2026 10:08:32 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v7] platform/x86: panasonic-laptop: add fan speed mode for newer models To: Guenter Roeck , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= Cc: platform-driver-x86@vger.kernel.org, Kenneth Chan , Hans de Goede , LKML , linux-hwmon@vger.kernel.org References: <20260718185704.3466-1-alexyeo362@gmail.com> <531e3c48-bb61-4741-8fe7-a2dbc213eb1e@roeck-us.net> <84b521b8-112b-4fed-ab82-e1e16d770e66@gmail.com> <635a0d22-8565-4c62-94d5-2cbaff308558@roeck-us.net> Content-Language: en-US From: Alex Yeo In-Reply-To: <635a0d22-8565-4c62-94d5-2cbaff308558@roeck-us.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2026/07/22 8:00 AM, Guenter Roeck wrote: > > I for my part would like to understand why hwmon_lock() / hwmon_unlock() > (or the hwmon_lock guard) are not sufficient. You suggest above that they > are not sufficient and that you need the additional pwm_fan_lock, but you > don't really explain the reason. You do explain that you need to lock the > thermal access functions, and I agree, but you do not explain why the hwmon > subsystem lock functions can not be used. It would be important to > understand why that is the case because those functions exist for exactly > that purpose. If they are insufficient, it is important to understand why > that is the case. > > Thanks, > Guenter > I have reworked the code to use hwmon_lock() via guard. I have tested the code on my machine and it works as expected. As a result, hwmon is now the primary owner of the fan. I will submit a v8 patch with more details. Thanks