Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3473624rwb; Tue, 16 Aug 2022 03:50:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR6DcU0X6ZinPlSIjfjUKOv299AuTPJEAopTfwLcHSnEq+X9/m5TLDYNa8tEDWOWCXSfl+8B X-Received: by 2002:a63:8a44:0:b0:41c:cd7b:eda0 with SMTP id y65-20020a638a44000000b0041ccd7beda0mr17889721pgd.117.1660647024223; Tue, 16 Aug 2022 03:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660647024; cv=none; d=google.com; s=arc-20160816; b=A+GrrTqbDUKm3CbP+kFdnMSLWF43QJGGOX04cDYwW8FRyaRY8kGpEa1H4v/zSyYv/Y CnHjP1M7yHDO1t8986TrrAbewGV05HECk5P2fGpMJMnKnMMbNEtpIiGsCYGH5KgUIqNm yBEl7j/rNcVVrdrhy1MWwNPp+JwElkqeA+d0U/6/y8P0Cf+S1tffApVtVW0E5DR1qkXL qUu5e2GYwZThxPXGrdIdXF9LE3711E+hTkN23+Nq1UavXMkO+0bHx0AeobXjV7DkRBit S/Azz51c46NNl2x0HYlUJr8I5xyxGQqnmiTQ143db1LrbS95nhMdqhILnL1uU8OmzoFZ K6gw== 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=0AQXnw93t2lwDKh5bic/I1TgdsGF0kswV/Nq4data+4=; b=PVJsc9b+hT+1NJ9JsVCnV1NDeXjYl9a6sqKHedZ9gZv3z91dDt26kIYoZUWviF/cHi 7YSQSNX8y0UD++qQ+H1LPqmWKLliXqIsMETc3kw/rqvZ+MOXX0oeHt3ZuBcqg7csvl33 jkc9DJ60lnadLOZMerauthipkz2tKwyrI74crb/R58JwiVoKt/7ls2ZRIdIz6J24gHx1 2o7LenHMXW+1jCYT3JJrovx2v7xJOMN1mASTHFtdssz9w2oyq8s0hY3gJNEmsfy1+EGL W64ROtnYoLAUojhqYfMAJUu60KLibwZ6TnBgKUVUrS/ItHbgm1VT+e1Rj5F5WN3iQDH2 TCDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=J11MyqkC; 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 2-20020a630202000000b0042971e401e3si4910280pgc.307.2022.08.16.03.50.13; Tue, 16 Aug 2022 03:50:24 -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=J11MyqkC; 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 S234693AbiHPKbm (ORCPT + 99 others); Tue, 16 Aug 2022 06:31:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234596AbiHPKbF (ORCPT ); Tue, 16 Aug 2022 06:31:05 -0400 Received: from smtp-fw-80006.amazon.com (smtp-fw-80006.amazon.com [99.78.197.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90DF52E9D0; Tue, 16 Aug 2022 01:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1660638502; x=1692174502; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0AQXnw93t2lwDKh5bic/I1TgdsGF0kswV/Nq4data+4=; b=J11MyqkC+rkT56LkT7HEylRkcXlqU8RsXzUskwj5XD+0hr4yN88V3pHB Y9bPYJaPw4iiT+9iEDoAA20TS5B6PV3eDYHJfuDuzcVXwxqcTvDLO1cOG i1C4DFYaCCSx7AGodE0JzForrPO3dtMJRyketjnCDHY7qud8RYbRQz28w g=; X-IronPort-AV: E=Sophos;i="5.93,240,1654560000"; d="scan'208";a="119634076" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-iad-1a-2d7489a4.us-east-1.amazon.com) ([10.25.36.210]) by smtp-border-fw-80006.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2022 08:28:21 +0000 Received: from EX13MTAUWA001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan2.iad.amazon.com [10.40.163.34]) by email-inbound-relay-iad-1a-2d7489a4.us-east-1.amazon.com (Postfix) with ESMTPS id 26C9A82BCF; Tue, 16 Aug 2022 08:28:17 +0000 (UTC) Received: from EX19D013UWA002.ant.amazon.com (10.13.138.210) by EX13MTAUWA001.ant.amazon.com (10.43.160.58) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Tue, 16 Aug 2022 08:27:59 +0000 Received: from EX13MTAUWA001.ant.amazon.com (10.43.160.58) by EX19D013UWA002.ant.amazon.com (10.13.138.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1118.12; Tue, 16 Aug 2022 08:27:58 +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, 16 Aug 2022 08:27:58 +0000 Received: by dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (Postfix, from userid 14301484) id 5876C4C67; Tue, 16 Aug 2022 08:27:57 +0000 (UTC) From: Eliav Farber To: , , , , , , CC: , , , , , , , , , , , , Subject: [PATCH 05/16] hwmon: (mr75203) add option to skip reset controller Date: Tue, 16 Aug 2022 08:27:46 +0000 Message-ID: <20220816082757.11990-6-farbere@amazon.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220816082757.11990-1-farbere@amazon.com> References: <20220816082757.11990-1-farbere@amazon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Adding a "reset-control-skip" bool property to the mr75203 node will avoid looking up and obtaining a reference to a reset controller. Signed-off-by: Eliav Farber --- drivers/hwmon/mr75203.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/hwmon/mr75203.c b/drivers/hwmon/mr75203.c index f89f7bb5d698..bec63b611eb4 100644 --- a/drivers/hwmon/mr75203.c +++ b/drivers/hwmon/mr75203.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -525,14 +526,19 @@ static int mr75203_probe(struct platform_device *pdev) return ret; } - pvt->rst = devm_reset_control_get_exclusive(dev, NULL); - if (IS_ERR(pvt->rst)) - return dev_err_probe(dev, PTR_ERR(pvt->rst), - "failed to get reset control\n"); + if (of_property_read_bool(dev->of_node, "reset-control-skip")) { + dev_info(dev, "skipping reset-control\n"); + } else { + pvt->rst = devm_reset_control_get_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"); + 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