Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4563149rwe; Tue, 30 Aug 2022 12:25:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR6/D3T/ugj6pp9iJUL3ZceSPzGrMChYiV+4g5gV31u8a3nZgpJiXoJPQTW5BWpfD10Q1zjR X-Received: by 2002:a17:902:6b42:b0:174:4308:ce52 with SMTP id g2-20020a1709026b4200b001744308ce52mr20106810plt.81.1661887506241; Tue, 30 Aug 2022 12:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661887506; cv=none; d=google.com; s=arc-20160816; b=T4oikySK7bUl5xXCJ89BUONhaVHt3awnQ/GVO8tO6CN9g+V8T0tAX69FVyrq1g5Xx2 5RUT5E+rb2/0hE6+oBCwMoUivvtv9n1hxn2mGo31zNH+BrbgLt3WjvBkPo2dLhW5hZSL 4ea4ZyNPGID88kHd+0JAIkpeYigh1Vo+GUbUISnDImKwiFtxHq1P0EWcZicYeGkvUDmE 47qsW5Yoa9BXlMajARckg5GaTo/hc6KIAjLviYwZgtlyj5xjbkRyrrJs58mI5pCMmw3b 0EjzmrWLewZoMtfwFWu5mOlnrvP+liORwJHR5dcY/cYilB1Te3CP1hUIpAFh7texMsVJ d7yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ojfEjjcjmyVBMCaqrtlxjcSlC7XkksBMngN5dfWRcB4=; b=u5bzRZNqxnVzwWhKK9iDmhjtA2UKxfnqjkkmCF/1VfBSzvE54p5IC+dR6ViG7759oB 6kGbUh++0WMlqbBelEaZAY852SW1/DntKBp+8CgVwI8lQYZ3x+RfquK1gXeC+oklq66w KylZoTDTqWgNgZ60MEcIWN7PNZgSaQVAgD8xxMQ+9Kr+AOKcnCScH4ROyufnPf3pz2Sx hH26ecSufdNGj8DqmrBxXLcFbBmFFY9oMR/EUmLs8nvuKlvONpzQQ5v55gTWhz+IRWhE 6XcOh8zYF5dZIJohNdONdd8s01fmUOTTGbE+l3LJ8l9KyK/2vhwOueqY0CgLTfICBqvB AqDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=sL8kDR1C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lx4-20020a17090b4b0400b001fb0ec88c74si14280006pjb.176.2022.08.30.12.24.53; Tue, 30 Aug 2022 12:25:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=sL8kDR1C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231704AbiH3TXj (ORCPT + 99 others); Tue, 30 Aug 2022 15:23:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230147AbiH3TXC (ORCPT ); Tue, 30 Aug 2022 15:23:02 -0400 Received: from smtp-fw-9102.amazon.com (smtp-fw-9102.amazon.com [207.171.184.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FB437AC1A; Tue, 30 Aug 2022 12:22:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1661887365; x=1693423365; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ojfEjjcjmyVBMCaqrtlxjcSlC7XkksBMngN5dfWRcB4=; b=sL8kDR1CvmTTsWTf+5vLnCOYnKeBmNJuuPj0VH0kTMkNfFMU9K0X3Umk hvWZSDY0UWEVBq7RHRpMVQYlU35oJ5/LWsBnya/K/bDxBAVh1upt8C/L9 Ivv/3ocEuVSq1jv+MkhIetInU0PWdBZ3Qec7LycUu3w0hiRnUsz9jIjxH c=; X-IronPort-AV: E=Sophos;i="5.93,275,1654560000"; d="scan'208";a="254493537" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-iad-1d-f20e0c8b.us-east-1.amazon.com) ([10.25.36.210]) by smtp-border-fw-9102.sea19.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 19:22:43 +0000 Received: from EX13MTAUWA001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-iad-1d-f20e0c8b.us-east-1.amazon.com (Postfix) with ESMTPS id 353DDE15CC; Tue, 30 Aug 2022 19:22:38 +0000 (UTC) Received: from EX19D013UWA001.ant.amazon.com (10.13.138.253) by EX13MTAUWA001.ant.amazon.com (10.43.160.118) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Tue, 30 Aug 2022 19:22:16 +0000 Received: from EX13MTAUWA001.ant.amazon.com (10.43.160.58) by EX19D013UWA001.ant.amazon.com (10.13.138.253) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1118.12; Tue, 30 Aug 2022 19:22:15 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by mail-relay.amazon.com (10.43.160.118) with Microsoft SMTP Server id 15.0.1497.38 via Frontend Transport; Tue, 30 Aug 2022 19:22:15 +0000 Received: by dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (Postfix, from userid 14301484) id 6A8F34D46; Tue, 30 Aug 2022 19:22:12 +0000 (UTC) From: Eliav Farber To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [PATCH v3 05/19] hwmon: (mr75203) skip reset-control deassert for SOCs that don't support it Date: Tue, 30 Aug 2022 19:21:58 +0000 Message-ID: <20220830192212.28570-6-farbere@amazon.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220830192212.28570-1-farbere@amazon.com> References: <20220830192212.28570-1-farbere@amazon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-14.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Don't fail the probe function and don't deassert the reset controller if a "reset" property doesn't exist in the device tree. Change is done for SOCs that don't support a reset controller. Signed-off-by: Eliav Farber --- V3 -> v2: - Change "reset" property to be optional instead of skipping it. drivers/hwmon/mr75203.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/mr75203.c b/drivers/hwmon/mr75203.c index f89f7bb5d698..901030125127 100644 --- a/drivers/hwmon/mr75203.c +++ b/drivers/hwmon/mr75203.c @@ -525,14 +525,17 @@ static int mr75203_probe(struct platform_device *pdev) return ret; } - pvt->rst = devm_reset_control_get_exclusive(dev, NULL); + pvt->rst = devm_reset_control_get_optional_exclusive(dev, NULL); if (IS_ERR(pvt->rst)) return dev_err_probe(dev, PTR_ERR(pvt->rst), "failed to get reset control\n"); - ret = pvt_reset_control_deassert(dev, pvt); - if (ret) - return dev_err_probe(dev, ret, "cannot deassert reset control\n"); + if (pvt->rst) { + ret = pvt_reset_control_deassert(dev, pvt); + if (ret) + return dev_err_probe(dev, ret, + "cannot deassert reset control\n"); + } ret = regmap_read(pvt->c_map, PVT_IP_CONFIG, &val); if(ret < 0) -- 2.37.1