Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2662317pxj; Mon, 14 Jun 2021 04:19:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJnjHqjeIzNstbiVROrGfsVtVBKRrpCZnlDXfpu++W2Qqt29FBzglwzthgQ6DLHKJlWEc/ X-Received: by 2002:a50:a447:: with SMTP id v7mr7092112edb.183.1623669590657; Mon, 14 Jun 2021 04:19:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623669590; cv=none; d=google.com; s=arc-20160816; b=uzmtAiLUBWiGjseEj5Zx8gT5/7FKWvbRW25YzDOe6vrLh0AKC5y6UJ/HAFJYjlePp8 FxkT9u5zqq8w+0W76kbeO41GKw8OBbjHlmgd/KzT8X1nNocAOV+O8qk4WCaAuWsWH1OF YmmeVhYFKIMWJYITBZ8N1cEYTRpiRbBo0vq2RgZbB6wRx1VBUe3XiuHkOmIdZg50hZhx hgX9BZcLqt/4SnX52aA1VnxXJ8pIMm/YC1Vq+1L5Tew43htf8o6A/OhLXZWJAmZYEwPd abYxq6vDfS8dgtiX7nJXIQVQnW2wSJL52wspEBlkUOJZ+wdIgfffYzFQNgKB43mNqt3N xF7A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fud0cYuqMmjtYNikgR/lRXiPToyL6Hbsb2RWGbKwP2Q=; b=MhzyPQVHsGxD4jO63Er666T6uArlR/9+KHyhQgUfcKCx54nu46+NV/lKV6zlSGXTf4 9ycIPJjqTyYMAdbwQ292r4fCbQ7ecQAoCBoeqkRRj+jWMbMYlNl5Y2JVBehGvyYae+vC HivVJAii9CrtPtWQffXVvK5Omn6FtWTuO0Lq0xdzCg8oWnimXjWReRBo4sIhQJDxASEl eooWNrKpYiiUyR0AsQgDrr4lE0B3HgGRqzAyxJdwT5kKWWjvawFIqz9/8vfa6Lm42t6l huro2yVSOGdMaJvqdez4Jwu0CU/XjP5MIDySa4qHytJQ8xNEXGNTn+JvzqA2gxtAHKc1 cbxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aiuDC5Ny; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i26si11325811edv.319.2021.06.14.04.19.27; Mon, 14 Jun 2021 04:19:50 -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=@linuxfoundation.org header.s=korg header.b=aiuDC5Ny; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235320AbhFNLRm (ORCPT + 99 others); Mon, 14 Jun 2021 07:17:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:39872 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235183AbhFNLE5 (ORCPT ); Mon, 14 Jun 2021 07:04:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6229B6191C; Mon, 14 Jun 2021 10:44:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623667487; bh=Wb0yrOsNBITxibtbVHVNRT/x69LMKfbv31E2OITjUbE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aiuDC5Ny3ijiI0a6DFd5h4QI2UV6om3/omjn7N3bc9Ug+vqaEonXBg5ShRnPHmAeT woz0tcy8s7XYhtwQk7qLOBc1X7Ist596N3Jh7C57aGn/j7YL87wR1vpeNFcvipHP4C dwFEIA6rXx2ZW7ejgKor63LWRxBk3htH4hYXPuOc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Osipenko , Mark Brown Subject: [PATCH 5.10 091/131] regulator: max77620: Use device_set_of_node_from_dev() Date: Mon, 14 Jun 2021 12:27:32 +0200 Message-Id: <20210614102656.085550356@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210614102652.964395392@linuxfoundation.org> References: <20210614102652.964395392@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Dmitry Osipenko commit 6f55c5dd1118b3076d11d9cb17f5c5f4bc3a1162 upstream. The MAX77620 driver fails to re-probe on deferred probe because driver core tries to claim resources that are already claimed by the PINCTRL device. Use device_set_of_node_from_dev() helper which marks OF node as reused, skipping erroneous execution of pinctrl_bind_pins() for the PMIC device on the re-probe. Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator") Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210523224243.13219-2-digetx@gmail.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- drivers/regulator/max77620-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/drivers/regulator/max77620-regulator.c +++ b/drivers/regulator/max77620-regulator.c @@ -814,6 +814,13 @@ static int max77620_regulator_probe(stru config.dev = dev; config.driver_data = pmic; + /* + * Set of_node_reuse flag to prevent driver core from attempting to + * claim any pinmux resources already claimed by the parent device. + * Otherwise PMIC driver will fail to re-probe. + */ + device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent); + for (id = 0; id < MAX77620_NUM_REGS; id++) { struct regulator_dev *rdev; struct regulator_desc *rdesc;