From: Sean Nyekjaer <sean@geanix.com>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: linux-iio@vger.kernel.org, jic23@kernel.org,
lorenzo.bianconi83@gmail.com, martin@geanix.com,
denis.ciocca@st.com, mario.tesi@st.com, armando.visconti@st.com
Subject: Re: [PATCH v2 3/6] iio: imu: st_lsm6dsx: add motion events
Date: Wed, 21 Aug 2019 13:11:02 +0200 [thread overview]
Message-ID: <2d8adf1f-4a8e-978b-dd48-2724c3c0b566@geanix.com> (raw)
In-Reply-To: <20190716082927.GB13440@localhost.localdomain>
On 16/07/2019 10.29, Lorenzo Bianconi wrote:
>> +#define ST_LSM6DSX_CHANNEL_ACC(chan_type, addr, mod, scan_idx) \
>> +{ \
>> + .type = chan_type, \
>> + .address = addr, \
>> + .modified = 1, \
>> + .channel2 = mod, \
>> + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \
>> + BIT(IIO_CHAN_INFO_SCALE), \
>> + .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ), \
>> + .scan_index = scan_idx, \
>> + .scan_type = { \
>> + .sign = 's', \
>> + .realbits = 16, \
>> + .storagebits = 16, \
>> + .endianness = IIO_LE, \
>> + }, \
>> + .event_spec = &st_lsm6dsx_event, \
>> + .num_event_specs = 1, \
>> +}
>
> I would prefer to extend existing macros
>
>> +
>> #define ST_LSM6DSX_CHANNEL(chan_type, addr, mod, scan_idx) \
>> { \
>> .type = chan_type, \
>> @@ -297,6 +318,8 @@ struct st_lsm6dsx_hw {
>> u8 enable_mask;
>> u8 ts_sip;
>> u8 sip;
>> + u8 event_threshold;
>> + bool enable_event;
>> int drdy_pin;
>>
>> u8 *buff;
>> @@ -306,6 +329,13 @@ struct st_lsm6dsx_hw {
>> const struct st_lsm6dsx_settings *settings;
>> };
>>
How would I do that when we have the `event_spec` for the accelerometer?
/Sean
next prev parent reply other threads:[~2019-08-21 11:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 8:15 [PATCH v2 1/6] iio: imu: st_lsm6dsx: move interrupt thread to core Sean Nyekjaer
2019-07-15 8:15 ` [PATCH v2 2/6] iio: imu: st_lsm6dsx: save drdy_pin in device struct Sean Nyekjaer
2019-07-15 8:15 ` [PATCH v2 3/6] iio: imu: st_lsm6dsx: add motion events Sean Nyekjaer
2019-07-16 8:29 ` Lorenzo Bianconi
2019-07-27 21:11 ` Jonathan Cameron
2019-08-09 11:05 ` Sean Nyekjaer
2019-08-21 11:11 ` Sean Nyekjaer [this message]
2019-07-15 8:15 ` [PATCH v2 4/6] iio: imu: st_lsm6dsx: add wakeup-source option Sean Nyekjaer
2019-07-16 8:04 ` Lorenzo Bianconi
2019-07-15 8:15 ` [PATCH v2 5/6] iio: imu: st_lsm6dsx: always enter interrupt thread Sean Nyekjaer
2019-07-16 6:14 ` Lorenzo Bianconi
2019-07-15 8:15 ` [PATCH v2 6/6] iio: imu: st_lsm6dsx: add motion report function and call from interrupt Sean Nyekjaer
2019-07-16 6:11 ` Lorenzo Bianconi
2019-07-16 5:57 ` [PATCH v2 1/6] iio: imu: st_lsm6dsx: move interrupt thread to core Lorenzo Bianconi
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=2d8adf1f-4a8e-978b-dd48-2724c3c0b566@geanix.com \
--to=sean@geanix.com \
--cc=armando.visconti@st.com \
--cc=denis.ciocca@st.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=lorenzo@kernel.org \
--cc=mario.tesi@st.com \
--cc=martin@geanix.com \
/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).