Message ID | 20230103130348.1733467-1-vladimir.oltean@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4611109wrt; Tue, 3 Jan 2023 05:14:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXuhSHIxkOGmCuib2aL7I+NcCWgFPYkY+QnKqrZ3yhJ2C+J40ymCYd/enw2pCAxnym6Hck/H X-Received: by 2002:a05:6a20:3d14:b0:af:b909:2b3f with SMTP id y20-20020a056a203d1400b000afb9092b3fmr74484701pzi.34.1672751677993; Tue, 03 Jan 2023 05:14:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1672751677; cv=pass; d=google.com; s=arc-20160816; b=pFS0oIBhOG+4wZ0QFdGjLdhX/bIMacricaKyC73oAiGoIlK4ntAF1TPFDKa7yzEDtE tdl7RznMG7HQxlbjxFDVXCtj1luys5C9UyGITC4Y/CP6pDz4HE8/m50gCWoCRvt0MmAy 8fFVYb1Ph3QksZLfrsm4fNiF1TnfQMj7pumEtQxQ0qgfc8Y70HNaJeL2cV3WW3tlfBbQ 0C//Yo7m2JO+5DAbyFuLU+taogATK0JdvlTRp06kRbC03wVrvpxPr0Opl/bjDVBue4jF R/3viSsJPV58hE/EMGZp2/Tam4diq8GdibtQ7qf/FXTjmfaXidxL3OVXgMMrMBy4+Dae wqQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=OMbv2aWhZNgg0Q18/dEAgvVAidj3D92TKktzPh4G2OI=; b=rUxh8+brDt0nOIgJ0YVMqY7vAq2Hel6WpZG1XAjtWA/3RuZ5s5+h4bUGM7In8EkIot 7A7QaD4cTAnSB77HhqwjqXK+iWOTJxCMwn1g+2ARBT3nOnC2TJVajf97ZvGu4jU+Fkbg TMWuJBgMTYHFHpkIQyacn+QGk0xy/V+uGN+xftR7wqJiRGySxeNOpYiXLI4gyPt8TGhV 4OEA5AdiTjP2UZygfD6HYr8NIhnGvBWJDPAR8WvwT6nuO0eHiiNi0ZtX0Jv0ioycTRy3 It14BH9sj93LJ2Pw9xHzbnlWaL25QfdKCZCycr/4qcbSOW5fW73auhrPESZEzz+zndrg M4Sw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=lbd5LExA; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z20-20020a630a54000000b00476d1591b76si24588223pgk.119.2023.01.03.05.14.24; Tue, 03 Jan 2023 05:14:37 -0800 (PST) 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=@nxp.com header.s=selector2 header.b=lbd5LExA; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236990AbjACNEF (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Tue, 3 Jan 2023 08:04:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230052AbjACNED (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 3 Jan 2023 08:04:03 -0500 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2062.outbound.protection.outlook.com [40.107.6.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2BB7B7F7; Tue, 3 Jan 2023 05:04:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N6saad0fcXecEhuraJUza9T/j+Rr46hbNFbwdcIJ8GJ+ICXdntiO3Zwk9/Cqnyac6o2LtkzdEYzV4yzLlaAUm7Q+11Q72dw6CXBmosS75LccAZRraeLIDX5RkFow9tRbx5hTN3db7H4XgfgcfNBbMaWjekviPEJkVFSUButHXvOlJcqCy60MtndbpL1YUp26bczEM+Y/yG2/JVxo/g16ob0rHmYproao9IFtHNm+DS1LHW8P7LZkxfb9sAsKciLtRkckPAMBJL1Jx4+oCpa+Gy38PPpdBfL13os2G3/U0xdosmQxzFVU9u1ICsNSq4tf8jVq017ZMQybpxk7We+hnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OMbv2aWhZNgg0Q18/dEAgvVAidj3D92TKktzPh4G2OI=; b=dVVI49IiYcxMT+v2GnWGd8AZiucyLAf3l+fqIdMZbMnRrB4Hw4lX+frVNXwpPdXL64XWqMbZTPPTzbna9aCvfk3Ls3P6BFh1HGcAJrLq2ORSuYPcTIPMtx550asdSvH5ZWLGPlMs+ofmlI2kCH9Tw0QK1fmhIBVcaMTd18Beyu5gPTz7haDQnhj/jWk5sPLiKB0kKA+bm6RXSI9/vyOHkKPLFUVU9emIf/8nSqPLWPoyWRX1aW+fdIvqqCEb0Xqke3ROyc1q99GNpe57RhK+969KVH6b50t4Fayde4Frx7ixkphPrqUBVfAjVbcLw5iJJni1EZQ8tgwxBSjx0KkROw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OMbv2aWhZNgg0Q18/dEAgvVAidj3D92TKktzPh4G2OI=; b=lbd5LExACul34MvqfI3vAypg12g0spLDlmd61IF3LOpFO4SZ1OOX1QItdfHfkFSGMDvFzg1+RA0f62GX7EBKMxHTsv5l1fVj9vIZTk8bCfH/uDCqPfu/ZWkB9cv5ge60iqDzqrHIbNBGKH2iYSWSPGmqSXE4euY6gwe95LKSFjM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by AM8PR04MB7938.eurprd04.prod.outlook.com (2603:10a6:20b:24e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Tue, 3 Jan 2023 13:03:59 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::7c13:ef9:b52f:47d8]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::7c13:ef9:b52f:47d8%6]) with mapi id 15.20.5944.019; Tue, 3 Jan 2023 13:03:59 +0000 From: Vladimir Oltean <vladimir.oltean@nxp.com> To: Jonathan Cameron <jic23@kernel.org>, linux-iio@vger.kernel.org Cc: Lorenzo Bianconi <lorenzo@kernel.org>, Lars-Peter Clausen <lars@metafoo.de>, linux-kernel@vger.kernel.org Subject: [PATCH] iio: imu: st_lsm6dsx: fix build when CONFIG_IIO_TRIGGERED_BUFFER=m Date: Tue, 3 Jan 2023 15:03:48 +0200 Message-Id: <20230103130348.1733467-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BEXP281CA0017.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10::27) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|AM8PR04MB7938:EE_ X-MS-Office365-Filtering-Correlation-Id: 2034c5ce-c4dd-44d3-ae95-08daed8afa8d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E/ajFQlk/0leblkCsLYRM9VGbOIB0QS1j+xZUEmPyJDcJ/bztAZ9c9FyYHiH1oKBj/HX1hezoZ8LmoDr1giS5Vx7JIL6+N5LcbyA7A9wD/9tzyyzmzVM/SgAUxLpuKXXtroY3lCxSuN3l20POsIjMy0soxnxVXyz/6k1UDkeCoCXQ8OJAigNx0IJl6J0YEzyvo2/6+pDASUtpuM/Y2kbRcuV5O3XJKdBpCK+QxUIqbuBpwhv5u6GaXsT2uPbTOcOv0eTOeJLG6MCvCTRUuXtwWUgL3vd/gy8qE6FmgVskAqtDuUDrJL3sbscenrqk4tco3vpbMjvCNQKQoYYtn0OX7x5e/AjQPTCKoMzFLbiemfVbsfZyEuu296Aw0GDeBFu7wkVd2SixyH/rEhOXiygia6JfD63O/CCSqHByIPmMcoeuMSZ2dO9D8L/hFTF5LeiHfmAg1HrxGU01NZXyoQtTBjT9757aapwIaIIcwr50NsMLkm2jkIk0pbLDAA+uVd80afedTfQyVNLF13K3O8U09kbkybXkL8XcCGQOcVKBtvDeVd+y1Eew+q1TWWNNcVUrVuIORG5wl13H6QQrUThBac1snfYrP7bFC2+dDKJkMP1VKd34SXnuEj3A4Uc1ilaleW033Ya62n2+PGmxxNZ6aH1/nEhM6l1Wpn0iA2n5lWii0Uoo8WI/wJjMl79kU2kLXoRStSUVA5/wTeMKoiXrt2J+iZbu6V2qhnSqpr/V4A= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(396003)(376002)(346002)(366004)(136003)(451199015)(1076003)(6512007)(26005)(6666004)(6506007)(86362001)(36756003)(38350700002)(38100700002)(2616005)(186003)(478600001)(41300700001)(4326008)(8676002)(2906002)(5660300002)(44832011)(8936002)(6486002)(52116002)(66556008)(66946007)(66476007)(54906003)(316002)(22166006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lMc+ZcL5aSpWWoB48VfejPhDLHi8uodQyMdJCeTE0ZSyaIy6wgrIeHX7ckrn8O2x49TX5a8o11fYcLOzzl3MtvIDHiR4hBf495IGvV/i5fNEsUG3+c6MUkX3AlupYBobFOmO4esKpq4jVot4TXhm1POoysAjuFy64dtw6IRl8Sb//hksSvrWbVmZ5mWWc6DBhjppRCrzySd/f02/8dD3j8udNZ0/0r2G3FBufXDHc2HHqwQO7YFQA+now9yleBK3mqEKg/p4/ROXEUyaBYPCbG7CJE8yzZ/O0TZkWCFmYgL1aaUL1MIxvMEv/+ZjLMzLA50DeKF5+JsKJtxbTWYWNuq/HeO3kiOzJKeMTl/tAjyYgcjS7MQVaslKh9MNJjeyM1jrpijj3HFVLrFvQC8gACrYRS/vqhZxQ2SMZG+zOY9HsiTzrbMTZBo2uwwYt6Sccd1/gdzO2cplDwe6p9UEuvKwEYKqvkjorj9QME4SFPTqWrG6uDpt9x6reP6x4DXYmk7PlxrmlFxv745Z535Ji5KN+fVDYyOZIoxov3wavZFAywpKrEvf6GSQleM1y3/vZ4WrDfivEC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: 2034c5ce-c4dd-44d3-ae95-08daed8afa8d X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2023 13:03:59.4017 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: i6cQZ7x9xgtBrcapRbqrFsBREaxWhcEhKbscRTHaufouRldyqmq3utUY/iM2nJXndA7W0vlp0Lo7Ep5PvG8yXA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7938 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754007263572935863?= X-GMAIL-MSGID: =?utf-8?q?1754007263572935863?= |
Series |
iio: imu: st_lsm6dsx: fix build when CONFIG_IIO_TRIGGERED_BUFFER=m
|
|
Commit Message
Vladimir Oltean
Jan. 3, 2023, 1:03 p.m. UTC
The following kernel linkage error:
st_lsm6dsx_core.o: in function `st_lsm6dsx_sw_buffers_setup':
st_lsm6dsx_core.c:2578: undefined reference to `devm_iio_triggered_buffer_setup_ext'
is caused by the fact that the object owning devm_iio_triggered_buffer_setup_ext()
(drivers/iio/buffer/industrialio-triggered-buffer.o) is allowed to be
built as module when its user (drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c)
is built-in.
The st_lsm6dsx driver already has a "select IIO_BUFFER", so add another
select for IIO_TRIGGERED_BUFFER, to make that option follow what is set
for the st_lsm6dsx driver. This is similar to what other iio drivers do.
Fixes: 2cfb2180c3e8 ("iio: imu: st_lsm6dsx: introduce sw trigger support")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
drivers/iio/imu/st_lsm6dsx/Kconfig | 1 +
1 file changed, 1 insertion(+)
Comments
On Tue, 3 Jan 2023 15:03:48 +0200 Vladimir Oltean <vladimir.oltean@nxp.com> wrote: > The following kernel linkage error: > > st_lsm6dsx_core.o: in function `st_lsm6dsx_sw_buffers_setup': > st_lsm6dsx_core.c:2578: undefined reference to `devm_iio_triggered_buffer_setup_ext' > > is caused by the fact that the object owning devm_iio_triggered_buffer_setup_ext() > (drivers/iio/buffer/industrialio-triggered-buffer.o) is allowed to be > built as module when its user (drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c) > is built-in. > > The st_lsm6dsx driver already has a "select IIO_BUFFER", so add another > select for IIO_TRIGGERED_BUFFER, to make that option follow what is set > for the st_lsm6dsx driver. This is similar to what other iio drivers do. > > Fixes: 2cfb2180c3e8 ("iio: imu: st_lsm6dsx: introduce sw trigger support") > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Applied to the fixes-togreg branch of iio.git and marked for stable. Thanks, Jonathan > --- > drivers/iio/imu/st_lsm6dsx/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/iio/imu/st_lsm6dsx/Kconfig b/drivers/iio/imu/st_lsm6dsx/Kconfig > index f6660847fb58..8c16cdacf2f2 100644 > --- a/drivers/iio/imu/st_lsm6dsx/Kconfig > +++ b/drivers/iio/imu/st_lsm6dsx/Kconfig > @@ -4,6 +4,7 @@ config IIO_ST_LSM6DSX > tristate "ST_LSM6DSx driver for STM 6-axis IMU MEMS sensors" > depends on (I2C || SPI || I3C) > select IIO_BUFFER > + select IIO_TRIGGERED_BUFFER > select IIO_KFIFO_BUF > select IIO_ST_LSM6DSX_I2C if (I2C) > select IIO_ST_LSM6DSX_SPI if (SPI_MASTER)
diff --git a/drivers/iio/imu/st_lsm6dsx/Kconfig b/drivers/iio/imu/st_lsm6dsx/Kconfig index f6660847fb58..8c16cdacf2f2 100644 --- a/drivers/iio/imu/st_lsm6dsx/Kconfig +++ b/drivers/iio/imu/st_lsm6dsx/Kconfig @@ -4,6 +4,7 @@ config IIO_ST_LSM6DSX tristate "ST_LSM6DSx driver for STM 6-axis IMU MEMS sensors" depends on (I2C || SPI || I3C) select IIO_BUFFER + select IIO_TRIGGERED_BUFFER select IIO_KFIFO_BUF select IIO_ST_LSM6DSX_I2C if (I2C) select IIO_ST_LSM6DSX_SPI if (SPI_MASTER)