From: Barry Song <21cnbao@gmail.com> To: Linus Walleij <linus.walleij@linaro.org> Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, DL-SHA-WorkGroupLinux <workgroup.linux@csr.com>, Barry Song <Baohua.Song@csr.com> Subject: Re: [PATCH 4/4] pinctrl: sirf: move to use irq_get_handler_data Date: Thu, 24 Apr 2014 23:45:44 +0800 [thread overview] Message-ID: <CAGsJ_4zBC6wkRVwLWs4i3Vav-+CXJmVNp4cRbeLm-5KtzqohDA@mail.gmail.com> (raw) In-Reply-To: <CACRpkdYz+JdAbhdR_s9h4m_3JNcpLo-2VzoXYoEd21myB4yZtg@mail.gmail.com> 2014-04-24 20:59 GMT+08:00, Linus Walleij <linus.walleij@linaro.org>: > On Thu, Apr 24, 2014 at 12:59 AM, Barry Song <21cnbao@gmail.com> wrote: > >>> If you want to use some other handler data than the gpiochip, >>> you should just use irq_set_chained_handler() and >>> irq_set_handler_data() directly. >> >> i think this should be fixed in the general API but not use one more >> function call to over-write the handler_data which has been filled in >> the API. >> since we have the chance for drivers to set either the whole chip for >> a simple chip, or bank-specific data for a chip which has multiple >> parent IRQs. > > I don't think it's worth it for saving one line. The helper is intended > for the simple case, i.e. where it's enough to just get the gpio_chip > as handler data. Other alternatives need to be open coded. > gpiochip_set_chained_irqchip() only save one line for simple gpiochip too. it is not worth as well. people can realize what he should set as irq_handler. > I'm even considering removing this helper if it's confusing, it doesn't > really add much, gpiochip_irqchip_add() is the important function > to use, not gpiochip_set_chained_irqchip(). > > Yours, > Linus Walleij -barry
WARNING: multiple messages have this Message-ID (diff)
From: 21cnbao@gmail.com (Barry Song) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/4] pinctrl: sirf: move to use irq_get_handler_data Date: Thu, 24 Apr 2014 23:45:44 +0800 [thread overview] Message-ID: <CAGsJ_4zBC6wkRVwLWs4i3Vav-+CXJmVNp4cRbeLm-5KtzqohDA@mail.gmail.com> (raw) In-Reply-To: <CACRpkdYz+JdAbhdR_s9h4m_3JNcpLo-2VzoXYoEd21myB4yZtg@mail.gmail.com> 2014-04-24 20:59 GMT+08:00, Linus Walleij <linus.walleij@linaro.org>: > On Thu, Apr 24, 2014 at 12:59 AM, Barry Song <21cnbao@gmail.com> wrote: > >>> If you want to use some other handler data than the gpiochip, >>> you should just use irq_set_chained_handler() and >>> irq_set_handler_data() directly. >> >> i think this should be fixed in the general API but not use one more >> function call to over-write the handler_data which has been filled in >> the API. >> since we have the chance for drivers to set either the whole chip for >> a simple chip, or bank-specific data for a chip which has multiple >> parent IRQs. > > I don't think it's worth it for saving one line. The helper is intended > for the simple case, i.e. where it's enough to just get the gpio_chip > as handler data. Other alternatives need to be open coded. > gpiochip_set_chained_irqchip() only save one line for simple gpiochip too. it is not worth as well. people can realize what he should set as irq_handler. > I'm even considering removing this helper if it's confusing, it doesn't > really add much, gpiochip_irqchip_add() is the important function > to use, not gpiochip_set_chained_irqchip(). > > Yours, > Linus Walleij -barry
next prev parent reply other threads:[~2014-04-24 15:45 UTC|newest] Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-04-15 6:43 [PATCH 0/4] pinctrl: sirf: switch to one gpiolib and gpiolib_irqchip helpers Barry Song 2014-04-15 6:43 ` Barry Song 2014-04-15 6:43 ` [PATCH 1/4] pinctrl: sirf: wrap all gpio banks into one gpio_chip Barry Song 2014-04-15 6:43 ` Barry Song 2014-04-22 18:27 ` Linus Walleij 2014-04-22 18:27 ` Linus Walleij 2014-04-23 20:03 ` Linus Walleij 2014-04-23 20:03 ` Linus Walleij 2014-04-15 6:43 ` [PATCH 2/4] pinctrl: sirf: switch driver to use gpiolib irqchip helpers Barry Song 2014-04-15 6:43 ` Barry Song 2014-04-23 20:04 ` Linus Walleij 2014-04-23 20:04 ` Linus Walleij 2014-04-15 6:43 ` [PATCH 3/4] gpio: make handler_data configurable while using gpiolib_irqchip Barry Song 2014-04-15 6:43 ` Barry Song 2014-04-23 20:13 ` Linus Walleij 2014-04-23 20:13 ` Linus Walleij 2014-04-23 22:55 ` Barry Song 2014-04-23 22:55 ` Barry Song 2014-04-23 23:09 ` Linus Walleij 2014-04-23 23:09 ` Linus Walleij 2014-04-23 23:23 ` Barry Song 2014-04-23 23:23 ` Barry Song 2014-04-24 13:06 ` Linus Walleij 2014-04-24 13:06 ` Linus Walleij 2014-04-24 15:43 ` Barry Song 2014-04-24 15:43 ` Barry Song 2014-04-15 6:43 ` [PATCH 4/4] pinctrl: sirf: move to use irq_get_handler_data Barry Song 2014-04-15 6:43 ` Barry Song 2014-04-23 20:17 ` Linus Walleij 2014-04-23 20:17 ` Linus Walleij 2014-04-23 22:59 ` Barry Song 2014-04-23 22:59 ` Barry Song 2014-04-24 12:59 ` Linus Walleij 2014-04-24 12:59 ` Linus Walleij 2014-04-24 15:45 ` Barry Song [this message] 2014-04-24 15:45 ` Barry Song 2014-04-16 9:54 ` [PATCH 0/4] pinctrl: sirf: switch to one gpiolib and gpiolib_irqchip helpers Javier Martinez Canillas 2014-04-16 9:54 ` Javier Martinez Canillas 2014-04-16 10:05 ` Barry Song 2014-04-16 10:05 ` Barry Song 2014-04-16 10:20 ` Javier Martinez Canillas 2014-04-16 10:20 ` Javier Martinez Canillas 2014-04-22 21:47 ` Linus Walleij 2014-04-22 21:47 ` Linus Walleij 2014-04-23 12:09 ` Barry Song 2014-04-23 12:09 ` Barry Song 2014-04-23 20:02 ` Linus Walleij 2014-04-23 20:02 ` Linus Walleij
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=CAGsJ_4zBC6wkRVwLWs4i3Vav-+CXJmVNp4cRbeLm-5KtzqohDA@mail.gmail.com \ --to=21cnbao@gmail.com \ --cc=Baohua.Song@csr.com \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-gpio@vger.kernel.org \ --cc=workgroup.linux@csr.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: linkBe 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.