Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp819969rbd; Fri, 23 Feb 2024 04:47:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWo/0ATZOa5w8fwoTn8xo6kfyt2IEWT0o7WAFe8R00q/IldU0r9aybFJ9Ob2gnj+XS/3qIkZNgYzEB7z0C6Enx0jrlSnObhIvxgDobtPQ== X-Google-Smtp-Source: AGHT+IEXV/CIkTsfPoKnTG4XHNpjrsZfI8g77r0mirqN02XTj15Dbw0qajdRPArD5mfZhXCkH4Q/ X-Received: by 2002:a05:6402:129a:b0:564:edf2:bda9 with SMTP id w26-20020a056402129a00b00564edf2bda9mr1194561edv.34.1708692432719; Fri, 23 Feb 2024 04:47:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708692432; cv=pass; d=google.com; s=arc-20160816; b=d/eqonP6ncsMQ8sXKm6zXNwsreucDlD2kyKz/h1O40l2T/HOKd+AyMV6m+dgvqq+Fq XTu9IHJwli1FeOeCdmTa3iNc2rNKDAzdHY84Idqos1odvH3+NsOnVMSr9JlpizhTXXgF bQQAPyQkYfeOrrenzNZM+LkB8RWntEh64ugg+bRbecneJMc/+2dxcYllyeK2Q5Z84c3d HjBuqWNs/oD08cKQsrIOJPntcZrf7SXcGy6+q93Qa9/sAsJOqieVNBfspoc6Lt2fLj8E lOTrqc0RUusMPqcYoNXciRZ/mtNhNxv5xkXH9gwaLCRtegzw19CgC1cOYqq0OQcfXZEx JFmQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from; bh=xt0Qft9zmJ8yGQ8HID/s6kChyD35B69VYohgeBpXP+o=; fh=4Ejxir7Asd0PGBlxwH+sBJkQn6ICEtx02wHM8aXm5mM=; b=0vkhkaOnfuDwzuEbpsukicTGGW/EVuKAzGzLOviK31HWbkxAcvoFs6Sf2cqzqDCkve khS5PRGIY1xQ6l788hYCEeoW2htGzfwJA9LrUfL0GMbuSj7dqr6iguKzJQe5QmC/SnnP 1D/rvz4yrriwwzH5fPZbmiDPuuFFVxKXzb802RGF/X1EZeKFvLItSEBWww0nyOz/upHM mKHNSpC6udYfqPqvhUuera92r4KGTOGkWVM2pkJ22aZCSsBYEYVKzgI/sgT0I85bN5bM lORJ5Qqy60M47qwxkNUh2Botl1lNhHZ519BC5RGYxwKvlWasXRwrF4ovu+LbvbYsIdFY lTnw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=0leil.net); spf=pass (google.com: domain of linux-kernel+bounces-78320-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78320-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 c11-20020a05640227cb00b00564d52c8ce3si3079792ede.508.2024.02.23.04.47.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 04:47:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78320-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; arc=pass (i=1 spf=pass spfdomain=0leil.net); spf=pass (google.com: domain of linux-kernel+bounces-78320-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78320-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 43D001F256F3 for ; Fri, 23 Feb 2024 12:46:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D456C7EEFD; Fri, 23 Feb 2024 12:46:13 +0000 (UTC) Received: from smtp-bc0f.mail.infomaniak.ch (smtp-bc0f.mail.infomaniak.ch [45.157.188.15]) (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 D241C7D40B; Fri, 23 Feb 2024 12:46:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.157.188.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708692373; cv=none; b=GWUw5fRmzE82Q2Pn8AVDtOPXff1YpM52iGIgGo+zRdhoqrczl/9qq/tgJjuU6sCOZfwHMDxBzeMGdnm99dgrv/e4FHeAdYUyEBp0wVjfhbwO5N/3JbsE7T7rJXL499FCzX3obRSZUCw+o8bqgf9ap0M419PUig+fM0XN6tq0VwQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708692373; c=relaxed/simple; bh=O5J38fZMczK0MaBGKtlxx86NTATzdfRmyBIfc3ANxZg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rN44W+idMCz/GOllGdOoc7TibXocInSGNaPpsO+F6MyVTXafRWUDpAi/oyXGxCdjPzPnM2O0j5khEb6oVCKBd0qCz+5lS39te4K/eUZlbCHcmTMnTOvvZ6zWcrs2GB1uuWEJeA6P43SUXYFsRx4254b1VTtP1beuLHUHv9M+f9k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0leil.net; spf=pass smtp.mailfrom=0leil.net; arc=none smtp.client-ip=45.157.188.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=0leil.net Received: from smtp-4-0000.mail.infomaniak.ch (smtp-4-0000.mail.infomaniak.ch [10.7.10.107]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4Th8rW0T5kzGlS; Fri, 23 Feb 2024 13:46:03 +0100 (CET) Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4Th8rV3HzMzw14; Fri, 23 Feb 2024 13:46:02 +0100 (CET) From: Quentin Schulz Date: Fri, 23 Feb 2024 13:45:23 +0100 Subject: [PATCH 3/3] iio: adc: rockchip_saradc: replace custom logic with devm_reset_control_get_optional_exclusive Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240223-saradcv2-chan-mask-v1-3-84b06a0f623a@theobroma-systems.com> References: <20240223-saradcv2-chan-mask-v1-0-84b06a0f623a@theobroma-systems.com> In-Reply-To: <20240223-saradcv2-chan-mask-v1-0-84b06a0f623a@theobroma-systems.com> To: Jonathan Cameron , Lars-Peter Clausen , Heiko Stuebner , AngeloGioacchino Del Regno , Andy Shevchenko , Shreeya Patel , Simon Xue , Philipp Zabel Cc: Jonathan Cameron , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Quentin Schulz , Quentin Schulz X-Mailer: b4 0.13.0 X-Infomaniak-Routing: alpha From: Quentin Schulz devm_reset_control_get_optional_exclusive does what this driver is trying to do in its probe function, therefore let's switch over to that subsystem function. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- drivers/iio/adc/rockchip_saradc.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/iio/adc/rockchip_saradc.c b/drivers/iio/adc/rockchip_saradc.c index 1c0042fbbb54..bbe954a738c7 100644 --- a/drivers/iio/adc/rockchip_saradc.c +++ b/drivers/iio/adc/rockchip_saradc.c @@ -450,16 +450,11 @@ static int rockchip_saradc_probe(struct platform_device *pdev) * The reset should be an optional property, as it should work * with old devicetrees as well */ - info->reset = devm_reset_control_get_exclusive(&pdev->dev, - "saradc-apb"); + info->reset = devm_reset_control_get_optional_exclusive(&pdev->dev, + "saradc-apb"); if (IS_ERR(info->reset)) { ret = PTR_ERR(info->reset); - if (ret != -ENOENT) - return dev_err_probe(&pdev->dev, ret, - "failed to get saradc-apb\n"); - - dev_dbg(&pdev->dev, "no reset control found\n"); - info->reset = NULL; + return dev_err_probe(&pdev->dev, ret, "failed to get saradc-apb\n"); } init_completion(&info->completion); -- 2.43.2