Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp965282lqm; Thu, 2 May 2024 00:41:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV3xA8x3hTs5orOgozfLv8b1t1tw+bSMMp0jW7/qTGEZ8QilPKoG36eU0/ivbrC2GkY1wCqFJbGCkMHBJ9Wh6QbyPcMzNXoMo0gp6FGEQ== X-Google-Smtp-Source: AGHT+IGxUUazSugUpbM/aExjwPESGHcL/IMuN1P2VeleO/kf0KVxH1H4N1ArGjOZnGFYST+EAEPz X-Received: by 2002:a05:6214:d6c:b0:6a0:caba:7e2f with SMTP id 12-20020a0562140d6c00b006a0caba7e2fmr5781210qvs.20.1714635683033; Thu, 02 May 2024 00:41:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714635683; cv=pass; d=google.com; s=arc-20160816; b=K04VzsHEfN9D1dnsp8/q++43nwhQdC/4F2PgCwEutOPTE/XvKfSvrDOSajuXOzK8vS B0Tz7EAKxqM7TXeIXxb/hYd5xPxqHoLWbPE6Q5J9CR33cJzqijIfi48ghH4JwE2QeZlG 6wKY8pbxuKIt5BlDCVjXO7Nme6hXGvxrxaGJ9VhtPROuuFVVZ2/Aoc++pulmMdYFsEPZ eM9CZo4mJrZWjR0PQKzL5iSzfWFiOfExjBXGglVK/Jcya9oTpe4oT9lZZLQAWv1eeOxt So8xXKwyltiBjqzHLG4HPcKG1hkx4XxrK/xKfRV9JDT40omHqKDfuNzObyvjYvzrKsHI cIKw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=9Q2C006YjdfPOCf5/2sNCH0MuBR/EBBXkcEnDcvy0KM=; fh=u4WA+7HLvevpapubkDz/jGO8fQG2oXe0M/RD0IEwwHk=; b=H68WbNarnD82edne/2Vq0DpwBj4OmbnoT2N+yAPQl+IVeGcwiHWgQwwd+NhUzOK9FP +SOS1Q+cQCd1a4Ko1fnTgfk2/SNEQkA8SUMmQL7qn9JYuzsOh7K8P19QkkSYWtLTqpXR SNeIMYBQfBRFbsQlAAKqEmPoXWX1M2eA8H11gr0Gwlf9dBYZf9Pcc+T/eqDndR2KQwuF SDEs+5TYKqAMbQOvwZPU6vqAIw1qOTbmPOYrgWAalvCZlCU84FwOlCFo3TM3uwNq/Tbz mUMzrtULytQebInMU9tWXB536HvsSsdEJD7j7bBhlKMEj9P7WktyeoHQeHC3AAV7Z99p XJ6Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hEvfHznr; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-166063-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166063-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id n9-20020a0ce949000000b006a0cd406409si361642qvo.130.2024.05.02.00.41.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 00:41:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166063-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hEvfHznr; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-166063-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166063-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BF0851C21027 for ; Thu, 2 May 2024 07:41:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D40D722F00; Thu, 2 May 2024 07:41:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hEvfHznr" Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 8F2202209F for ; Thu, 2 May 2024 07:41:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714635675; cv=none; b=DEh9hVIZiDiLO6IUYtbiNIXO6RE4OF0w394ID4Repir948P0nXMZP2ITF5IKcC9zjLHKRCW486CJDRG3Ix86fWBeEaQwOMRY5tvowdir6BVPhZEEQwz47wroumEZcGepF4IhCJ9ZatUheLiqtUIpUM0QS9Se1rsYNxBBNNS6X08= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714635675; c=relaxed/simple; bh=zABtKC+Rtoh7jI4D99cudXvLlTLkH2cSA0Kfdm54lQw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=IRmMDoXUgsU92DxlhdlbU6GOyWWhq5L5ZaPDekkRNSX4dGYffSggRRrejFQcc9zGnAWj2xPulAntwInEir+cvnGsGqADAAqxstkwx1D+J2hOU5LNtWX6WOb1E+vrQpdK6FZtJFYPfEGylZRGNlUJ4b4284MATjwKKFaaUZ6yil4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=hEvfHznr; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a5557e3ebcaso267075566b.1 for ; Thu, 02 May 2024 00:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714635672; x=1715240472; darn=vger.kernel.org; h=content-transfer-encoding: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; bh=9Q2C006YjdfPOCf5/2sNCH0MuBR/EBBXkcEnDcvy0KM=; b=hEvfHznrQGIHw6Oxw9hqIYbiE0jrtzkUrHvwH/Bs1QQfvC0tpoE7hK5Pp4h6u2jizY UGBQKK/ZOlrl898RWELZOVPaQBN/zjzx38781a7nhMKWN3z+dfRvr4DtuAZ6l2phrSvE G2hTa/TyNCIlGQKRhjNQ0onh33cjCSmczsv5V88S6RphNblHRL1i0PGASYUQSwcRQJSI OLQCERFG6re06EYXcEZRAMqBIYisN0lrKscrgpfqTHi/lE8juzLG37fh9raW2OIhBl2g FnWIJue+9lhbAr3hp4IvfVq8SzYCKKzfdThf++a/oHYvrc/lwqDaMUGnV1nlpGgBSwFn OVHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714635672; x=1715240472; h=content-transfer-encoding:in-reply-to:from:content-language :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=9Q2C006YjdfPOCf5/2sNCH0MuBR/EBBXkcEnDcvy0KM=; b=qfP7DEOABy6mEfZRq7hxHA0CE/81yEocfUMhrdfHRCzDqjq9kRwQaHsSr7j28eC8LY OqYmZdCUbkNb963LkGH0tVyK94HzqBOgAyE0AL+qBqtc306miDhAL3unXk30NQ9DWm2Z myoGoLPlioUcsfQFgCXHJ7UF1h9Lzgq0j0SUwR7z4V4D4ptf0O3ldsZo1+TuAgGZiWzf wGQsUWe0qknXlIUGimTl7R0Mp5JslumS6lnG1cCJH9DeihJg26QUL+05DBfWHvSo9BKD zTk9p44dIoaILTevjHwXJtYPucplOQACP18gathjFxmuNC2U1aBnn5bHOA+FoxTaoqKa fsdw== X-Forwarded-Encrypted: i=1; AJvYcCVye2eLSPrPY9t3tB2HIkLsfUK9a+CWmETeEtbIqDtHiFEAU4psbNbAQZlA7anTLbZbdOfWa1Rb8Hm4Yti2cOtygYjk+HhHyWz2hd4k X-Gm-Message-State: AOJu0YzZiyEReySO4Q0REnC/fZ53UGlQeootfLQTkRpd9hNGb2vFG1hw 0vdEUm4fWPdEeXM8MAEDvRxoBp8yP81PnHNJoajVBS+CmEF07BkAXihDhulON0g= X-Received: by 2002:a17:907:7d94:b0:a59:5693:d709 with SMTP id oz20-20020a1709077d9400b00a595693d709mr1777751ejc.30.1714635671861; Thu, 02 May 2024 00:41:11 -0700 (PDT) Received: from [172.20.10.10] ([213.233.85.172]) by smtp.gmail.com with ESMTPSA id n26-20020a170906089a00b00a587868c5d2sm229664eje.195.2024.05.02.00.41.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 May 2024 00:41:11 -0700 (PDT) Message-ID: Date: Thu, 2 May 2024 08:41:06 +0100 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: [PATCH v3 2/2] pinctrl: samsung: support a bus clock To: =?UTF-8?Q?Andr=C3=A9_Draszik?= , Krzysztof Kozlowski , Sylwester Nawrocki , Alim Akhtar , Linus Walleij , Rob Herring , Conor Dooley , Tomasz Figa , Peter Griffin Cc: Will McVicker , Sam Protsenko , kernel-team@android.com, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240426-samsung-pinctrl-busclock-v3-0-adb8664b8a7e@linaro.org> <20240426-samsung-pinctrl-busclock-v3-2-adb8664b8a7e@linaro.org> Content-Language: en-US From: Tudor Ambarus In-Reply-To: <20240426-samsung-pinctrl-busclock-v3-2-adb8664b8a7e@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi, André! On 4/26/24 14:25, André Draszik wrote: > @@ -200,6 +235,14 @@ static int exynos_irq_request_resources(struct irq_data *irqd) > shift = irqd->hwirq * bank_type->fld_width[PINCFG_TYPE_FUNC]; > mask = (1 << bank_type->fld_width[PINCFG_TYPE_FUNC]) - 1; > > + ret = clk_enable(bank->drvdata->pclk); > + if (ret) { > + dev_err(bank->gpio_chip.parent, > + "unable to enable clock for configuring pin %s-%lu\n", > + bank->name, irqd->hwirq); > + return ret; here we return an error > + } > + > raw_spin_lock_irqsave(&bank->slock, flags); > > con = readl(bank->pctl_base + reg_con); > @@ -209,6 +252,8 @@ static int exynos_irq_request_resources(struct irq_data *irqd) > > raw_spin_unlock_irqrestore(&bank->slock, flags); > > + clk_disable(bank->drvdata->pclk); > + > return 0; > } > > @@ -223,6 +268,13 @@ static void exynos_irq_release_resources(struct irq_data *irqd) > shift = irqd->hwirq * bank_type->fld_width[PINCFG_TYPE_FUNC]; > mask = (1 << bank_type->fld_width[PINCFG_TYPE_FUNC]) - 1; > > + if (clk_enable(bank->drvdata->pclk)) { > + dev_err(bank->gpio_chip.parent, > + "unable to enable clock for deconfiguring pin %s-%lu\n", > + bank->name, irqd->hwirq); > + return; but here we just print an error. I guess that for consistency reasons it would be good to follow up with a patch and change the return types of these methods and return the error too when the clock enable fails. Cheers, ta