From: Jonathan Cameron <jic23@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Giuseppe Barba <giuseppe.barba@st.com>,
Denis Ciocca <denis.ciocca@st.com>
Subject: Re: [PATCH 4/4] iio: st_sensors: support open drain mode
Date: Sun, 3 Apr 2016 10:33:30 +0100 [thread overview]
Message-ID: <5700E36A.6080608@kernel.org> (raw)
In-Reply-To: <CACRpkdZ37dpKsHr01M0+waXgP4xZJjxxFrNQW13Zxi1a9H+-Rg@mail.gmail.com>
On 31/03/16 09:15, Linus Walleij wrote:
> On Mon, Mar 28, 2016 at 11:12 AM, Jonathan Cameron <jic23@kernel.org> wrote:
>> On 24/03/16 13:18, Linus Walleij wrote:
>
>>> +- st,int-pin-open-drain: the interrupt/data ready line will be configured
>>> + as open drain, which is useful if several sensors share the same
>>> + interrupt line.
>>
>> Really feels like this one ought to be more generic.. Mind you so does
>> drdy-int-pin!
>
> Sorry about drdy-int-pin, it wasn't me ;)
>
> That one is a mux kind of thing: interrupt goes out on IRQ line
> INT1 or INT2, select one...
>
>> Hmm. Looks like most open drain controls are chip specific - other than
>> your pinctrl ones and that doesn't really map to here I guess.
>
> Both the muxing and the OD setting can be done with pin control,
> it's just that it is like swatting a fly with a skyscraper - vast overkill
> for two interrupt lines.
>
> I came to the conclusion that with small chips or IP blocks just
> randomly doing some muxing or biasing of a few pins isn't necessarily
> worth all the trouble of implementing pin control, the latter was
> conceived for real big arrays of pins really. There are already a
> few of these all over the kernel, e.g. the ST Multi-Purpose expander
> drivers/mfd/stmpe.c - could be pin control muxed but it'd be overkill.
>
> So as pin control maintainer when this kind of hardware comes up
> I usually just "think it over" and then "OK then".
I can indeed see the advantages of that flexibility, but from an IIO point
of view, we are going to have a number of very similar bindings. I can't
see a reason not to generalize the form of the binding away from a single
driver.
So lets drop the vendor prefix from this one and have
int-pin-open-drain (and drdy-int-pin ideally).
>
>>> + if (sdata->int_pin_open_drain) {
>>> + dev_info(&indio_dev->dev,
>>> + "set interrupt line to open drain mode\n");
>>
>> Hmm. Curriously I have a board with an lis3l02dq on it where the interrupt
>> is shared, but doesn't explicitly support open drain. In that case it
>> is done with some external circuitry.
>
> That should run fine with just the status read patch from earlier
> in the series I guess?
I'll go with a 'probably'. Getting that part to run at all is 'interesting'
as it's minimum rate is 440Hz and my board can't keep up.
>
>> Anyhow - I guess when I actually add support for that I'll just add a sanity
>> check in here that addr_od and mask_od are specified :)
>
> Hm, yeah. Otherwise just patch out my enforcement of the
> OD flag for a shared line and add a comment in.
Will figure it out when / if I ever actually do those patches...
J
>
> Yours,
> Linus Walleij
> --
> 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
>
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: "linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Giuseppe Barba <giuseppe.barba-qxv4g6HH51o@public.gmane.org>,
Denis Ciocca <denis.ciocca-qxv4g6HH51o@public.gmane.org>
Subject: Re: [PATCH 4/4] iio: st_sensors: support open drain mode
Date: Sun, 3 Apr 2016 10:33:30 +0100 [thread overview]
Message-ID: <5700E36A.6080608@kernel.org> (raw)
In-Reply-To: <CACRpkdZ37dpKsHr01M0+waXgP4xZJjxxFrNQW13Zxi1a9H+-Rg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 31/03/16 09:15, Linus Walleij wrote:
> On Mon, Mar 28, 2016 at 11:12 AM, Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
>> On 24/03/16 13:18, Linus Walleij wrote:
>
>>> +- st,int-pin-open-drain: the interrupt/data ready line will be configured
>>> + as open drain, which is useful if several sensors share the same
>>> + interrupt line.
>>
>> Really feels like this one ought to be more generic.. Mind you so does
>> drdy-int-pin!
>
> Sorry about drdy-int-pin, it wasn't me ;)
>
> That one is a mux kind of thing: interrupt goes out on IRQ line
> INT1 or INT2, select one...
>
>> Hmm. Looks like most open drain controls are chip specific - other than
>> your pinctrl ones and that doesn't really map to here I guess.
>
> Both the muxing and the OD setting can be done with pin control,
> it's just that it is like swatting a fly with a skyscraper - vast overkill
> for two interrupt lines.
>
> I came to the conclusion that with small chips or IP blocks just
> randomly doing some muxing or biasing of a few pins isn't necessarily
> worth all the trouble of implementing pin control, the latter was
> conceived for real big arrays of pins really. There are already a
> few of these all over the kernel, e.g. the ST Multi-Purpose expander
> drivers/mfd/stmpe.c - could be pin control muxed but it'd be overkill.
>
> So as pin control maintainer when this kind of hardware comes up
> I usually just "think it over" and then "OK then".
I can indeed see the advantages of that flexibility, but from an IIO point
of view, we are going to have a number of very similar bindings. I can't
see a reason not to generalize the form of the binding away from a single
driver.
So lets drop the vendor prefix from this one and have
int-pin-open-drain (and drdy-int-pin ideally).
>
>>> + if (sdata->int_pin_open_drain) {
>>> + dev_info(&indio_dev->dev,
>>> + "set interrupt line to open drain mode\n");
>>
>> Hmm. Curriously I have a board with an lis3l02dq on it where the interrupt
>> is shared, but doesn't explicitly support open drain. In that case it
>> is done with some external circuitry.
>
> That should run fine with just the status read patch from earlier
> in the series I guess?
I'll go with a 'probably'. Getting that part to run at all is 'interesting'
as it's minimum rate is 440Hz and my board can't keep up.
>
>> Anyhow - I guess when I actually add support for that I'll just add a sanity
>> check in here that addr_od and mask_od are specified :)
>
> Hm, yeah. Otherwise just patch out my enforcement of the
> OD flag for a shared line and add a comment in.
Will figure it out when / if I ever actually do those patches...
J
>
> Yours,
> Linus Walleij
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2016-04-03 9:33 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-24 13:18 [PATCH 1/4] iio: st_sensors: simplify buffer address handling Linus Walleij
2016-03-24 13:18 ` [PATCH 2/4] iio: st_sensors: read each channel individually Linus Walleij
2016-03-28 8:03 ` Jonathan Cameron
2016-03-28 9:20 ` Linus Walleij
2016-03-28 9:37 ` Jonathan Cameron
2016-03-29 8:15 ` Linus Walleij
2016-04-10 14:29 ` Jonathan Cameron
2016-04-11 6:50 ` Linus Walleij
2016-04-17 11:22 ` Jonathan Cameron
2016-04-17 18:47 ` Linus Walleij
2016-03-24 13:18 ` [PATCH 3/4] iio: st_sensors: verify interrupt event to status Linus Walleij
2016-03-28 8:09 ` Jonathan Cameron
2016-04-12 12:34 ` Linus Walleij
2016-04-17 11:24 ` Jonathan Cameron
2016-05-03 17:58 ` Crestez Dan Leonard
2016-05-03 20:10 ` Linus Walleij
2016-05-04 7:35 ` Jonathan Cameron
2016-05-04 14:34 ` Linus Walleij
2016-05-04 18:14 ` Crestez Dan Leonard
2016-05-06 9:14 ` Linus Walleij
2016-03-24 13:18 ` [PATCH 4/4] iio: st_sensors: support open drain mode Linus Walleij
2016-03-24 13:18 ` Linus Walleij
2016-03-28 9:12 ` Jonathan Cameron
2016-03-28 9:12 ` Jonathan Cameron
2016-03-31 8:15 ` Linus Walleij
2016-03-31 8:15 ` Linus Walleij
2016-04-03 9:33 ` Jonathan Cameron [this message]
2016-04-03 9:33 ` Jonathan Cameron
2016-03-28 3:42 ` [PATCH 1/4] iio: st_sensors: simplify buffer address handling Denis Ciocca
2016-03-28 7:52 ` Jonathan Cameron
2016-03-28 8:16 ` Denis Ciocca
2016-03-28 8:27 ` Jonathan Cameron
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=5700E36A.6080608@kernel.org \
--to=jic23@kernel.org \
--cc=denis.ciocca@st.com \
--cc=devicetree@vger.kernel.org \
--cc=giuseppe.barba@st.com \
--cc=linus.walleij@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.