Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1439292iol; Fri, 10 Jun 2022 07:34:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnfrWklKMzADcI/p+rs2205RzR/YJWTUyc8eFYr4qM6/wWbjFkXF0l6fjUq9ryvgxKaCge X-Received: by 2002:aa7:da10:0:b0:42d:d47e:87ad with SMTP id r16-20020aa7da10000000b0042dd47e87admr53942580eds.161.1654871692807; Fri, 10 Jun 2022 07:34:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654871692; cv=none; d=google.com; s=arc-20160816; b=ln4d2jrMlrTWIDxANNvkg58aQr6XGH/Reb6yCQf+smTnMog7J5RrOzptMGtOBNeGfZ NXev4agKZbnf/0D9j0q5EshbbR0IAIgm9iWaIA68QJW0I2ZfqEbMvcpBw3a7DPgbu3+V O10CHiAqFUZn23eJluFbwH9BPu//IIDrY9u3h/wjmza256n7WKj6pZKeY+vsdBpWYcB9 iI5DVbXY/AKsGx4o9WrlXWR1mvjd4Kwbdny03s8gJYtLBVCJhW059d6eIaqSx7ToI3E6 DXA+DSMECrpDVqYwkRLLAhDDFaW9RpSVV6oTvKMNBHXg2KqL1r580eWv1Gvehl0urt46 jxCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=zHNXk/AgfFNmsI+UqDPsm2MXpI0i6kU7CMuDASj79/U=; b=k1xhc4vgpToQoMwo+w6Ju1EFN/WaKbwW57GMIONgnrguOf/R5U+pcZLM5GN6i/KwMp og/yaICEPzCnE9IH6FbpcdFed1vsoB0x1RusF02NBl5deSn4VFN8303aoNSSxioBrPiE zGCPNa4G5jiF8oaWzC4k5K8pVNB33F3V0EmKO4u+oTbPFjvYa+EANJvx35589LoBU2g+ QEoFwdOZx2R17kYmYE/+JetPnWbvTCCsq0cLDkVCGzIrwTjKSdKtnxduKVR4d5rmjmg9 LUn9qDFI+oLALj+yj8rPx0LVLU+mAtcKMLn157LFwJliqRZws2Wvmis9ZxqPKTkRrbsa gnZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nl04t7go; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn22-20020a17090794d600b007122a9d20bdsi1326536ejc.237.2022.06.10.07.34.27; Fri, 10 Jun 2022 07:34:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nl04t7go; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349447AbiFJObJ (ORCPT + 99 others); Fri, 10 Jun 2022 10:31:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348048AbiFJOax (ORCPT ); Fri, 10 Jun 2022 10:30:53 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66D1313FBCD; Fri, 10 Jun 2022 07:30:49 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id j7so24159301pjn.4; Fri, 10 Jun 2022 07:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zHNXk/AgfFNmsI+UqDPsm2MXpI0i6kU7CMuDASj79/U=; b=nl04t7gokzMU7UUQfYRfxhtSFJFKqdVyWc9KiocJWk8qg68IOFxin4gKzdOuUIpXWl g8IafnhsqvmI/MlEvV3SsE5sVILnTOT0Gz7YCUlpXWkhFg5xDSQw96knLCp6WQZe5xw/ vWvmNNpLima3oihrsa5HQYsWSXYs1Xt/iCVT1+HdHrzb7WgCZgvuBAzDb+INAP9N6bhn b3m5GSSNQDexRR+CyhEHdsktMiE0K6IqSBUhmc3a+WA7jX2SCkhDQ2B9wcSkT4DcS6Ns b+hFfSJeUyqXo/kQ6/rXGNwfIrX1wXVNrF5KzmFCerdbhGEUnk4QMTLCugWPyORr0kqj 6ThA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=zHNXk/AgfFNmsI+UqDPsm2MXpI0i6kU7CMuDASj79/U=; b=HcNIu2YOyN/ISA8LpyI0ZRaV9pJjdfxGJzdbtTxs+QAmbfr49rYHRyP8oYhkx6LyGT CLFbT2WC/QfsH+B1aPY6DrWQLfBq4wFtLovaMtteqxJPshESMdihISpXOTbYgsdcGD+T LOWjFAuGIa/JmwYtO5wBcCyfuDCK/3dJMhmgDL3nXTpH0mBLLUbaLzUwlMfODyaBqSzq P6zxvYMOkuCdFY1M1ncmfBWvLyCcUMZg6+df8wXa92YkyZgWosJ90aQrzkCIfheqpa2J P49GZlh8qxCZAFKSm0W59TbBcG98sDd2hGsbdOiN+d0YDn7wDn4PC47R3sucnJlactMO 88kw== X-Gm-Message-State: AOAM5322Q+F17H1uAIYYFQWXvj97XUcwqAB8oIuyk274bWrXZj6BdEos iIT7hXOhaMm9gDH0p5ayiKM= X-Received: by 2002:a17:90b:4acd:b0:1e3:4dab:a14c with SMTP id mh13-20020a17090b4acd00b001e34daba14cmr50130pjb.5.1654871448775; Fri, 10 Jun 2022 07:30:48 -0700 (PDT) Received: from localhost.localdomain (124x33x176x97.ap124.ftth.ucom.ne.jp. [124.33.176.97]) by smtp.gmail.com with ESMTPSA id s6-20020a170902ea0600b0016232dbd01fsm18851339plg.292.2022.06.10.07.30.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 07:30:48 -0700 (PDT) Sender: Vincent Mailhol From: Vincent Mailhol To: Marc Kleine-Budde Cc: linux-can@vger.kernel.org, linux-kernel@vger.kernel.org, Max Staudt , Oliver Hartkopp , netdev@vger.kernel.org, Geert Uytterhoeven , Jakub Kicinski , Vincent Mailhol Subject: [PATCH v6 4/7] can: Kconfig: add CONFIG_CAN_RX_OFFLOAD Date: Fri, 10 Jun 2022 23:30:06 +0900 Message-Id: <20220610143009.323579-5-mailhol.vincent@wanadoo.fr> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220610143009.323579-1-mailhol.vincent@wanadoo.fr> References: <20220513142355.250389-1-mailhol.vincent@wanadoo.fr> <20220610143009.323579-1-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Only a few drivers rely on the CAN rx offload framework (as of the writing of this patch, only four: flexcan, m_can, mcp251xfd and ti_hecc). Split it out of can-dev and add a new config symbol: CAN_RX_OFFLOAD. The drivers relying on CAN rx offload are in different sub folders. Make CAN_RX_OFFLOAD an hidden option and tag all the drivers depending on that feature with "select CAN_RX_OFFLOAD" so that the option gets automatically enabled if and only if one of those drivers is chosen. Suggested-by: Geert Uytterhoeven Suggested-by: Jakub Kicinski Signed-off-by: Vincent Mailhol --- drivers/net/can/Kconfig | 5 +++++ drivers/net/can/dev/Makefile | 2 +- drivers/net/can/m_can/Kconfig | 1 + drivers/net/can/spi/mcp251xfd/Kconfig | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig index 87470feae6b1..5335f3afc0a5 100644 --- a/drivers/net/can/Kconfig +++ b/drivers/net/can/Kconfig @@ -102,6 +102,9 @@ config CAN_CALC_BITTIMING If unsure, say Y. +config CAN_RX_OFFLOAD + bool + config CAN_AT91 tristate "Atmel AT91 onchip CAN controller" depends on (ARCH_AT91 || COMPILE_TEST) && HAS_IOMEM @@ -113,6 +116,7 @@ config CAN_FLEXCAN tristate "Support for Freescale FLEXCAN based chips" depends on OF || COLDFIRE || COMPILE_TEST depends on HAS_IOMEM + select CAN_RX_OFFLOAD help Say Y here if you want to support for Freescale FlexCAN. @@ -162,6 +166,7 @@ config CAN_SUN4I config CAN_TI_HECC depends on ARM tristate "TI High End CAN Controller" + select CAN_RX_OFFLOAD help Driver for TI HECC (High End CAN Controller) module found on many TI devices. The device specifications are available from www.ti.com diff --git a/drivers/net/can/dev/Makefile b/drivers/net/can/dev/Makefile index 791e6b297ea3..633687d6b6c0 100644 --- a/drivers/net/can/dev/Makefile +++ b/drivers/net/can/dev/Makefile @@ -9,4 +9,4 @@ can-dev-$(CONFIG_CAN_NETLINK) += bittiming.o can-dev-$(CONFIG_CAN_NETLINK) += dev.o can-dev-$(CONFIG_CAN_NETLINK) += length.o can-dev-$(CONFIG_CAN_NETLINK) += netlink.o -can-dev-$(CONFIG_CAN_NETLINK) += rx-offload.o +can-dev-$(CONFIG_CAN_RX_OFFLOAD) += rx-offload.o diff --git a/drivers/net/can/m_can/Kconfig b/drivers/net/can/m_can/Kconfig index 45ad1b3f0cd0..fc2afab36279 100644 --- a/drivers/net/can/m_can/Kconfig +++ b/drivers/net/can/m_can/Kconfig @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only menuconfig CAN_M_CAN tristate "Bosch M_CAN support" + select CAN_RX_OFFLOAD help Say Y here if you want support for Bosch M_CAN controller framework. This is common support for devices that embed the Bosch M_CAN IP. diff --git a/drivers/net/can/spi/mcp251xfd/Kconfig b/drivers/net/can/spi/mcp251xfd/Kconfig index dd0fc0a54be1..877e4356010d 100644 --- a/drivers/net/can/spi/mcp251xfd/Kconfig +++ b/drivers/net/can/spi/mcp251xfd/Kconfig @@ -2,6 +2,7 @@ config CAN_MCP251XFD tristate "Microchip MCP251xFD SPI CAN controllers" + select CAN_RX_OFFLOAD select REGMAP select WANT_DEV_COREDUMP help -- 2.35.1