From: Peter Rosin <peda-koto5C5qi+TLoDKTGw+V6w@public.gmane.org> To: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>, Alexandre Courbot <gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Subject: Re: [PATCH v2 3/3] power: supply: bq24735-charger: allow chargers to share the ac-detect gpio Date: Wed, 14 Dec 2016 18:41:00 +0100 [thread overview] Message-ID: <e1667d9d-17bf-2fe5-8a65-af73b6507cbd@axentia.se> (raw) In-Reply-To: <20161214170114.ckozfple475kqajh@earth> On 2016-12-14 18:01, Sebastian Reichel wrote: > [of course I forgot to actually add gpio people, let's try again] > > On Wed, Dec 14, 2016 at 05:59:21PM +0100, Sebastian Reichel wrote: >> Hi, >> >> On Wed, Dec 14, 2016 at 12:56:45AM +0100, Peter Rosin wrote: >>> If several parallel bq24735 chargers have their ac-detect gpios wired >>> together (or if only one of the parallel bq24735 chargers have its >>> ac-detect pin wired to a gpio, and the others are assumed to react the >>> same), then all driver instances need to check the same gpio. But the >>> gpio subsystem does not allow sharing gpios, so handle that locally. >> >> Adding GPIO subsystem people to see if they can come up with >> something in the gpiod API for this usecase. Right, I don't like how my new code steps away from gpio descriptors. >>> However, only do this for the polling case, sharing is not supported if >>> the ac detection is handled with interrupts. >> >> Why? I guess you only added the gpio polling stuff for the shared >> gpio feature, so we can skip the gpio polling if we add shared irq >> support instead? Nope, the hw really can't do interrupts on the gpio, it's just not wired up for that. The gpio is on an expander, and the irq line from the expander top the cpu is not there (due to a desire to minimize the number of connections between two parts of the system). So I need both polling and sharing. Cheers, peda -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Peter Rosin <peda@axentia.se> To: Sebastian Reichel <sre@kernel.org>, Linus Walleij <linus.walleij@linaro.org>, Alexandre Courbot <gnurou@gmail.com> Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH v2 3/3] power: supply: bq24735-charger: allow chargers to share the ac-detect gpio Date: Wed, 14 Dec 2016 18:41:00 +0100 [thread overview] Message-ID: <e1667d9d-17bf-2fe5-8a65-af73b6507cbd@axentia.se> (raw) In-Reply-To: <20161214170114.ckozfple475kqajh@earth> On 2016-12-14 18:01, Sebastian Reichel wrote: > [of course I forgot to actually add gpio people, let's try again] > > On Wed, Dec 14, 2016 at 05:59:21PM +0100, Sebastian Reichel wrote: >> Hi, >> >> On Wed, Dec 14, 2016 at 12:56:45AM +0100, Peter Rosin wrote: >>> If several parallel bq24735 chargers have their ac-detect gpios wired >>> together (or if only one of the parallel bq24735 chargers have its >>> ac-detect pin wired to a gpio, and the others are assumed to react the >>> same), then all driver instances need to check the same gpio. But the >>> gpio subsystem does not allow sharing gpios, so handle that locally. >> >> Adding GPIO subsystem people to see if they can come up with >> something in the gpiod API for this usecase. Right, I don't like how my new code steps away from gpio descriptors. >>> However, only do this for the polling case, sharing is not supported if >>> the ac detection is handled with interrupts. >> >> Why? I guess you only added the gpio polling stuff for the shared >> gpio feature, so we can skip the gpio polling if we add shared irq >> support instead? Nope, the hw really can't do interrupts on the gpio, it's just not wired up for that. The gpio is on an expander, and the irq line from the expander top the cpu is not there (due to a desire to minimize the number of connections between two parts of the system). So I need both polling and sharing. Cheers, peda
next prev parent reply other threads:[~2016-12-14 17:41 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-12-13 23:56 [PATCH v2 0/3] bq24735-charger: allow gpio polling and sharing Peter Rosin 2016-12-13 23:56 ` [PATCH v2 1/3] power: supply: bq24735-charger: simplify register update to stop charging Peter Rosin 2016-12-14 16:41 ` Sebastian Reichel 2016-12-13 23:56 ` [PATCH v2 2/3] power: supply: bq24735-charger: optionally poll the ac-detect gpio Peter Rosin 2016-12-14 15:10 ` Sebastian Reichel 2016-12-15 9:28 ` [PATCH v3] " Peter Rosin 2016-12-15 9:28 ` Peter Rosin 2016-12-17 15:04 ` Sebastian Reichel 2016-12-17 15:04 ` Sebastian Reichel 2016-12-19 22:16 ` Rob Herring 2016-12-13 23:56 ` [PATCH v2 3/3] power: supply: bq24735-charger: allow chargers to share " Peter Rosin 2016-12-14 16:59 ` Sebastian Reichel 2016-12-14 17:01 ` Sebastian Reichel 2016-12-14 17:41 ` Peter Rosin [this message] 2016-12-14 17:41 ` Peter Rosin 2016-12-30 7:49 ` Linus Walleij 2017-01-02 8:31 ` Peter Rosin 2017-01-09 18:55 ` 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=e1667d9d-17bf-2fe5-8a65-af73b6507cbd@axentia.se \ --to=peda-koto5c5qi+tlodktgw+v6w@public.gmane.org \ --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \ --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \ --cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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: 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.