Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2188027pxb; Mon, 20 Sep 2021 14:44:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz02Km2MhiWj2D0XZ12nzS9LMNMwTeIhPulcowrSI4QL87T8K5OchEog4pWfdyuhx89Mn3y X-Received: by 2002:a05:6e02:1a0f:: with SMTP id s15mr8504705ild.259.1632174245058; Mon, 20 Sep 2021 14:44:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632174245; cv=none; d=google.com; s=arc-20160816; b=Jxjyn0itMLxwQcXjQhr7uguqYeOY/UA8RIonvy3PCBp7qnQKI1XO94oh1cv9bV22gk /tdz+/LyFN/A0ESC9C+7JOSP+Y1haSyBEf2x9wS6YU0n1miTd2l9veFWWRz9qWiz9vlx v0CsYTtsF1B3dNx3MkBYFeRyt671Zmxn/w2xY9rSonI3YlBpRtt8AFJxtGMlajVwK2Gv 2P0sYWRZmZ/osuA+hJGepjKblEL6K2wla1zrwPu7FA3zqMDjFM1ROPn30u+GlMwOOwFR zDJFnH4PDw3ZuTes+KxFGXaPAxkGLS3ERPXe+Ip/XDUUYueZo/tIgyuBhJM47n9Uqmdc zJWw== 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=aD0ZimcpDdMwxxDkok8INnwAF4L8JkxKG7hlNjJNuc4=; b=SgSW6kYRhzw7Bdg1RrxIHEzHqbwzqTss0YQcFTVGqEY9FdQEW81JyAenMeyF0O26Gw kBvoZqY/YdMvvQdHdQ1Bym1WOucLGwg6MdCZg7OG7W0gNqdRAbVs9q/Yv5bkvQgUfjC7 IO1x5rPXA9I0j/bC1wsYwrDijmEbNU8ZUvCMFAb3fHguN45J9vwGsrhKiH/KNzPXg8iz IoUlnp3K8JGuLLth+ZA5OcDv39kfWRz2fk1McATAXmWeLJuiTIkfi4wcfD+W8dEsnpF1 7X0L3f3In2WYjyZHvYgnriux7TAuBt+l5YGyfaav5CZP5OKlnpviuBzy6H7ilGFT+kIS NCEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf-com.20210112.gappssmtp.com header.s=20210112 header.b=ROkKUP5W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si12921864ilr.112.2021.09.20.14.43.53; Mon, 20 Sep 2021 14:44:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@semihalf-com.20210112.gappssmtp.com header.s=20210112 header.b=ROkKUP5W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238540AbhITMnm (ORCPT + 99 others); Mon, 20 Sep 2021 08:43:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234162AbhITMnk (ORCPT ); Mon, 20 Sep 2021 08:43:40 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD827C061764 for ; Mon, 20 Sep 2021 05:42:12 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id m3so65009639lfu.2 for ; Mon, 20 Sep 2021 05:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aD0ZimcpDdMwxxDkok8INnwAF4L8JkxKG7hlNjJNuc4=; b=ROkKUP5Wti0ZceJVkqlAW1hw9pw2rtGO+UYdzPbSZg0ZsAEcFmWUy5DNCnc2MIrx4b BYp0RUGvkHwf934xqPgpQ6UUwcdgw6xDoe22pz4EAJzNIkulRo31v++TUs9ymGhu5K5u tFmeYg86tBZ7B0TP8fKKkgwBNWF29JNbAnbvAilubZMvvjqh33+omk3tgv1z+6L1bSvw FCli+M02Sz/IhIHZXabClzluGQtQlRj9xfOIJWpPK6WGTy5EPC3C9NjyvqDaeSeKSJCU Vakycw1Ed8PiorDWqI1+IUXUUnKX7kJZHW55ViIYHRIy6ZFT8OOia60WSN3/sQxWirf6 jpSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aD0ZimcpDdMwxxDkok8INnwAF4L8JkxKG7hlNjJNuc4=; b=hU65grR3g0NhMJ//mTOqtARwiFDs6YMkHVGMm5GtRQcGXNIcj0h8xVvmdlvVQ/Y99j J6E0U7JxwqtFKrQsVRWyTgwDwV0LG/BYSY0JhmW+SXSj/dt3oqHOR3YOVptOC76SZwW4 5IQN51BgYJzXjgqTymIPwMaSsl6wJJ/OgMzkwB9CcZX8ACbBW290mho8oGS/VbjaMSgl fchlQ+a5kFXTRt2siOkyKUk0MM5IEb3tezpHgIHkKE+I4mPZr7Sn9T2gxqmBU1ehc+Ux Kqc0pyFhalEX9eqG/HzcCy2Ib+7b8ThHpQl10O7sClUsGzF2HojhnR0gapn/bwLvfL+M 21aQ== X-Gm-Message-State: AOAM530R7bm86RKwJ7XOIWNI8E6negdtorJ00mZjnSXwW2rQ7NqQixpc raPZVHuAnKHqbtDOfmDD9WZElA== X-Received: by 2002:a2e:9a07:: with SMTP id o7mr6991825lji.125.1632141730817; Mon, 20 Sep 2021 05:42:10 -0700 (PDT) Received: from grasshopper.googchameleon.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id v1sm630944lfo.308.2021.09.20.05.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Sep 2021 05:42:10 -0700 (PDT) From: =?UTF-8?q?Pawe=C5=82=20Anikiel?= To: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org, arnd@arndb.de, olof@lixom.net, soc@kernel.org, dinguyen@kernel.org, p.zabel@pengutronix.de Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tn@semihalf.com, ka@semihalf.com, jam@semihalf.com, =?UTF-8?q?Pawe=C5=82=20Anikiel?= Subject: [PATCH 3/3] reset: socfpga: add empty driver allowing consumers to probe Date: Mon, 20 Sep 2021 14:41:41 +0200 Message-Id: <20210920124141.1166544-4-pan@semihalf.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210920124141.1166544-1-pan@semihalf.com> References: <20210920124141.1166544-1-pan@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The early reset driver doesn't ever probe, which causes consuming devices to be unable to probe. Add an empty driver to set this device as available, allowing consumers to probe. Signed-off-by: Paweł Anikiel --- drivers/reset/reset-socfpga.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index 2a72f861f798..8c6492e5693c 100644 --- a/drivers/reset/reset-socfpga.c +++ b/drivers/reset/reset-socfpga.c @@ -92,3 +92,29 @@ void __init socfpga_reset_init(void) for_each_matching_node(np, socfpga_early_reset_dt_ids) a10_reset_init(np); } + +/* + * The early driver is problematic, because it doesn't register + * itself as a driver. This causes certain device links to prevent + * consumer devices from probing. The hacky solution is to register + * an empty driver, whose only job is to attach itself to the reset + * manager and call probe. + */ +static const struct of_device_id socfpga_reset_dt_ids[] = { + { .compatible = "altr,rst-mgr", }, + { /* sentinel */ }, +}; + +static int reset_simple_probe(struct platform_device *pdev) +{ + return 0; +} + +static struct platform_driver reset_socfpga_driver = { + .probe = reset_simple_probe, + .driver = { + .name = "socfpga-reset", + .of_match_table = socfpga_reset_dt_ids, + }, +}; +builtin_platform_driver(reset_socfpga_driver); -- 2.25.1