From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 129BCC433ED for ; Mon, 19 Apr 2021 14:15:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D51C261090 for ; Mon, 19 Apr 2021 14:15:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237903AbhDSOQW (ORCPT ); Mon, 19 Apr 2021 10:16:22 -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-Google-Smtp-Source: ABdhPJylXxYZJhX8T8J4/m+2EJWscrXceKyzIOBqISvpun0wKo2rXOgi8FHjDP4pEoiG7MFShISPtJ9kUHOR7VdN/RM= 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1DE2C433B4 for ; Mon, 19 Apr 2021 14:17:22 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0D55761090 for ; Mon, 19 Apr 2021 14:17:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D55761090 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=027G48EI4++2JfebnqLsTOBT8PgDCb7xScj8AHgKG2A=; b=AxZLd1C/zFtNJj7rip0lHD5dd FDl4RmjmR9PBJfLKMgOkZOMxoT4y7rhLiZxnn+aAfyRDzGKo+IzPYA69dLMr2fWYcEuMT+mJCcjf1 shuNj5z0CRhMTx4wG2ZVUKfp+MxaPKbAa3KKJtopYYZYBnlBL+cRr+TumnZd7lasyin1AjJDv//+W 2FkriZ6AbB7EjDMpnwlAISDFXTynMNkQJMqsD/S2PBCrBkG8Lab74hLA8NyCKuo7dU+4O08fDnSXn EXwqdZf2uNVYmAVDu2hIX6Dy70lJRQJPOVJxH/YIfoH6abfP64FTnqGl/Kdct4X9Ic7ykNrttkv+L 19gchgmrg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYUgv-00A4CO-Rl; Mon, 19 Apr 2021 14:15:58 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYUgs-00A4C5-Rk for linux-arm-kernel@desiato.infradead.org; Mon, 19 Apr 2021 14:15:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=4XD1Wb8dpQwS+PQagRswL/AWeEvkF0Vvl4DeCDMx5XI=; b=39A8JLdgXvfoQN8k+CyEo6LMRQ HM+AEEAMW8xx5OvmxjHhCyys1bBXocoIGZd5S4JCAGePb4ux6Gxj0L8RZnlR3aeqvG3TtUgK7Zo83 SEzYHIQVa9n9B/naYgSXKZFw/uvFLnzFKWNzQ9BQ7Mnl1beYBHrEQUumNHeidLH6Dyvf2u1FduDui OAtKKxSy1ifG7isgC/Ianuiow6hrivC+EwrPFtdayL92AekMR8DGrjHqGmw7qoY6f/8EzAQI7echn XnfvxNZUqrbvVRytaurVQwoOyJM1YRzTzcEW4RK9vxyalmkfwmXr/9kdu2uN8CtNUoCL0ZJQGw5BI H+ZLloSA==; Received: from mail-vk1-f170.google.com ([209.85.221.170]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYUgn-00BRPf-2y for linux-arm-kernel@lists.infradead.org; Mon, 19 Apr 2021 14:15:53 +0000 Received: by mail-vk1-f170.google.com with SMTP id f7so587125vkp.2 for ; 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=DV5T4u0GNH7MTS3Mc/EmgkRS5vU17N775C1OGVPfz8SZ06P9UmDDWd/bIVjbHMhLW+ 19KqXV/HJ5H+P3iPkuYtnguMyeU1cagqKH56gOlzZTS+FEkl3zBM0HYnpP6C8STailzz YQ/gPjuKLbmO9ww4fRIUNbUuTkxz4P0hPVWnllrc0ZOTF4KrNDt2PItMCXIkUnRyKj6I 1Yg2AlQ+CJ54B9Yk50tFOMurLaV9J/3sjWyOsLsi0unlA+L8J50CGzBK6kcW9At7Q98T e+I4Axhp3XXZvrFZJm79j3fSLqqs037E3QYi7T6U+M3gck+B1zIq2RTnJVYqXhNWtYrJ e7fQ== X-Gm-Message-State: AOAM530GLX4jVCvEwOLICgrHcKFovuBeyWPNSI/r+meXb6wKQ4jo177e 02yk6C/jmV65H2cFXlDHxTZT+QrBQXyaDfz9md4= X-Google-Smtp-Source: ABdhPJylXxYZJhX8T8J4/m+2EJWscrXceKyzIOBqISvpun0wKo2rXOgi8FHjDP4pEoiG7MFShISPtJ9kUHOR7VdN/RM= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210419_071549_150863_CA2FAEC3 X-CRM114-Status: GOOD ( 47.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel