pxa-devel back-merge / cherry pick request
Subsystems (3)
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
Quoted 8 lines · Daniel Mack
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.
Quoted 6 lines · Russell King - ARM Linux
Quoted 5 lines · Daniel Mack
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
Quoted 6 lines
Quoted 3 lines
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
Quoted 3 lines · Daniel Mack
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.
Quoted 9 lines · Mark Brown
Quoted 3 lines · Daniel Mack
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
Quoted 9 lines · Mark Brown
Quoted 3 lines · Daniel Mack
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.
Quoted 8 lines · Daniel Mack
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
Quoted 9 lines · Daniel Mack
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.
PATCH 1/1 ARM: pxa/raumfeld: check charge state after resume
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.
--- arch/arm/mach-pxa/raumfeld.c | 29 +++++++++++++++++++++-------- 1 files changed, 21 insertions(+), 8 deletions(-)
arch/arm/mach-pxa/raumfeld.c +21 -8
@@ -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 ; }
Signature · 1 line
1.7.1
Eric Miao
AppliedPATCH 1/1 ARM: pxa/raumfeld: check charge state after resume
Quoted 5 lines · Daniel Mack
Use the resume callback of the
pda_powersupply framework to check for a 'charge finished' event that might have occured during the sleep phase.Signed-off-by Daniel Mack <[email protected]>Cc Eric Miao <[email protected]>
Applied.
Quoted 61 lines
---
?arch/arm/mach-pxa/raumfeld.c | ? 29 +++++++++++++++++++++-------- ?1 files changed, 21 insertions(+), 8 deletions(-)arch/arm/mach-pxa/raumfeld.c +21
-9@@ -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
Quoted 6 lines · Eric Miao
Quoted 5 lines · Daniel Mack
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
Quoted 7 lines
Quoted 4 lines
?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.