Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2590870pxb; Mon, 19 Apr 2021 09:05:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzYidvt+97Gk1tJuzvwFSylxrmf41aaB3v+/6zuynYqDw8xekNJiJT87KGiIX7N8mwxaR+ X-Received: by 2002:a05:6402:1255:: with SMTP id l21mr25571284edw.362.1618848338106; Mon, 19 Apr 2021 09:05:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618848338; cv=none; d=google.com; s=arc-20160816; b=Zf2YCn8X9flz7vyegto4gPVH1hYzKJX9osr7lMAusyJqBylnBWoq/xLdHl5swN4jS7 x21zdZukwm425f929N14v0bSJUpY+Rm/yeYPJKGcMWIRmVgfiRfKJb+Zm/pVt90oH0Lo NSf4TjIfc2aiPfZYWSEOBcrboG8eOhpwfE8/ogFtSqveE2ADOpf5hSSZbx1iUQgY44n+ 3f/ET3ueBcV+6lVQ3gc5W/Zbk2vox+F+hQhjSf6koMf0YKm7eU37icv8a2Ym3LoBpWce DZ66Xe2vvFAJvv8cGBTmJcAjetiN8jgmGsinm+3r2h2+68zUAat5VKLraAMmIWLrpmBD 6DRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=4XD1Wb8dpQwS+PQagRswL/AWeEvkF0Vvl4DeCDMx5XI=; b=GP9/8EltIkpCQ6v69DEmwcmYqGN2+D9+9UUNaOTiKSbrM+yGxa7jm2sSZ6Km7Fr9wH oy83BrRjyXI1OWleE1xQuiuq2M71PQC9wVbyylt0zZzaugLSvA2Tpy+YzoLs82m9+S5B j5mPMX6eG2w5pdUS78pWrjnGMEGXAP+NuFqjZ4C+YFabrBZORK2PAdUG7OL6Vzte4jKy 8t5gkyBq66ajDPLI0CegEaQtABfnoEg2LaGhNULPdgeVOhTaJzislvafxdxDhe8/xBLq yh7mhK+jbV8MaWkjXobHN8VWr/1/I/dbHXyLHGG/BWcCjtlz+qCkj+fH4JyF6yIK7VFI Z5nA== ARC-Authentication-Results: i=1; mx.google.com; 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 mp39si11992588ejc.182.2021.04.19.09.05.14; Mon, 19 Apr 2021 09:05:38 -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; 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 S237827AbhDSOQU (ORCPT + 99 others); Mon, 19 Apr 2021 10:16:20 -0400 Received: from mail-vk1-f176.google.com ([209.85.221.176]:42970 "EHLO mail-vk1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238920AbhDSOQS (ORCPT ); Mon, 19 Apr 2021 10:16:18 -0400 Received: by mail-vk1-f176.google.com with SMTP id k128so4073069vke.9; Mon, 19 Apr 2021 07:15:48 -0700 (PDT) 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=4XD1Wb8dpQwS+PQagRswL/AWeEvkF0Vvl4DeCDMx5XI=; b=sEGIPm/Ik/FnMzDdieye25ginwtCLv+MAaQLoboPnm0ipRxuy9FscwMZ84AxAMuuYb uuUhtSZFy3cpjcMxLEfFyV00gjzO2LSrv5c7eRKEUOSvanHknnrEi+67wmrXDGHVzWDn GgaxLA+TgjEV/zG+Xpje4wOAmZbvHBgFREBz841MzglY5AqeWS22MFozGfTA8S9Pqfka 4bZEAJw+u1aKbuWGo2MDBQJrN2EP3g7cmUtkqoo6iHYgMPspfd5JOd6RA6Bn+OLRfuTD NXKBaye1U+RnawhphHTgQBVqTfTJRnvymfgxbNL2ds8L5FfBZgYXMaqNXNkrIXJouSY7 qd6Q== X-Gm-Message-State: AOAM530vNyXWB6v6deyQr6meizNS8mS1KFCqF63mG+oNpQsR7ABAU0lk Gwy8xTeXPpYbk6nLxhf8VUpHLOhB/lmbutyNVEliO7va5jP1Ng== X-Received: by 2002:a1f:23d0:: with SMTP id j199mr765194vkj.1.1618841747956; Mon, 19 Apr 2021 07:15:47 -0700 (PDT) MIME-Version: 1.0 References: <26db9291095c1dfd81c73b0f5f1434f9b399b1f5.1618316565.git.geert+renesas@glider.be> In-Reply-To: From: Geert Uytterhoeven Date: Mon, 19 Apr 2021 16:15:36 +0200 Message-ID: Subject: Re: [PATCH] i2c: I2C_HISI should depend on ARCH_HISI && ACPI To: Andy Shevchenko Cc: Masahiro Yamada , Andy Shevchenko , Yicong Yang , Wei Xu , Wolfram Sang , Dmitry Osipenko , Linux I2C , Linux ARM , Linux Kernel Mailing List , Linuxarm Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, On Mon, Apr 19, 2021 at 3:58 PM Andy Shevchenko wrote: > On Mon, Apr 19, 2021 at 4:54 PM Geert Uytterhoeven wrote: > > On Mon, Apr 19, 2021 at 3:35 PM Andy Shevchenko > > wrote: > > > On Mon, Apr 19, 2021 at 4:02 PM Geert Uytterhoeven wrote: > > > > On Thu, Apr 15, 2021 at 10:50 AM Andy Shevchenko > > > > wrote: > > > > > On Thu, Apr 15, 2021 at 3:43 AM Geert Uytterhoeven wrote: > > > > > > On Wed, Apr 14, 2021 at 9:14 PM Andy Shevchenko > > > > > > wrote: > > > > > > > On Wed, Apr 14, 2021 at 08:55:21PM +0200, Geert Uytterhoeven wrote: > > > > > > > > On Wed, Apr 14, 2021 at 8:18 PM Andy Shevchenko > > > > > > > > wrote: > > > > > > > > > On Wed, Apr 14, 2021 at 08:06:18PM +0200, Geert Uytterhoeven wrote: > > > > > > > > > > On Wed, Apr 14, 2021 at 11:24 AM Yicong Yang wrote: > > > > > > ... > > > > > > > > > > > > > I guess it's still fine to add a dependency on ACPI? > > > > > > > > > > > > > > > > > > But why? > > > > > > > > > > > > > > > > Please tell me how/when the driver is used when CONFIG_ACPI=n. > > > > > > > > > > > > > > I'm not using it at all. Ask the author :-) > > > > > > > > > > > > > > But if we follow your logic, then we need to mark all the _platform_ drivers > > > > > > > for x86 world as ACPI dependent? This sounds ugly. > > > > > > > > > > > > Do all other x86 platform drivers have (1) an .acpi_match_table[] and > > > > > > (2) no other way of instantiating their devices? > > > > > > The first driver from the top of my memory I looked at is rtc-cmos: > > > > > > it has no .acpi_match_table[], and the rtc-cmos device is instantiated > > > > > > from arch/x86/kernel/rtc.c. > > > > > > > > > > > > For drivers with only an .of_match_table(), and no legacy users > > > > > > instantiating platform devices, we do have dependencies on OF. > > > > > > > > > > This is not true. Entire IIO subsystem is an example. > > > > > > > > Do you care to elaborate? > > > > Three quarters of the IIO drivers are I2C and SPI drivers, and thus not > > > > subject to the above. > > > > > > It seems I missed that you are talking about platform device drivers. > > > > OK. > > > > > In any case it's not true. We have the platform drivers w/o legacy > > > users that are not dependent on OF. > > > > Example? ;-) > > i2c-owl.c I2C_OWL depends on ARCH_ACTIONS || COMPILE_TEST (arm32) ARCH_ACTIONS depends on ARCH_MULTI_V7 depends on ARCH_MULTIPLATFORM ARCH_MULTIPLATFORM selects USE_OF USE_OF selects OF ARCH_MULTI_V7 selects ARCH_MULTI_V6_V7 (arm64) ARM64 selects OF so we do have a dependency on OF, unless we're compile-testing. > > > They may _indirectly_ be dependent, but this is fine as I stated above > > > when suggested to move ACPI dependency on ARCH_xxx level. > > > > As per the response from the driver maintainer > > https://lore.kernel.org/linux-arm-kernel/bd8db435-24e1-5ab3-6b35-1d4d8a292a7e@hisilicon.com/, > > there is no dependency on ARCH_HISI, so moving the ACPI dependency > > up won't help. > > So, an ACPI dependency is simply not applicable here as it's a compile > dependency as well, which is not a limitation for this driver. Again, > talk to Masahiro how to handle this, but I don't see any good > justification to have ACPI (compile time) dependency here. So, again > NAK! Please tell me how this driver will be probed when CONFIG_ACPI is disabled (it cannot, as nothing instantiates platform devices of the right type, so there is no reason to bother the user with a question about this driver when configuring his kernel). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds