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.7 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 84C2EC433ED for ; Tue, 13 Apr 2021 14:44:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 69F156052B for ; Tue, 13 Apr 2021 14:44:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344627AbhDMOpH (ORCPT ); Tue, 13 Apr 2021 10:45:07 -0400 Received: from mail-vs1-f46.google.com ([209.85.217.46]:41733 "EHLO mail-vs1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344609AbhDMOpE (ORCPT ); Tue, 13 Apr 2021 10:45:04 -0400 Received: by mail-vs1-f46.google.com with SMTP id d6so2387981vsm.8; Tue, 13 Apr 2021 07:44:45 -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=qd2Cz9Wb7b4lwNE2TvDDaxnExO2muUrxaDPRQ6PGCSo=; b=YAyZKa2Z1GmCyHZwvOHo8eNMFtg5CKx1B0zetbkQz/WB+PjAeBXorB03dZT3JSFgmw Ra2RaqeOq57Ao/t3kqIc4QJ8M07thHLPSLXEjqR0btAwH3VSSPq4RnfPGCCMbKfKrfOs tUCAWZSLbMy8bzeScbCngw+a7p8oqjTk89CeTrQfKBvMwKjY84xhhIwFNEaMoB8gGjac UWW9/lliKBZzogl6RDDIjok/B3Hjv6b1xU0R/bWn3HhssokyRAjSVTyEnTllvO2Vi/h/ AEJW2C5RvN8KLBe7FmizaOh/GjOmcBIWMR2YJFKkVwq0bzqRQWrQI54UO8YLWjExnts0 76Cw== X-Gm-Message-State: AOAM532jT6YL4VKYxjVha3GYySdl3MgQifh6XNH1sqCPlnBAe44vBaMY 1HV1dZrATsszIzM/k8mQJvpL7iTQMSpt4y2ywWI= X-Google-Smtp-Source: ABdhPJz9v/HcQN0oGObIKVjlIReu+0YExHhoYWAtnb781H0kVeDbJjHAVuaxN8240622vbYcvLuY09Cyey/kyimRjeI= X-Received: by 2002:a67:2082:: with SMTP id g124mr9712122vsg.40.1618325084669; Tue, 13 Apr 2021 07:44:44 -0700 (PDT) MIME-Version: 1.0 References: <26db9291095c1dfd81c73b0f5f1434f9b399b1f5.1618316565.git.geert+renesas@glider.be> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 13 Apr 2021 16:44:33 +0200 Message-ID: Subject: Re: [PATCH] i2c: I2C_HISI should depend on ARCH_HISI && ACPI To: Andy Shevchenko Cc: Yicong Yang , Wei Xu , Wolfram Sang , Dmitry Osipenko , Linux I2C , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, On Tue, Apr 13, 2021 at 4:41 PM Andy Shevchenko wrote: > On Tue, Apr 13, 2021 at 02:48:15PM +0200, Geert Uytterhoeven wrote: > > On Tue, Apr 13, 2021 at 2:37 PM Andy Shevchenko > > wrote: > > > On Tue, Apr 13, 2021 at 02:26:15PM +0200, Geert Uytterhoeven wrote: > > > > The HiSilicon Kunpeng I2C controller is only present on HiSilicon > > > > Kunpeng SoCs, and its driver relies on ACPI to probe for its presence. > > > > Hence add dependencies on ARCH_HISI and ACPI, to prevent asking the user > > > > about this driver when configuring a kernel without Hisilicon platform > > > > or ACPI firmware support. > > > > > > I don't by the ACPI dependency, sorry. > > > > > > The driver is a pure platform driver that can be enumerated on ACPI enabled > > > devices, but otherwise it can be used as a platform one. > > > > Sure, you can manually instantiate a platform device with a matching > > name, and set up the "clk_rate" device property. > > But would it make sense to do that? Would anyone ever do that? > > It will narrow down the possibility to have One Kernel for as many as possible > platforms. That One Kernel needs to have CONFIG_ACPI enabled to use I2C on the HiSilicon Kunpeng. If CONFIG_ACPI is disabled, it cannot be used, as there is no other code that creates "hisi-i2c" platform devices. 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 D5E70C43460 for ; Tue, 13 Apr 2021 14:46:43 +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 64C7E61369 for ; Tue, 13 Apr 2021 14:46:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64C7E61369 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=ohuFcsKr/YBOmR7Q0yyZgvf8JOd92qH8l4AQgUTXtas=; b=EzY9gG/TVYmGEszCQtJu1uD8P gQAVtSh3qN/B4Mht5XEPAEWimuqXVcwShUs/d2jkft8hAQOu+hhetjaGg8Wny4C8eaQPkd4t5Hbz5 gJAtc0I0693GY7rnSw0SO+vmnnk02588UjYNXmAj865FnAI1Dw58D+UJngh397YfdDLHZ+RyP27La lELKswweDkzXkOiJbCfLlpdW+fVZnrPg5xrpyD++eht1pHvdHvr5fqIgUgdkYvflFDAcR13cnItZq Uas5tFRW/puL8bcGEQ7bBCsFVIuvm/v5FlCl+5ZuohqC5cjAVCn6KznjS8wamjDWiA3ZTlF/6mjP0 g2T/LAYPw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWKHd-009Y7h-0s; Tue, 13 Apr 2021 14:44:56 +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 1lWKHY-009Y75-J9 for linux-arm-kernel@desiato.infradead.org; Tue, 13 Apr 2021 14:44:48 +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=qd2Cz9Wb7b4lwNE2TvDDaxnExO2muUrxaDPRQ6PGCSo=; b=jx1WibyQiHFKaKGPw8afoYCauK ZL21rrdccPJdgr5YPSvHFXmB0CjJAc40Tw4kIRWm1fFho0I+BC2paMv2sWu+SaOOcHFmF1gfKnEPy QhJK1/G274XhFd7Qx36FnYZZ0NFBLa0xJXNFaEdZknr/eLrtalxW1O3CPPH5choLsScmemoKUABHj dKt6SMvHUixvHgt03dR7AwEFo3rLUOF5lvq57oRymdZEee8x5y99Ot8otagZp2MQCaghbBGroEzgW REY1GWtgvqXSS3mqPD9pWacU333NcIdr8nn+SMwxX4HzA+0jsYl9sxAOjZsE+SnTq28yXHA+HKiuK 7MM5G03A==; Received: from mail-vs1-f46.google.com ([209.85.217.46]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWKHW-00776M-2W for linux-arm-kernel@lists.infradead.org; Tue, 13 Apr 2021 14:44:47 +0000 Received: by mail-vs1-f46.google.com with SMTP id l11so145150vsr.10 for ; Tue, 13 Apr 2021 07:44:45 -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=qd2Cz9Wb7b4lwNE2TvDDaxnExO2muUrxaDPRQ6PGCSo=; b=RkAVGsqWUwbCs7+Hs0b4ckISBXxCpQqlxWSQG6OxEKHBFjo9z1kghSo2HYAQa9Sa72 c4toONiLDhBNNykpJpPignAJH9nO5xJUUafX2mmnBxV6AqkQtikL0RX0GePGtrAU7oDE +YftbycNjCiqJKrtptE760VzGnXzms+1i0QUXX7sfxhR54M4R2GxDFfQEpThDhuLetd9 K3dMmvPUoZs48vQ1L4rG0D8B+hK/nNZSloq/1F4jB2zcL/CKHDrMpE8ApdCoh+c/Rm2Q IiTCGRAk2iuM2hSfK6FDTbqMi7GmiDB2RLO8IaiHHfPc4iaLHj0U7XXP8T1cHJyoYhCw 6ewQ== X-Gm-Message-State: AOAM531dpMcIRHl9GW2EAZs4gmauavWtusRZ6FoRv3KxJqgASTuCWgM3 KGghuxqvDW59UNPm2pRlMbWvf3qck8T6j8gsH68= X-Google-Smtp-Source: ABdhPJz9v/HcQN0oGObIKVjlIReu+0YExHhoYWAtnb781H0kVeDbJjHAVuaxN8240622vbYcvLuY09Cyey/kyimRjeI= X-Received: by 2002:a67:2082:: with SMTP id g124mr9712122vsg.40.1618325084669; Tue, 13 Apr 2021 07:44:44 -0700 (PDT) MIME-Version: 1.0 References: <26db9291095c1dfd81c73b0f5f1434f9b399b1f5.1618316565.git.geert+renesas@glider.be> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 13 Apr 2021 16:44:33 +0200 Message-ID: Subject: Re: [PATCH] i2c: I2C_HISI should depend on ARCH_HISI && ACPI To: Andy Shevchenko Cc: Yicong Yang , Wei Xu , Wolfram Sang , Dmitry Osipenko , Linux I2C , Linux ARM , Linux Kernel Mailing List X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210413_074446_137348_3593E586 X-CRM114-Status: GOOD ( 30.19 ) 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 Tue, Apr 13, 2021 at 4:41 PM Andy Shevchenko wrote: > On Tue, Apr 13, 2021 at 02:48:15PM +0200, Geert Uytterhoeven wrote: > > On Tue, Apr 13, 2021 at 2:37 PM Andy Shevchenko > > wrote: > > > On Tue, Apr 13, 2021 at 02:26:15PM +0200, Geert Uytterhoeven wrote: > > > > The HiSilicon Kunpeng I2C controller is only present on HiSilicon > > > > Kunpeng SoCs, and its driver relies on ACPI to probe for its presence. > > > > Hence add dependencies on ARCH_HISI and ACPI, to prevent asking the user > > > > about this driver when configuring a kernel without Hisilicon platform > > > > or ACPI firmware support. > > > > > > I don't by the ACPI dependency, sorry. > > > > > > The driver is a pure platform driver that can be enumerated on ACPI enabled > > > devices, but otherwise it can be used as a platform one. > > > > Sure, you can manually instantiate a platform device with a matching > > name, and set up the "clk_rate" device property. > > But would it make sense to do that? Would anyone ever do that? > > It will narrow down the possibility to have One Kernel for as many as possible > platforms. That One Kernel needs to have CONFIG_ACPI enabled to use I2C on the HiSilicon Kunpeng. If CONFIG_ACPI is disabled, it cannot be used, as there is no other code that creates "hisi-i2c" platform devices. 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