From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.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 61C471FC7C1 for ; Mon, 27 Jan 2025 09:15:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737969357; cv=none; b=sVXrW7D1eoRnflDN7PB5D6CoRgMoNCIulGcrSr2Fnac3CfPcMKFxvq/r9b8F/pmSeywSI9G4seFiwKGaM1zJ94u1LG0XiYzMvkciZXcPhECm9hhOKtr9UDmxrItkhRlm01EyOu/To21Jggu/fwDpIr0Zz8cRjqBW9MLAIj3gieg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737969357; c=relaxed/simple; bh=TiphF4zr2Pj5KkcZbHO32+T00/RteL1cHzkWaqktWc8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Th28MMH/VF7oodBJ24aa8Wu5wbF2fUPgl6l68cUk8hPiZTO2/vsT32OTino6FbwKO+3vYmdSwOk1zpAH7srhtX6MYZy9XBQz/xi9FnJQf/1lWSCuMnourjnJlSWXYSq3MhjkCLQNXcLSXj0/LaFGYYYkTe8hNhzl9K29Rx6mhAM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=Mk+a/G+6; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Mk+a/G+6" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-43634b570c1so28958295e9.0 for ; Mon, 27 Jan 2025 01:15:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1737969353; x=1738574153; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=QBqjoTrsUdniKM56G4qXF9X4Og44OEoMJTzifBY6c9E=; b=Mk+a/G+6vr1BN8wXmR2AxAJZ+ulwGCdaYuf6PeOL32ke+WmK6W06D4IpC5Wb6uxEC+ za/YSj7yo2mXvK3/nyo273k4LSRMdY8CApSCLEEIRQzdY32redtZOb7csWpBHt199+Xo DGDulDf4vglDReZfTlvExL7e6z/ArbJI/ut5UM82W+sc6sgmW7nArroClpSXh3elC7uz TPd0SHQkbeXMzTYtyHjvxt91++KMqY5sBCmZzjbBBKfsR4n2yLQ/gEBB81gfO5HXlRut cDJqR1CLofqFqJOmuwUBcbhH61z3tIXF5z/tbQ97FHw8fYU/9OUDiiv85DRPjRckYrST cWgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737969353; x=1738574153; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QBqjoTrsUdniKM56G4qXF9X4Og44OEoMJTzifBY6c9E=; b=KF0COTJwVMJGHzB1a2oOBNQ3zjJr684dpEkOBdUxEnjvX9O3v/42ZT0ctc8T7D2l+o Q1bdfVfyM4+89cuUyAilyWkvTyDCBYhQi+gC/672de9MzN2K1etslbEwG0VUQWf5rOT2 V2BJrCHqhlny72Zra20vLlTACW7hXzBkcpqug0Ahn4eiDmCYstTFn5psplppgpv+0069 tQac2zgjKoRX7I80+tKBhL4Pot6OjkRS0tnoCizlRQUkfXxqSVCH2l8FteFmLqWVptCR Jdtpc1bEmRE9dw80W1R+63pkk+cqTrNkC2NiRRnwvbtgYhzeAIpyN7LyD0hGNEN8Ba3S hOqA== X-Forwarded-Encrypted: i=1; AJvYcCXv2fh3eyE7k0UHxcz9WyLL7zEy7dQddxvxELNpDTXA84G1/GWvUiLIUKwu1PB1RQTIVrGcrY+3Hw==@vger.kernel.org X-Gm-Message-State: AOJu0YzXXERq0L2rhLs88L8twQHsSoopvlYk4XkH5DKi7s/6ZiGUT/QZ JdsLR+MQRrh6RIOpvzXRpyAu3P7xjygmxevmA5bKiIezegFibxI2WEDY0AK5rUg= X-Gm-Gg: ASbGnctC9LHfO5QA9Vr7QdjQDOMaRkOjrTzl0cCBvWa7lFTswTaolrZ8r+hAJViUmXe g9vkz4XLwoxWy36KsLY28n5epVmJTJn1i9+fcMpLIdPnCemYCkWpX2On2oXLo3jitUa4iaz8PhX ZfCnRh7kVMiu8DL6kRj9aK/j+/Kt+3fx7Qo0ETDhIAbI8+1ytoKDqRDCfasbkIHWpSQo9sw8jE+ B9XA/pLp1YrskZd50tVgrR8w2CUFUUW/pv8YWrG9j6lXVscxOs5V1PS35A6gKiMewy3FvXjf1Mh 5Kg1G3/G75V8 X-Google-Smtp-Source: AGHT+IGH2u1eK/B2vFgK4fpD5Gq2Q6iaPMn6CotExrSV6h3jJObH/bOJSe5pLBi065ce7RjDuJEklA== X-Received: by 2002:a05:600c:4710:b0:434:a59c:43c6 with SMTP id 5b1f17b1804b1-43891451388mr301531235e9.26.1737969352480; Mon, 27 Jan 2025 01:15:52 -0800 (PST) Received: from [192.168.50.4] ([82.78.167.35]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd502007sm123494365e9.14.2025.01.27.01.15.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jan 2025 01:15:51 -0800 (PST) Message-ID: <3efa204f-ed98-42a4-a708-828bcf1f976a@tuxon.dev> Date: Mon, 27 Jan 2025 11:15:49 +0200 Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 4/6] thermal: renesas: rzg3s: Add thermal driver for the Renesas RZ/G3S SoC To: Biju Das , Geert Uytterhoeven Cc: Jonathan Cameron , "rafael@kernel.org" , "daniel.lezcano@linaro.org" , "rui.zhang@intel.com" , "lukasz.luba@arm.com" , "robh@kernel.org" , "krzk+dt@kernel.org" , "conor+dt@kernel.org" , "magnus.damm@gmail.com" , "mturquette@baylibre.com" , "sboyd@kernel.org" , "p.zabel@pengutronix.de" , "ulf.hansson@linaro.org" , "linux-pm@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-clk@vger.kernel.org" , Claudiu Beznea , "open list:IIO SUBSYSTEM AND DRIVERS" References: <20250103163805.1775705-1-claudiu.beznea.uj@bp.renesas.com> <20250103163805.1775705-5-claudiu.beznea.uj@bp.renesas.com> <20250125121826.6abbe7de@jic23-huawei> <3c7f5a92-254c-4ce1-9813-80c98c1f549e@tuxon.dev> From: Claudiu Beznea Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi, Biju, On 27.01.2025 11:11, Biju Das wrote: > Hi Claudiu, > >> -----Original Message----- >> From: Geert Uytterhoeven >> Sent: 27 January 2025 08:55 >> Subject: Re: [PATCH 4/6] thermal: renesas: rzg3s: Add thermal driver for the Renesas RZ/G3S SoC >> >> Hi Claudiu, >> >> On Mon, 27 Jan 2025 at 09:33, Claudiu Beznea wrote: >>> On 25.01.2025 14:18, Jonathan Cameron wrote: >>>> On Wed, 22 Jan 2025 11:29:19 +0100 >>>> Geert Uytterhoeven wrote: >>>>> On Fri, Jan 3, 2025 at 5:38 PM Claudiu wrote: >>>>>> From: Claudiu Beznea >>>>>> >>>>>> The Renesas RZ/G3S SoC features a Thermal Sensor Unit (TSU) that >>>>>> reports the junction temperature. The temperature is reported >>>>>> through a dedicated ADC channel. Add a driver for the Renesas RZ/G3S TSU. >>>>>> >>>>>> Signed-off-by: Claudiu Beznea >>>>> >>>>> Thanks for your patch! >>>>> >>>>>> --- /dev/null >>>>>> +++ b/drivers/thermal/renesas/rzg3s_thermal.c >>>>> >>>>>> +static int rzg3s_thermal_probe(struct platform_device *pdev) { >>>>>> + struct rzg3s_thermal_priv *priv; >>>>>> + struct device *dev = &pdev->dev; >>>>>> + int ret; >>>>>> + >>>>>> + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); >>>>>> + if (!priv) >>>>>> + return -ENOMEM; >>>>>> + >>>>>> + priv->base = devm_platform_ioremap_resource(pdev, 0); >>>>>> + if (IS_ERR(priv->base)) >>>>>> + return PTR_ERR(priv->base); >>>>>> + >>>>>> + priv->channel = devm_iio_channel_get(dev, "tsu"); >>>>> >>>>> Given there's only a single IIO channel, you could pass NULL >>>>> instead of the name, and drop "io-channel-names" from the DT bindings. >>>>> I don't know what's the IIO policy w.r.t. unnamed channels, though. >>>> >>>> It's supported, so fine as long as no future additional names show up. >>>> Will just fallback to index 0 I think. >>> >>> If everyone agrees, I would keep the name, too, to avoid complications >>> in case this IP variant will be extended on future SoCs. > > If you are planning to extend this driver to other SoCs then may be update I don't plan to extend it. My point here was to keep the driver as is for any possible future extensions that might arise. Thank you, Claudiu > KConfig with dependency on ARCH_RENESAS? see [1] > > [1] https://lore.kernel.org/linux-renesas-soc/20250118-trout-of-luxurious-inquire-aae9aa@krzk-bin/ > > Cheers, > Biju