Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2389044iof; Wed, 8 Jun 2022 04:03:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXXTKomJdJKUAegDMuwUhleg4DeiWvCw2TQxCGyhOMQ8nSG/DueGqk5GL0PAw4JkrhqeeO X-Received: by 2002:a17:90a:4414:b0:1df:9b8f:c3cc with SMTP id s20-20020a17090a441400b001df9b8fc3ccmr71753855pjg.56.1654686232364; Wed, 08 Jun 2022 04:03:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654686232; cv=none; d=google.com; s=arc-20160816; b=kL5q+ox9u0ur1qpzQkr6IwM9rA4UYFbX2v4OmBKZ/eHqTSBsQWHDawMynkqe/z5868 A7o0GgM2BhTm5coqhO69ZMRFBH1apf9G6LTkKOV/njwgje4GEnFXasXQPK5H/8tITMMl ZblbpSiAXkOIM2NICAVzYyPNG4cw9PSjqiWD3nNSq4JNWohL0z8E/VmC7IWFzBqJjG7j 1DHH4KTJsYhTJzm0BoGz0UX+s1iUYDb0RS8A632obPPbMEPC3iNMFATnOmCebOZIvZl8 MDP8hSC/jNsIl0gMKK3JbYu8SXVp0mNFhzcWDQhIIv/mQE8t4NH0KOG/bEYaKvArRs0+ GGMQ== 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; bh=Q6TDWnQ3WlKgaDcvR/9PbcG+Ae05BFlnttsfDGYq8fA=; b=JIxUSqMVOJPC6Mr/4ZpYbnESj2I0K9M+31cmQ7JxwvpA9hERmAD5TF7Lt6/wxVLFft X5n7Bao6lS+eInzSSPpAi6mtB/wRIKhapjRkmiCB7eaD++u5HHXUozJKIwVfoWOGoPuF b50nFskX859A+vU8SfdEer5qj/qxz/X6cWAHOIUh3UERcbiqrtfnyZkdgSXJ1+2WXrN0 CtCsbZQ/3fBoWx9swOSUDFA1rTbJNMeMLQt9dNfhmhF+h0iE7eamXo246QWHsmsOFE98 NE4zBgiAyh0jodzfWh1eSHuRl1W5afP/mrElQYIwzAmhqrrUkygVVNZeLqh9VmU9kUF9 pHag== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s6-20020a63ff46000000b0039cef73106esi28736503pgk.511.2022.06.08.04.03.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 04:03:52 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 992C82C1AFE; Wed, 8 Jun 2022 03:28:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236473AbiFHK0C (ORCPT + 99 others); Wed, 8 Jun 2022 06:26:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236724AbiFHKXC (ORCPT ); Wed, 8 Jun 2022 06:23:02 -0400 Received: from maillog.nuvoton.com (maillog.nuvoton.com [202.39.227.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8821F1F5E1C; Wed, 8 Jun 2022 03:12:10 -0700 (PDT) Received: from NTHCCAS01.nuvoton.com (NTHCCAS01.nuvoton.com [10.1.8.28]) by maillog.nuvoton.com (Postfix) with ESMTP id 67FF31C811B5; Wed, 8 Jun 2022 17:56:35 +0800 (CST) Received: from NTHCCAS02.nuvoton.com (10.1.9.121) by NTHCCAS01.nuvoton.com (10.1.8.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Wed, 8 Jun 2022 17:56:35 +0800 Received: from NTHCCAS01.nuvoton.com (10.1.8.28) by NTHCCAS02.nuvoton.com (10.1.9.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 8 Jun 2022 17:56:35 +0800 Received: from taln60.nuvoton.com (10.191.1.180) by NTHCCAS01.nuvoton.com (10.1.12.25) with Microsoft SMTP Server id 15.1.2375.7 via Frontend Transport; Wed, 8 Jun 2022 17:56:34 +0800 Received: by taln60.nuvoton.com (Postfix, from userid 10070) id 6747363A1D; Wed, 8 Jun 2022 12:56:33 +0300 (IDT) From: Tomer Maimon To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , Tomer Maimon Subject: [PATCH v2 11/20] reset: npcm: using syscon instead of device data Date: Wed, 8 Jun 2022 12:56:14 +0300 Message-ID: <20220608095623.22327-12-tmaimon77@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220608095623.22327-1-tmaimon77@gmail.com> References: <20220608095623.22327-1-tmaimon77@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,SPOOFED_FREEMAIL_NO_RDNS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Using syscon device tree property instead of device data to handle the NPCM general control registers. Signed-off-by: Tomer Maimon --- drivers/reset/reset-npcm.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/reset/reset-npcm.c b/drivers/reset/reset-npcm.c index 2ea4d3136e15..312c3b594b8f 100644 --- a/drivers/reset/reset-npcm.c +++ b/drivers/reset/reset-npcm.c @@ -138,8 +138,7 @@ static int npcm_reset_xlate(struct reset_controller_dev *rcdev, } static const struct of_device_id npcm_rc_match[] = { - { .compatible = "nuvoton,npcm750-reset", - .data = (void *)"nuvoton,npcm750-gcr" }, + { .compatible = "nuvoton,npcm750-reset"}, { } }; @@ -155,14 +154,10 @@ static int npcm_usb_reset(struct platform_device *pdev, struct npcm_rc_data *rc) u32 ipsrst1_bits = 0; u32 ipsrst2_bits = NPCM_IPSRST2_USB_HOST; u32 ipsrst3_bits = 0; - const char *gcr_dt; - gcr_dt = (const char *) - of_match_device(dev->driver->of_match_table, dev)->data; - - gcr_regmap = syscon_regmap_lookup_by_compatible(gcr_dt); + gcr_regmap = syscon_regmap_lookup_by_phandle(dev->of_node, "nuvoton,sysgcr"); if (IS_ERR(gcr_regmap)) { - dev_err(&pdev->dev, "Failed to find %s\n", gcr_dt); + dev_err(&pdev->dev, "Failed to find gcr syscon"); return PTR_ERR(gcr_regmap); } -- 2.33.0