From: Alexander Aring <alex.aring@gmail.com>
To: alex.bluesman.smirnov@gmail.com
Cc: dbaryshkov@gmail.com, linux-zigbee-devel@lists.sourceforge.net,
netdev@vger.kernel.org, stilwellt@openlabs.co
Subject: Re: [PATCH v2 net-next 08/13] at86rf230: rework irq_pol setting
Date: Wed, 2 Jul 2014 18:57:56 +0200 [thread overview]
Message-ID: <20140702165754.GA9506@omega> (raw)
In-Reply-To: <1404313810-30232-9-git-send-email-alex.aring@gmail.com>
Hi,
On Wed, Jul 02, 2014 at 05:10:05PM +0200, Alexander Aring wrote:
> This patch rework the irq_pol register setting for rising and falling
> interrupt settings only. The default behaviour should be rising flag.
>
> Also use IRQ_TYPE_* defines instead of IRQF_* defines. There is no
> functionality change but irq_get_trigger_type returns IRQ_TYPE_* defines.
>
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
> drivers/net/ieee802154/at86rf230.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
> index 492fb7e..2340750 100644
> --- a/drivers/net/ieee802154/at86rf230.c
> +++ b/drivers/net/ieee802154/at86rf230.c
> @@ -1276,7 +1276,7 @@ static struct at86rf2xx_chip_data at86rf212_data = {
>
> static int at86rf230_hw_init(struct at86rf230_local *lp)
> {
> - int rc, irq_pol, irq_type;
> + int rc, irq_pol, irq_type = IRQ_ACTIVE_HIGH;
this should be:
int rc, irq_type, irq_pol = IRQ_ACTIVE_HIGH;
> unsigned int dvdd;
> u8 csma_seed[2];
>
> @@ -1285,11 +1285,8 @@ static int at86rf230_hw_init(struct at86rf230_local *lp)
> return rc;
>
> irq_type = irq_get_trigger_type(lp->spi->irq);
> - /* configure irq polarity, defaults to high active */
> - if (irq_type & (IRQF_TRIGGER_FALLING | IRQF_TRIGGER_LOW))
> - irq_pol = IRQ_ACTIVE_LOW;
> - else
> - irq_pol = IRQ_ACTIVE_HIGH;
> + if (irq_type == IRQ_TYPE_EDGE_FALLING)
> + irq_type = IRQ_ACTIVE_LOW;
and this:
if (irq_type == IRQ_TYPE_EDGE_FALLING)
irq_pol = IRQ_ACTIVE_LOW;
Sorry, I will send a v3.
- Alex
next prev parent reply other threads:[~2014-07-02 16:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-02 15:09 [PATCH v2 net-next 00/13] at86rf230: rework driver implementation Alexander Aring
2014-07-02 15:09 ` [PATCH v2 net-next 01/13] mac802154: at86rf230: add hw flags and merge ops Alexander Aring
2014-07-02 15:09 ` [PATCH v2 net-next 02/13] at86rf230: add regmap support Alexander Aring
2014-07-02 15:10 ` [PATCH v2 net-next 03/13] at86rf230: rework detect device handling Alexander Aring
2014-07-02 15:10 ` [PATCH v2 net-next 05/13] at86rf230: add support for at86rf23x desense Alexander Aring
2014-07-02 15:10 ` [PATCH v2 net-next 08/13] at86rf230: rework irq_pol setting Alexander Aring
2014-07-02 16:57 ` Alexander Aring [this message]
2014-07-02 15:10 ` [PATCH v2 net-next 09/13] at86rf230: rework state change and start/stop Alexander Aring
2014-07-02 15:10 ` [PATCH v2 net-next 10/13] at86rf230: rework reset to trx_off state change Alexander Aring
2014-07-02 15:10 ` [PATCH v2 net-next 12/13] at86rf230: add sleep cycle timing Alexander Aring
[not found] ` <1404313810-30232-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-07-02 15:10 ` [PATCH v2 net-next 04/13] at86rf230: remove is212 and add driver data Alexander Aring
2014-07-02 15:10 ` [PATCH v2 net-next 06/13] at86rf230: rework transmit and receive handling Alexander Aring
2014-07-02 15:10 ` [PATCH v2 net-next 07/13] at86rf230: move RX_SAFE_MODE setting to hw_init Alexander Aring
2014-07-02 15:10 ` [PATCH v2 net-next 11/13] at86rf230: add timing for channel switch Alexander Aring
2014-07-02 15:10 ` [PATCH v2 net-next 13/13] at86rf230: add new author Alexander Aring
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=20140702165754.GA9506@omega \
--to=alex.aring@gmail.com \
--cc=alex.bluesman.smirnov@gmail.com \
--cc=dbaryshkov@gmail.com \
--cc=linux-zigbee-devel@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=stilwellt@openlabs.co \
/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).