Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4689897ybl; Mon, 13 Jan 2020 18:45:07 -0800 (PST) X-Google-Smtp-Source: APXvYqyO+tbH2twjsVmiUgFlyJBBoQ5ITmiOkwWLrsoQI4CRLNSGho5bfT07+BAv/Co8CZcap0Zt X-Received: by 2002:a05:6830:1607:: with SMTP id g7mr15467028otr.320.1578969907901; Mon, 13 Jan 2020 18:45:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578969907; cv=none; d=google.com; s=arc-20160816; b=BYi2R8aNV0QB0w4YodBHGje1LprsFgJH/C6gt656q/KzUX+qAEdHVFVUh5GtewaBL4 VXF5/H47x8R4cwfTaFHpyONObpzP300fdgEudZMcYTIt2tfRl10xWFAI+PSpFH/OqeVh PmzbD2bTrrrPyo47bY2tlOIYTwvL+P3tvW70+iTX8gOl/wRpCEVUtXGIs1DemIjaopGm mZt4YZGAUy0bWG7No1cc2qyZdY8JvCF6ogRZbOUWascfvUcgmODLNGnQsM6qgK3BckQo TapvNP/Co/8MOjAs6ZDGDABHt7CdnzMpDtGZPtGNlzWERdZ95Ac0fTyRSF0Q6UC0Rcv5 xlkg== 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=PQsUXhIb0stSpaIAXM/Rz7YomnESLO0a6sqlm0fG6t8=; b=lIe8s0Fe6SW4KgYuiLLXobMdiFbRipaAHufyssVOVIpIF+yIklIJEH1/Zgs2tbSRVe izLEJzDqGiXq7JhhE+mchRDG8tpWMt0JhSmcEYmZswzJtF+VtIf+uYr0kMfPaydnTP4u 9yGrFa9ZL1k8GD24FEBaKrllaDVmX0QYlEvcXVcTUzS5JauccoXAhM9d3vtsmZx9vtUj DKegMjEvMUpwBwWL4zkFR88BDcrJexMsIXijqxqFBNrGRNH6QfWGXx0PuinFg87tmmEG N5SfDZAq/L/HkzolaLy6mrkIwt1FCRjo74y9UDUYzsA7w7lg64elCdmT+UFQOUM5XrSL qAuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Vn8ng5GV; 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 k15si6767476oij.134.2020.01.13.18.44.56; Mon, 13 Jan 2020 18:45:07 -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=Vn8ng5GV; 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 S1729398AbgANCmz (ORCPT + 99 others); Mon, 13 Jan 2020 21:42:55 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:46671 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729040AbgANCmz (ORCPT ); Mon, 13 Jan 2020 21:42:55 -0500 Received: by mail-qk1-f196.google.com with SMTP id r14so10765147qke.13 for ; Mon, 13 Jan 2020 18:42:54 -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=PQsUXhIb0stSpaIAXM/Rz7YomnESLO0a6sqlm0fG6t8=; b=Vn8ng5GVdXoUi3xPP32UGXxb/Wbz1HzYSU+Gkhe8zgtAhU2Dg/Vw+7TUp/9LBKGdzI YiPF2Y85Rjg0dsMu4CiFLsIbS5Dp7p6MbqcwcMc3ll6Sdgqz0QCwvauMBqkzZXrs9m9/ fMu8bqnZY4/i/V/Wd+GscJlkYRUOYDvd8CttI= 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=PQsUXhIb0stSpaIAXM/Rz7YomnESLO0a6sqlm0fG6t8=; b=K+RXNDSS1CvZE37cqOYzEJPXxF3AaSNiJlAfacdjwj4ifzQSTyFU0za5AczXnlTVXs ujNTyuJMx+ChJj71gGrIIjSBPqkuY4I598SzJiDMgIo/M68jXXDP7XVvRCp4MGg1HGHl LyK9WwuG8BG+0Rlp7zoSX6mfuscc2kPBHHYhyhO4+6qRNcEoY9MMjp74oA8dsUScJmaH L/HhRnmWNZUaLON5ZZ6jmtzWjD+C7/pevR4bmlJx25ZmSJqRC+K4pUHJIfnRAUhtnkrV WPTGFodVBXXgGiV1rClIBG7VIJjmlP24yRu3qZUJ00yiXCylBeKQ3tHSuMP40oQL0EsD /KPA== X-Gm-Message-State: APjAAAW1+Y/4qVeAPUQfzuz26AHuRD6unXDzZALajiFXD1BhkMvaNjlq 2dTnHt1JZRbYvjr4EsMRIfoAaHEjOOOuhCu6aKZnPg== X-Received: by 2002:a37:9186:: with SMTP id t128mr18398522qkd.180.1578969773907; Mon, 13 Jan 2020 18:42:53 -0800 (PST) MIME-Version: 1.0 References: <20191220193843.47182-1-pmalani@chromium.org> <9bcb4671-f421-c639-f8c8-a02f62bfc7ee@collabora.com> In-Reply-To: From: Prashant Malani Date: Mon, 13 Jan 2020 18:42:42 -0800 Message-ID: Subject: Re: [PATCH v4 1/2] platform: chrome: Add cros-usbpd-notify driver To: Enric Balletbo i Serra Cc: Guenter Roeck , Benson Leung , Lee Jones , Linux Kernel Mailing List , 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, > > Perhaps we should just make them two separate ifdef blocks, i.e #ifdef > > CONFIG_OF, and then #ifdef CONFIG_ACPI? Would be great to hear your > > recommendation here. > > > > If understand correctly what you want is on some devices (usually the ones that > use ACPI to instantiate the devices) use the notify ACPI callback, otherwise, on > devices using OF to instantiate the devices, create a notifier. The driver > should work on both cases. The problem is that CONFIG_OF and CONFIG_ACPI are not > exclusive and select one does not imply not select the other. So yes I'm fine > on have both ifdef blocks, but in the cros_ec_dev (patch 2/2) you should > register the notifier only if IS_ENABLED(CONFIG_OF) > Thanks. Will upload the updated patches soon. Best regards, > Cheers, > Enric > > > Thanks again! > >