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=-14.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 466F6C433ED for ; Wed, 19 May 2021 05:42:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 29AB9611BF for ; Wed, 19 May 2021 05:42:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237076AbhESFnx (ORCPT ); Wed, 19 May 2021 01:43:53 -0400 Received: from first.geanix.com ([116.203.34.67]:49378 "EHLO first.geanix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345018AbhESFiy (ORCPT ); Wed, 19 May 2021 01:38:54 -0400 Received: from [192.168.64.199] (unknown [185.17.218.86]) by first.geanix.com (Postfix) with ESMTPSA id 00271468010; Wed, 19 May 2021 05:37:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=geanix.com; s=first; t=1621402637; bh=5bJTRIEGZKGTs+SrBoeiU/TKFA8eRT3CF1vLgc9jO2s=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=VgNjrXqKjVUoUjI3n8/QoX0/geCwka07Vx5TGg8DXVWxg8A+jt1cRIg21C2sa1lbU HumkM1pHvbkHkgRF+pYn1zOcwpCTlINJ5ZqzujZ822+86jIyKxnoG5fhSdDmB1Y1c6 nwVkvytgRe5puT+l9u7jhhC8pACBGvAwQTP/it3nnNviYJCAbBsy2KiHTx193zh9CC ZyUTJ84EXdFRsXIb/jj9f0gNrU/bh5OHp6MWRhPFirRBPMnV7ziip80neKMFDtQ9rE qfub7N9UiwKbL2NRwz6EYFUSVjSYH5jI2rT9/fSmFu3RR151xGaE7LTa3NDfKQD6B8 Lb3SUXTOKJ0Eg== Subject: Re: [PATCH] iio: accel: fxls8962af: conditionally compile fxls8962af_i2c_raw_read_errata3() To: trix@redhat.com, jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210518234828.1930387-1-trix@redhat.com> From: Sean Nyekjaer Message-ID: Date: Wed, 19 May 2021 07:37:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210518234828.1930387-1-trix@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/05/2021 01.48, trix@redhat.com wrote: > From: Tom Rix > > The build is failing with this link error > ld: fxls8962af-core.o: in function `fxls8962af_fifo_transfer': > fxls8962af-core.c: undefined reference to `i2c_verify_client' > > This is needed for the i2c variant, not the spi variant. So > conditionally compile based on CONFIG_FXLS8962AF_I2C. > Fixes: 68068fad0e1c ("iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads") > Signed-off-by: Tom Rix Reviewed-by: Sean Nyekjaer > --- > drivers/iio/accel/fxls8962af-core.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c > index 9fe5a18a605cc..b6d833e2058c8 100644 > --- a/drivers/iio/accel/fxls8962af-core.c > +++ b/drivers/iio/accel/fxls8962af-core.c > @@ -624,6 +624,7 @@ static const struct iio_buffer_setup_ops fxls8962af_buffer_ops = { > .postdisable = fxls8962af_buffer_postdisable, > }; > > +#if IS_ENABLED(CONFIG_FXLS8962AF_I2C) > static int fxls8962af_i2c_raw_read_errata3(struct fxls8962af_data *data, > u16 *buffer, int samples, > int sample_length) > @@ -639,6 +640,7 @@ static int fxls8962af_i2c_raw_read_errata3(struct fxls8962af_data *data, > > return ret; > } > +#endif > > static int fxls8962af_fifo_transfer(struct fxls8962af_data *data, > u16 *buffer, int samples) > @@ -648,6 +650,7 @@ static int fxls8962af_fifo_transfer(struct fxls8962af_data *data, > int total_length = samples * sample_length; > int ret; > > +#if IS_ENABLED(CONFIG_FXLS8962AF_I2C) > if (i2c_verify_client(dev)) > /* > * Due to errata bug: > @@ -657,6 +660,7 @@ static int fxls8962af_fifo_transfer(struct fxls8962af_data *data, > ret = fxls8962af_i2c_raw_read_errata3(data, buffer, samples, > sample_length); > else > +#endif > ret = regmap_raw_read(data->regmap, FXLS8962AF_BUF_X_LSB, buffer, > total_length); > >