Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3591808ybl; Mon, 27 Jan 2020 06:51:22 -0800 (PST) X-Google-Smtp-Source: APXvYqwlV7+6Ur9xpSu64Ma2qHYWWZcNmxl8m6oaB4zLFjNn3daiomA7BN0ptNhWPaRII1mI0gR7 X-Received: by 2002:a9d:4c06:: with SMTP id l6mr12434528otf.161.1580136682745; Mon, 27 Jan 2020 06:51:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580136682; cv=none; d=google.com; s=arc-20160816; b=iOEvR2o+wewxpaEqbCnQz3I/Rh4y0VU8hp5mnRLfryucWDYG9hDbmKuwF8QW3JKNNT k2oek7stNIqTfjojmx0mzafIdiCvKmYFXVa43WtA8EEyqfSGuuILgrYjYaJk7eCs5mag nPwYJGVPS/nfHMPhMKc7S9Zaxung/rYUi9Zp09Jd3VsStNn38lvuq2EerULjLUSGYA3Q 3iahChpZ7roRbEkWAxBdnblDzPbZ1UsnxbdJjSvUrIEIbst/Xmd4a7khL4L2iLLm1oGc F3BAEQmIrQGyYeF/c9O8hLc6EuRqnYShLIboMXbDYhR2ew6sL+M9AaDN2P8R+43ez9z5 SCVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=/qiDNwFBKMrJq+ZFKN7zV9VqyDeDZ4Ko3AB9Vxjt0+c=; b=BmPPQpFqdn9dc81iBbDnpuxfYF7rxEkD4bil1yYv1t/Me7AKBEOYR0/EMI7JB5yRuL pr6ef7IyKXsMNQSdezS5Dz1Z0CN7bdZHo3BqwmhF6vojntEGaZ/0JL/FypFbNuTFj1l8 5QXkF/KNaN41kTEnMKqhiGzlt0+ml56q6or6pCWy8WffTllcUMOFDHYC34nLoTeVGMsE uY7ZqyTRazujzMLlL3x6ilrouq8FamQKq88/SHnN/8diNueU8ab4jivNG3UeqMcSR3jU 0GyU9EPfIhI8U3K5GFHCgg5/GJXBhAd7/wm+I910zKdOBtPqHCiroLtgJ0Ma/5GoSbie tF1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w29si8050622oth.313.2020.01.27.06.51.09; Mon, 27 Jan 2020 06:51:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729221AbgA0OuH (ORCPT + 99 others); Mon, 27 Jan 2020 09:50:07 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:60840 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726635AbgA0OuH (ORCPT ); Mon, 27 Jan 2020 09:50:07 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 97E1C293CA5 Subject: Re: [PATCH v8 3/4] mfd: cros_ec: Check DT node for usbpd-notify add To: Prashant Malani , groeck@chromium.org, bleung@chromium.org, lee.jones@linaro.org, sre@kernel.org Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org References: <20200124231834.63628-1-pmalani@chromium.org> <20200124231834.63628-3-pmalani@chromium.org> From: Enric Balletbo i Serra Message-ID: <495e2427-7233-cb4d-0128-f6926969fb8a@collabora.com> Date: Mon, 27 Jan 2020 15:50:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20200124231834.63628-3-pmalani@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Prashant, On 25/1/20 0:18, Prashant Malani wrote: > Add a check to ensure there is indeed an EC device tree entry before > adding the cros-usbpd-notify device. This covers configs where both > CONFIG_ACPI and CONFIG_OF are defined, but the EC device is defined > using device tree and not in ACPI. > > Signed-off-by: Prashant Malani With this change, an playing with different CONFIG_ACPI + CONFIG_OF combinations I don't see anymore the problem where the driver is registered twice on CONFIG_ACPI side. So, Tested-by: Enric Balletbo i Serra Maybe it requires a fixes tag if Lee already picked the other patch? Fixes: 4602dce0361e ("mfd: cros_ec: Add cros-usbpd-notify subdevice") > --- > > Changes in v8: > - Patch first introduced in v8 of the series. > > drivers/mfd/cros_ec_dev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c > index d0c28a4c10ad0..411e80fc9a066 100644 > --- a/drivers/mfd/cros_ec_dev.c > +++ b/drivers/mfd/cros_ec_dev.c > @@ -212,7 +212,7 @@ static int ec_device_probe(struct platform_device *pdev) > * explicitly added on platforms that don't have the PD notifier ACPI > * device entry defined. > */ > - if (IS_ENABLED(CONFIG_OF)) { > + if (IS_ENABLED(CONFIG_OF) && ec->ec_dev->dev->of_node) { > if (cros_ec_check_features(ec, EC_FEATURE_USB_PD)) { > retval = mfd_add_hotplug_devices(ec->dev, > cros_usbpd_notify_cells, >