From: Jonathan Cameron <jic23@kernel.org>
To: Denis CIOCCA <denis.ciocca@st.com>
Cc: lars@metafoo.de, linux-iio@vger.kernel.org
Subject: Re: iio: STMicroelectronics iio drivers
Date: Tue, 15 Jan 2013 23:06:36 +0000 [thread overview]
Message-ID: <50F5E0FC.2020703@kernel.org> (raw)
In-Reply-To: <50F5DFDE.4050607@kernel.org>
On 01/15/2013 11:01 PM, Jonathan Cameron wrote:
> On 01/15/2013 10:33 PM, Jonathan Cameron wrote:
>> On 01/15/2013 08:30 AM, Denis CIOCCA wrote:
>>> Hi Jonathan,
>>>
>>> I sent to you the new patches to fix the u8 casting and a little bugfix in the header files (functions within #ifdef).
>>> Thanks,
>>>
>>> Denis
>>>
>>>
>> Denis,
>>
>> Just been running some build tests on this. You need to
>> do a lot more testing of the various possible combinations
>> I think. Right now I can't build and so far I'm not entirely
>> sure why.
>>
>> CHECK drivers/iio/accel/st_accel_i2c.c
>> drivers/iio/accel/st_accel_i2c.c:38:9: error: undefined identifier 'st_sensors_i2c_configure'
>> CC [M] drivers/iio/accel/st_accel_i2c.o
>> drivers/iio/accel/st_accel_i2c.c: In function 'st_accel_i2c_probe':
>> drivers/iio/accel/st_accel_i2c.c:38:2: error: implicit declaration of function 'st_sensors_i2c_configure'
>> make[3]: *** [drivers/iio/accel/st_accel_i2c.o] Error 1
>> make[2]: *** [drivers/iio/accel] Error 2
>> make[1]: *** [drivers/iio] Error 2
>> make: *** [drivers] Error 2
>>
>> For reasons that aren't immediately clear ifdef CONFIG statements don't
>> seem to be working...
>
> Of course, I had relevant bits compiling as modules.
>
> I think we should rethink the module structure here so that this mess doesn't occur.
> One core driver with multiple files seems right to me.
>
> so a make file looking something like.
> obj-$(CONFIG_IIO_ST_SENSORS_CORE) += st_sensors.o
> st_sensors-y := st_sensors_core.o
> st_sensors-$(CONFIG_IIO_ST_SENSORS_I2C) += st_sensors_i2c.o
> st_sensors-$(CONFIG_IIO_ST_SENSORS_SPI) += st_sensors_spi.o
> st_sensors-$(CONFIG_IIO_ST_SENSORS_TRIGGERED_BUFFER) += st_sensors_trigger.o st_sensors_buffer.o
>
> and a kconfig where all by the sensors_core entry are boolean.
>
> Similarly for the drivers. Thus we end up with 4 modules rather than dozens and
> hopefully the build logic will work fine in all cases.
Ah, can't have two module init's so need separate i2c and spi drivers for each type
+ a core module. Sorry, didn't think that through until I tried it out.
Anyhow, unify everything under common/st_sensors + deal with the problems different
combinations can give.
Jonathan
>
> Also note that I think you can't have buffering for accel and not gyro etc.
>
>
>
>>
>> I also suspect we have too many complex build options in here in the first
>> place. It's probably not unreasonable for instance to build in buffered support
>> if buffering is enabled in general for IIO rather than explicitly.
>>
>> Jonathan
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2013-01-15 23:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 8:30 iio: STMicroelectronics iio drivers Denis CIOCCA
2013-01-15 8:30 ` [PATCH 1/9] iio:common: Add STMicroelectronics common library Denis CIOCCA
2013-01-16 14:07 ` Lars-Peter Clausen
2013-01-16 16:30 ` Denis CIOCCA
2013-01-16 17:13 ` Lars-Peter Clausen
2013-01-16 14:18 ` Lars-Peter Clausen
2013-01-15 8:30 ` [PATCH 2/9] iio:accel: Add STMicroelectronics accelerometers driver Denis CIOCCA
2013-01-16 14:28 ` Lars-Peter Clausen
2013-01-16 16:56 ` Denis CIOCCA
2013-01-16 17:16 ` Lars-Peter Clausen
2013-01-15 8:30 ` [PATCH 3/9] iio:gyro: Add STMicroelectronics gyroscopes driver Denis CIOCCA
2013-01-15 8:31 ` [PATCH 4/9] iio:magnetometer: Add STMicroelectronics magnetometers driver Denis CIOCCA
2013-01-15 22:33 ` iio: STMicroelectronics iio drivers Jonathan Cameron
2013-01-15 23:01 ` Jonathan Cameron
2013-01-15 23:06 ` Jonathan Cameron [this message]
2013-01-16 8:48 ` Jonathan Cameron
2013-01-16 11:48 ` Denis CIOCCA
2013-01-16 12:25 ` Jonathan Cameron
2013-01-16 13:36 ` Lars-Peter Clausen
-- strict thread matches above, loose matches on Subject: below --
2013-01-08 16:30 Denis CIOCCA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50F5E0FC.2020703@kernel.org \
--to=jic23@kernel.org \
--cc=denis.ciocca@st.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).