Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2627361rdb; Mon, 12 Feb 2024 10:43:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXWXSUwR6FI5pJDkAkRMBb8xkPh2B5wAAH1vwY1Z8gjAqlIIX/0oKKZ+JYE9W4B5fE5tk0v/A+kxdddCh1ZrvjZyAqOn9dd8gLfoUXPcA== X-Google-Smtp-Source: AGHT+IHMC7bmFl/Y9DycJ/tA6TXxuONnP7h5QL1aY+asT8693jr5FA3uXVXvT9D5Cc8pc/1lZZje X-Received: by 2002:a17:90b:390:b0:296:865d:e0c0 with SMTP id ga16-20020a17090b039000b00296865de0c0mr4242557pjb.45.1707763410765; Mon, 12 Feb 2024 10:43:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707763410; cv=pass; d=google.com; s=arc-20160816; b=f+nHQ7fFm623Se2Y5eKMRuLjm+/Fy+FW+pdcQWdnLNaXdR3u7wCSbVN0UVCCidLXWC aYzyZxw20yZQnRftsgG0x/B8uLgpMnBU5QNoZNJhAvOzbDGTj88p7X0xqysWevkAI+DQ Ez4KeIhzyGcCiWOw+lb8zMdc4ynh3ItMbk1otTq2ee+fIRham1D3XBwxpH7uw9DHctIV z/oF/n/9bn342PAI09n8zy83AT6QzEs6G5CcdfLxtPj6XaRBpfd98DX3YmA+yO5TcseA T8mcBtfpQtaKcWW9m8DIbFxOuLqb7oC0gCUOMiyVaEvpzGvS5OsOv6biN2ND34rXuLp3 YkOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=vhY0L/q+gYzWXX9S6sUejlhI+rPSgEyGab12EG2fBqA=; fh=miJ/fWad/Rps/QGg7WaFDdeHhAFqIUqhVJ/8jOA4F4g=; b=ckEV9fgSCTrtX2Ru5ATYLkvsGC+L5Pg4HrezZArinMz8krvGPGOVwUU+32Yx+clQtF aptkMNHLmFYhnizO/kGVz16C66otOvSA76FzKiQ6WsjIUToH6idGUkcIyA939cZsNe1E 31DczS9z4/nv2y2293Jr5WyS7ycICqOkZWeqbO00+YP3E/3OiswGvaeOGaDMoOC2+sBU Esa83dAdoYUits1vzt6680ibZxIy2HBz8fL5WENgPMt6mtHPR+BQ3VzkFDKtXLhTPMV8 IRMXlO9dtIz0k3Vk3v9pp3pNM0bNG+MJ2IckrnYa0R/hn4JU+Vw3klyGp74OmZFPegic p2Xg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-wireless+bounces-3475-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3475-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCW43eqnRjiaEUTQ5uT+ufp5iCI3XbRtw6s2eIvH5qeR/27r9bmfisU9WK60RIRzlF45EJZH8Yhv8ZYl+wvZpdqEyvxEmrZ5Eq45GYGMpA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id sx6-20020a17090b2cc600b0029631bd90c5si634994pjb.156.2024.02.12.10.43.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 10:43:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3475-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-wireless+bounces-3475-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3475-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 394C8283631 for ; Mon, 12 Feb 2024 18:43:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26AD547793; Mon, 12 Feb 2024 18:42:35 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) (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 AC21B3FE44; Mon, 12 Feb 2024 18:42:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.96.170.134 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707763355; cv=none; b=kZj2N1GMp61RygJFLN6KheHfv5jwLd5Gu8LoouABzpFn9CsAg5pZ8cPaWL42zkIGzj9PxT1YFaXGfMw7Yg8Xg7OK0fKWWy4Jmu9zHy41UDZ/oJ79cTSqVR6ufya9FIAbNgeRQRdvsZzu3HX0wpNBU8q46XrdIfV0+HR0MIFO0XI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707763355; c=relaxed/simple; bh=0fjHyFCgQiCJ7Xf9wqWXnNvGeNJWsCVj3Z7wFx692qc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ogUnMkS7nCblb10QkqU3rySOZBGpWtZ4Rm9oiJlxmMwaIEvbTmac0py1hw4x0MiPz00D8dB/LAu+CGhV+OIdGu4oGLEFmL7qfD8M27e9eI5Q0XcTIEMdGq2xuIOGBmLKcEAnzO3tVhnLrPIT93owoBoKFozxmzPQxl3JTcKiFSw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net; spf=pass smtp.mailfrom=rjwysocki.net; arc=none smtp.client-ip=79.96.170.134 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rjwysocki.net Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.4.0) id e1f8ca868e59d311; Mon, 12 Feb 2024 19:42:30 +0100 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cloudserver094114.home.pl (Postfix) with ESMTPSA id 2107C669CF2; Mon, 12 Feb 2024 19:42:30 +0100 (CET) From: "Rafael J. Wysocki" To: Linux PM Cc: Lukasz Luba , LKML , Daniel Lezcano , Stanislaw Gruszka , Srinivas Pandruvada , Zhang Rui , netdev@vger.kernel.org, Ido Schimmel , Petr Machata , Miri Korenblit , linux-wireless@vger.kernel.org, Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Manaf Meethalavalappu Pallikunhi Subject: [PATCH v2 6/9] wifi: iwlwifi: mvm: Set THERMAL_TRIP_FLAG_RW_TEMP directly Date: Mon, 12 Feb 2024 19:38:07 +0100 Message-ID: <22182690.EfDdHjke4D@kreacher> In-Reply-To: <6017196.lOV4Wx5bFT@kreacher> References: <6017196.lOV4Wx5bFT@kreacher> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrudefgdduudegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepudeipdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhukhgrshiirdhluhgsrgesrghrmhdrtghomhdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtohepshht rghnihhslhgrfidrghhruhhsiihkrgeslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehsrhhinhhivhgrshdrphgrnhgurhhuvhgruggrsehlihhnuhigrdhinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=16 Fuz1=16 Fuz2=16 From: Rafael J. Wysocki It is now possible to flag trip points with THERMAL_TRIP_FLAG_RW_TEMP to allow their temperature to be set from user space via sysfs instead of using a nonzero writable trips mask during thermal zone registration, so make the iwlwifi code do that. No intentional functional impact. Note that this change is requisite for dropping the mask argument from thermal_zone_device_register_with_trips() going forward. Signed-off-by: Rafael J. Wysocki --- v1 -> v2: * Rename trip flag (Stanislaw). * Fix coding mistake in iwl_mvm_thermal_zone_register(). * Add "wifi:" prefix to the subject (Kalle). --- drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) Index: linux-pm/drivers/net/wireless/intel/iwlwifi/mvm/tt.c =================================================================== --- linux-pm.orig/drivers/net/wireless/intel/iwlwifi/mvm/tt.c +++ linux-pm/drivers/net/wireless/intel/iwlwifi/mvm/tt.c @@ -667,9 +667,6 @@ static struct thermal_zone_device_ops t .set_trip_temp = iwl_mvm_tzone_set_trip_temp, }; -/* make all trips writable */ -#define IWL_WRITABLE_TRIPS_MSK (BIT(IWL_MAX_DTS_TRIPS) - 1) - static void iwl_mvm_thermal_zone_register(struct iwl_mvm *mvm) { int i, ret; @@ -692,11 +689,12 @@ static void iwl_mvm_thermal_zone_registe for (i = 0 ; i < IWL_MAX_DTS_TRIPS; i++) { mvm->tz_device.trips[i].temperature = THERMAL_TEMP_INVALID; mvm->tz_device.trips[i].type = THERMAL_TRIP_PASSIVE; + mvm->tz_device.trips[i].flags = THERMAL_TRIP_FLAG_RW_TEMP; } mvm->tz_device.tzone = thermal_zone_device_register_with_trips(name, mvm->tz_device.trips, IWL_MAX_DTS_TRIPS, - IWL_WRITABLE_TRIPS_MSK, + 0, mvm, &tzone_ops, NULL, 0, 0); if (IS_ERR(mvm->tz_device.tzone)) {