* pxa-devel back-merge / cherry pick request @ 2010-05-31 11:48 Daniel Mack 2010-05-31 12:47 ` Russell King - ARM Linux ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Daniel Mack @ 2010-05-31 11:48 UTC (permalink / raw) To: linux-arm-kernel Hi Eric, Is there any plans to merge Linus' tree into your pxa-devel any time soon? I'm asking because I have one patch pending which depends on a3bcbbee ("pda_power: Add function callbacks for suspend and resume") upstream. Alternatively, could you cherry-pick this one commit? Thanks, Daniel ^ permalink raw reply [flat|nested] 11+ messages in thread
* pxa-devel back-merge / cherry pick request 2010-05-31 11:48 pxa-devel back-merge / cherry pick request Daniel Mack @ 2010-05-31 12:47 ` Russell King - ARM Linux 2010-05-31 13:13 ` Daniel Mack 2010-05-31 12:57 ` Nicolas Pitre 2010-05-31 13:25 ` Eric Miao 2 siblings, 1 reply; 11+ messages in thread From: Russell King - ARM Linux @ 2010-05-31 12:47 UTC (permalink / raw) To: linux-arm-kernel On Mon, May 31, 2010 at 01:48:16PM +0200, Daniel Mack wrote: > Hi Eric, > > Is there any plans to merge Linus' tree into your pxa-devel any time > soon? I'm asking because I have one patch pending which depends on > > a3bcbbee ("pda_power: Add function callbacks for suspend and resume") > > upstream. Alternatively, could you cherry-pick this one commit? Please don't cherry-pick commits back into branches which will eventually find their way back into mainline. ^ permalink raw reply [flat|nested] 11+ messages in thread
* pxa-devel back-merge / cherry pick request 2010-05-31 12:47 ` Russell King - ARM Linux @ 2010-05-31 13:13 ` Daniel Mack 2010-05-31 13:22 ` Mark Brown 0 siblings, 1 reply; 11+ messages in thread From: Daniel Mack @ 2010-05-31 13:13 UTC (permalink / raw) To: linux-arm-kernel On Mon, May 31, 2010 at 01:47:50PM +0100, Russell King - ARM Linux wrote: > On Mon, May 31, 2010 at 01:48:16PM +0200, Daniel Mack wrote: > > Hi Eric, > > > > Is there any plans to merge Linus' tree into your pxa-devel any time > > soon? I'm asking because I have one patch pending which depends on > > > > a3bcbbee ("pda_power: Add function callbacks for suspend and resume") > > > > upstream. Alternatively, could you cherry-pick this one commit? > > Please don't cherry-pick commits back into branches which will eventually > find their way back into mainline. Hmm, ok just wait for the back-merge then. It's just that one single commit and not an urgent fix. Just out of interest - why would cherry-picking be frowned upon? Shouldn't git just ignore the commits it already knows when things are pulled? Thanks, Daniel ^ permalink raw reply [flat|nested] 11+ messages in thread
* pxa-devel back-merge / cherry pick request 2010-05-31 13:13 ` Daniel Mack @ 2010-05-31 13:22 ` Mark Brown 2010-05-31 13:25 ` Daniel Mack 2010-05-31 14:26 ` Russell King - ARM Linux 0 siblings, 2 replies; 11+ messages in thread From: Mark Brown @ 2010-05-31 13:22 UTC (permalink / raw) To: linux-arm-kernel On Mon, May 31, 2010 at 03:13:17PM +0200, Daniel Mack wrote: > Just out of interest - why would cherry-picking be frowned upon? > Shouldn't git just ignore the commits it already knows when things are > pulled? No, git is content based. The merge should be a noop merge if the two sides end up being the same but you still end up with two different copies of the change in history. ^ permalink raw reply [flat|nested] 11+ messages in thread
* pxa-devel back-merge / cherry pick request 2010-05-31 13:22 ` Mark Brown @ 2010-05-31 13:25 ` Daniel Mack 2010-05-31 14:26 ` Russell King - ARM Linux 1 sibling, 0 replies; 11+ messages in thread From: Daniel Mack @ 2010-05-31 13:25 UTC (permalink / raw) To: linux-arm-kernel On Mon, May 31, 2010 at 02:22:34PM +0100, Mark Brown wrote: > On Mon, May 31, 2010 at 03:13:17PM +0200, Daniel Mack wrote: > > > Just out of interest - why would cherry-picking be frowned upon? > > Shouldn't git just ignore the commits it already knows when things are > > pulled? > > No, git is content based. The merge should be a noop merge if the two > sides end up being the same but you still end up with two different > copies of the change in history. Ah, the commit won't have the same ID anymore after it is cherry-picked, of course. That makes sense. Thanks for explaining. Daniel ^ permalink raw reply [flat|nested] 11+ messages in thread
* pxa-devel back-merge / cherry pick request 2010-05-31 13:22 ` Mark Brown 2010-05-31 13:25 ` Daniel Mack @ 2010-05-31 14:26 ` Russell King - ARM Linux 1 sibling, 0 replies; 11+ messages in thread From: Russell King - ARM Linux @ 2010-05-31 14:26 UTC (permalink / raw) To: linux-arm-kernel On Mon, May 31, 2010 at 02:22:34PM +0100, Mark Brown wrote: > On Mon, May 31, 2010 at 03:13:17PM +0200, Daniel Mack wrote: > > > Just out of interest - why would cherry-picking be frowned upon? > > Shouldn't git just ignore the commits it already knows when things are > > pulled? > > No, git is content based. The merge should be a noop merge if the two > sides end up being the same but you still end up with two different > copies of the change in history. Sometimes it actually causes merge conflicts if there are changes in the same part of the file as the picked patch touches which aren't also cherry-picked. It's best to avoid cherry-picking commits into two different git threads and then try to merge them. ^ permalink raw reply [flat|nested] 11+ messages in thread
* pxa-devel back-merge / cherry pick request 2010-05-31 11:48 pxa-devel back-merge / cherry pick request Daniel Mack 2010-05-31 12:47 ` Russell King - ARM Linux @ 2010-05-31 12:57 ` Nicolas Pitre 2010-05-31 13:25 ` Eric Miao 2 siblings, 0 replies; 11+ messages in thread From: Nicolas Pitre @ 2010-05-31 12:57 UTC (permalink / raw) To: linux-arm-kernel On Mon, 31 May 2010, Daniel Mack wrote: > Hi Eric, > > Is there any plans to merge Linus' tree into your pxa-devel any time > soon? I'm asking because I have one patch pending which depends on > > a3bcbbee ("pda_power: Add function callbacks for suspend and resume") > > upstream. Alternatively, could you cherry-pick this one commit? Even better is for you to fork a branch starting at that particular commit, apply your patch on top, then ask Eric to pull it. Nicolas ^ permalink raw reply [flat|nested] 11+ messages in thread
* pxa-devel back-merge / cherry pick request 2010-05-31 11:48 pxa-devel back-merge / cherry pick request Daniel Mack 2010-05-31 12:47 ` Russell King - ARM Linux 2010-05-31 12:57 ` Nicolas Pitre @ 2010-05-31 13:25 ` Eric Miao 2010-05-31 14:02 ` [PATCH] ARM: pxa/raumfeld: check charge state after resume Daniel Mack 2010-05-31 14:29 ` pxa-devel back-merge / cherry pick request Russell King - ARM Linux 2 siblings, 2 replies; 11+ messages in thread From: Eric Miao @ 2010-05-31 13:25 UTC (permalink / raw) To: linux-arm-kernel On Mon, May 31, 2010 at 7:48 PM, Daniel Mack <daniel@caiaq.de> wrote: > Hi Eric, > > Is there any plans to merge Linus' tree into your pxa-devel any time > soon? I'm asking because I have one patch pending which depends on > > ?a3bcbbee ("pda_power: Add function callbacks for suspend and resume") > > upstream. Alternatively, could you cherry-pick this one commit? > 'devel' branch rebased and pushed. Normally I rebase before sending git pull request to Russell. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] ARM: pxa/raumfeld: check charge state after resume 2010-05-31 13:25 ` Eric Miao @ 2010-05-31 14:02 ` Daniel Mack 2010-05-31 15:02 ` Eric Miao 2010-05-31 14:29 ` pxa-devel back-merge / cherry pick request Russell King - ARM Linux 1 sibling, 1 reply; 11+ messages in thread From: Daniel Mack @ 2010-05-31 14:02 UTC (permalink / raw) To: linux-arm-kernel Use the resume callback of the pda_power supply framework to check for a 'charge finished' event that might have occured during the sleep phase. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Eric Miao <eric.y.miao@gmail.com> --- arch/arm/mach-pxa/raumfeld.c | 29 +++++++++++++++++++++-------- 1 files changed, 21 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 1c8cd39..7582a12 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c @@ -750,13 +750,32 @@ static int raumfeld_is_usb_online(void) static char *raumfeld_power_supplicants[] = { "ds2760-battery.0" }; +static void raumfeld_power_signal_charged(void) +{ + struct power_supply *psy = + power_supply_get_by_name(raumfeld_power_supplicants[0]); + + if (psy) + power_supply_set_battery_charged(psy); +} + +static int raumfeld_power_resume(void) +{ + /* check if GPIO_CHARGE_DONE went low while we were sleeping */ + if (!gpio_get_value(GPIO_CHARGE_DONE)) + raumfeld_power_signal_charged(); + + return 0; +} + static struct pda_power_pdata power_supply_info = { .init = power_supply_init, .is_ac_online = raumfeld_is_ac_online, .is_usb_online = raumfeld_is_usb_online, .exit = power_supply_exit, .supplied_to = raumfeld_power_supplicants, - .num_supplicants = ARRAY_SIZE(raumfeld_power_supplicants) + .num_supplicants = ARRAY_SIZE(raumfeld_power_supplicants), + .resume = raumfeld_power_resume, }; static struct resource power_supply_resources[] = { @@ -771,13 +790,7 @@ static struct resource power_supply_resources[] = { static irqreturn_t charge_done_irq(int irq, void *dev_id) { - struct power_supply *psy; - - psy = power_supply_get_by_name("ds2760-battery.0"); - - if (psy) - power_supply_set_battery_charged(psy); - + raumfeld_power_signal_charged(); return IRQ_HANDLED; } -- 1.7.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH] ARM: pxa/raumfeld: check charge state after resume 2010-05-31 14:02 ` [PATCH] ARM: pxa/raumfeld: check charge state after resume Daniel Mack @ 2010-05-31 15:02 ` Eric Miao 0 siblings, 0 replies; 11+ messages in thread From: Eric Miao @ 2010-05-31 15:02 UTC (permalink / raw) To: linux-arm-kernel On Mon, May 31, 2010 at 10:02 PM, Daniel Mack <daniel@caiaq.de> wrote: > Use the resume callback of the pda_power supply framework to check for a > 'charge finished' event that might have occured during the sleep phase. > > Signed-off-by: Daniel Mack <daniel@caiaq.de> > Cc: Eric Miao <eric.y.miao@gmail.com> Applied. > --- > ?arch/arm/mach-pxa/raumfeld.c | ? 29 +++++++++++++++++++++-------- > ?1 files changed, 21 insertions(+), 8 deletions(-) > > diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c > index 1c8cd39..7582a12 100644 > --- a/arch/arm/mach-pxa/raumfeld.c > +++ b/arch/arm/mach-pxa/raumfeld.c > @@ -750,13 +750,32 @@ static int raumfeld_is_usb_online(void) > > ?static char *raumfeld_power_supplicants[] = { "ds2760-battery.0" }; > > +static void raumfeld_power_signal_charged(void) > +{ > + ? ? ? struct power_supply *psy = > + ? ? ? ? ? ? ? power_supply_get_by_name(raumfeld_power_supplicants[0]); > + > + ? ? ? if (psy) > + ? ? ? ? ? ? ? power_supply_set_battery_charged(psy); > +} > + > +static int raumfeld_power_resume(void) > +{ > + ? ? ? /* check if GPIO_CHARGE_DONE went low while we were sleeping */ > + ? ? ? if (!gpio_get_value(GPIO_CHARGE_DONE)) > + ? ? ? ? ? ? ? raumfeld_power_signal_charged(); > + > + ? ? ? return 0; > +} > + > ?static struct pda_power_pdata power_supply_info = { > ? ? ? ?.init ? ? ? ? ? ? ? ? ? = power_supply_init, > ? ? ? ?.is_ac_online ? ? ? ? ? = raumfeld_is_ac_online, > ? ? ? ?.is_usb_online ? ? ? ? ?= raumfeld_is_usb_online, > ? ? ? ?.exit ? ? ? ? ? ? ? ? ? = power_supply_exit, > ? ? ? ?.supplied_to ? ? ? ? ? ?= raumfeld_power_supplicants, > - ? ? ? .num_supplicants ? ? ? ?= ARRAY_SIZE(raumfeld_power_supplicants) > + ? ? ? .num_supplicants ? ? ? ?= ARRAY_SIZE(raumfeld_power_supplicants), > + ? ? ? .resume ? ? ? ? ? ? ? ? = raumfeld_power_resume, > ?}; > > ?static struct resource power_supply_resources[] = { > @@ -771,13 +790,7 @@ static struct resource power_supply_resources[] = { > > ?static irqreturn_t charge_done_irq(int irq, void *dev_id) > ?{ > - ? ? ? struct power_supply *psy; > - > - ? ? ? psy = power_supply_get_by_name("ds2760-battery.0"); > - > - ? ? ? if (psy) > - ? ? ? ? ? ? ? power_supply_set_battery_charged(psy); > - > + ? ? ? raumfeld_power_signal_charged(); > ? ? ? ?return IRQ_HANDLED; > ?} > > -- > 1.7.1 > > ^ permalink raw reply [flat|nested] 11+ messages in thread
* pxa-devel back-merge / cherry pick request 2010-05-31 13:25 ` Eric Miao 2010-05-31 14:02 ` [PATCH] ARM: pxa/raumfeld: check charge state after resume Daniel Mack @ 2010-05-31 14:29 ` Russell King - ARM Linux 1 sibling, 0 replies; 11+ messages in thread From: Russell King - ARM Linux @ 2010-05-31 14:29 UTC (permalink / raw) To: linux-arm-kernel On Mon, May 31, 2010 at 09:25:07PM +0800, Eric Miao wrote: > On Mon, May 31, 2010 at 7:48 PM, Daniel Mack <daniel@caiaq.de> wrote: > > Hi Eric, > > > > Is there any plans to merge Linus' tree into your pxa-devel any time > > soon? I'm asking because I have one patch pending which depends on > > > > ?a3bcbbee ("pda_power: Add function callbacks for suspend and resume") > > > > upstream. Alternatively, could you cherry-pick this one commit? > > > > 'devel' branch rebased and pushed. Normally I rebase before sending > git pull request to Russell. It's best to avoid rebasing altogether unless there is a good reason to do so. If you want to make a decision about whether to rebase, one way to do it is to create a test branch/tree, and try merging your selected rebase point in - if it conflicts then you know when the original branch is merged it'll have problems. ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-05-31 15:02 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-05-31 11:48 pxa-devel back-merge / cherry pick request Daniel Mack 2010-05-31 12:47 ` Russell King - ARM Linux 2010-05-31 13:13 ` Daniel Mack 2010-05-31 13:22 ` Mark Brown 2010-05-31 13:25 ` Daniel Mack 2010-05-31 14:26 ` Russell King - ARM Linux 2010-05-31 12:57 ` Nicolas Pitre 2010-05-31 13:25 ` Eric Miao 2010-05-31 14:02 ` [PATCH] ARM: pxa/raumfeld: check charge state after resume Daniel Mack 2010-05-31 15:02 ` Eric Miao 2010-05-31 14:29 ` pxa-devel back-merge / cherry pick request Russell King - ARM Linux
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).