Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1017351ybl; Fri, 24 Jan 2020 13:54:15 -0800 (PST) X-Google-Smtp-Source: APXvYqwJ7P0ltk3UmeR1SsNQp0+Qaa4gNLWP/TuuMXFHK4eTJ8az40iQHBnv7ua/Uq9C+hBkQUFY X-Received: by 2002:a05:6808:3c2:: with SMTP id o2mr642186oie.145.1579902855464; Fri, 24 Jan 2020 13:54:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579902855; cv=none; d=google.com; s=arc-20160816; b=wwz5onGs+bmDfTMZAjn3IYfBH9N+/H0NAy84n+EwpPHNYhz7Y2IPHtdA5qWpdgP9/q fiJNGa9o+oTg/K3kQtDB1gXFo+hVUGKt8IHKl3Vz3YdlU7FWfSomPtBzC3A+o3crE5Dm ZrKl6dPU0srFScs/URRTByd4MkpXE1JQqJCWiERKVCoTWqUSoC8HB9SdoR7n5HP1oYQU E6Rzs9U2V4DI4j+c/4Dpn+V22LAfzQ9xMnhC+BnKbpogSCs3ythjZ/dgvS1lVVU4fYhs AYY8xytNawiEyLlTFqImCHVv01NBgOkiVTqauJQAUveFk669MBRdxvt96+meClnYORcq ftfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=EwPE2uTviQEjsE1utp28wLeHm+u6Nm1mopOXiGOBzew=; b=mzVG7AoJItLmI/Nj+Kyzd0lqaNYqRtb4K82FDEQbLvhKHYfnt4VWycGquL9CQnBF0N wlBTv7Z96lYUnCZTsVu9LriD6f5azb0QlFXN3NzlZV5hDFTTNcDuPcUYv6vxMN/7uQY8 MjGy+bMpzzc4ef6dHnllzspD6Bvg8QF8JpNFhtA0MEFHXP9LBVAUc53ghhYlaVRvKoW7 Y5twAkqnuYeAR2TEvXM2VoQLY+dxPlScj7Jcb6zs9Sk7vBW7WNESurpamK1os1QH1rxT fAIJFzgBXNPLZdilBq6qx0Glq0Fy+ntXxcYUHIibKipFYMOU4/Co+RfVWk4T8Hdb9ra5 WLNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hdSRR6y3; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6si2390464ote.72.2020.01.24.13.54.02; Fri, 24 Jan 2020 13:54:15 -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; dkim=pass header.i=@chromium.org header.s=google header.b=hdSRR6y3; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726761AbgAXVxG (ORCPT + 99 others); Fri, 24 Jan 2020 16:53:06 -0500 Received: from mail-qv1-f65.google.com ([209.85.219.65]:40890 "EHLO mail-qv1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725821AbgAXVxG (ORCPT ); Fri, 24 Jan 2020 16:53:06 -0500 Received: by mail-qv1-f65.google.com with SMTP id dp13so1661587qvb.7 for ; Fri, 24 Jan 2020 13:53:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EwPE2uTviQEjsE1utp28wLeHm+u6Nm1mopOXiGOBzew=; b=hdSRR6y3yyYN5tacXi+RUq0t2z4YfE1ePsXUhGNpUWKTMDRZTr0wsZPXDXhVSa8tA3 CAW1ZeaBTTIg/bnTiHLkBV0tSmf2R9eAHjlHSvTCE3u0S4VczhZas42sBXaqKOA0K1WF OzJBeZRPvezT+6eL4IyyN1n8kytHgbLrRA+jk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EwPE2uTviQEjsE1utp28wLeHm+u6Nm1mopOXiGOBzew=; b=Jr6OJUhOtNHr58K7yfEBwD2Mzyeh4vioYlWiUpOCR38M3Q9B9r1f45H28bSCWNloPi dtehB8G1te2bFTj4O8xt3N+A2lg9Klkl3paihFWZF1+y+Dv/o1SQ0KcTl5pkrBeXj7+R Ud5fTp+PlpqeTwBQKcgRduCXZVazRkPyMlyvqEWU4a3+p4I9ZsSX4Hk9kq4wnbOFXoHJ Oy92DDb1lu/qK8A4uxHvJtIrfKrWuyhWcgnTASqV1+oXaA+++s42fSDbOy+qC4YOr2xx g9sFHa/LNb0o+0W0s2TtEuKDnY128v3oMQcpNmGo1Sh6nGW7rVv/ehoqL05J/gUKHjcx OPug== X-Gm-Message-State: APjAAAXjDy95+GxhzjkmG0FPsuHC79uc9CTdAkRypnlSXpNrbKrcfh+I vg+6TIXoLPumn9GpwKQQ+hH8w1kGe1zUUQWQPiTMzg== X-Received: by 2002:a05:6214:bc6:: with SMTP id ff6mr5098954qvb.133.1579902784863; Fri, 24 Jan 2020 13:53:04 -0800 (PST) MIME-Version: 1.0 References: <20200117002820.56872-1-pmalani@chromium.org> <75dc83a6-c183-6808-c668-d31a71a31682@collabora.com> In-Reply-To: <75dc83a6-c183-6808-c668-d31a71a31682@collabora.com> From: Prashant Malani Date: Fri, 24 Jan 2020 13:52:54 -0800 Message-ID: Subject: Re: [PATCH v7 1/3] platform: chrome: Add cros-usbpd-notify driver To: Enric Balletbo i Serra Cc: Guenter Roeck , Benson Leung , Lee Jones , sre@kernel.org, Linux Kernel Mailing List , linux-pm@vger.kernel.org, Jon Flatley , Gwendal Grignou Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Enric (removed lot of the context text to keep the message length small) > > So, in summary, my proposed additions to the edits you suggested are: > > - Remove IS_ENABLED(CONFIG_OF)... checks from > > cros_usbpd_notify_probe_plat() and cros_usbpd_notify_remove_plat() > > - Change check in cros_ec_dev to be: > > if (IS_ENABLED(CONFIG_OF) && ec->ec_dev->dev->of_node) > > > > WDYT? Could you kindly try this on your kevin configuration? I've > > tried it for the cases "CONFIG_OF && !CONFIG_ACPI" and "!CONFIG_OF && > > CONFIG_ACPI" but not the third one (CONFIG_OF && CONFIG_ACPI) since I > > don't have an environment to test with (I can confirm it builds). > > > > Thanks as always for helping iterate on this. > > > > > > Let's continue talking with a new version. Could you send another one and I can > check. I have now setup both systems one with ACPi and another one with OF. Sounds good. Will push a new version. Thanks. > > Thanks, > Enric > > > >> if (cros_ec_check_features(ec, EC_FEATURE_USB_PD)) { > >> retval = mfd_add_hotplug_devices(ec->dev, > >> cros_usbpd_notify_cells, > >> > >> > >>> diff --git a/include/linux/platform_data/cros_usbpd_notify.h b/include/linux/platform_data/cros_usbpd_notify.h > >>> new file mode 100644 > >>> index 0000000000000..4f2791722b6d3 > >>> --- /dev/null > >>> +++ b/include/linux/platform_data/cros_usbpd_notify.h > >>> @@ -0,0 +1,17 @@ > >>> +// SPDX-License-Identifier: GPL-2.0-only > >>> +/* > >>> + * ChromeOS EC Power Delivery Notifier Driver > >>> + * > >>> + * Copyright 2020 Google LLC > >>> + */ > >>> + > >>> +#ifndef __LINUX_PLATFORM_DATA_CROS_USBPD_NOTIFY_H > >>> +#define __LINUX_PLATFORM_DATA_CROS_USBPD_NOTIFY_H > >>> + > >>> +#include > >>> + > >>> +int cros_usbpd_register_notify(struct notifier_block *nb); > >>> + > >>> +void cros_usbpd_unregister_notify(struct notifier_block *nb); > >>> + > >>> +#endif /* __LINUX_PLATFORM_DATA_CROS_USBPD_NOTIFY_H */ > >>> > >> > >> Cheers, > >> Enric