RE: [PATCH v17 00/12] input: cyapa: instruction of cyapa patches
From: Dudley Du
Date: Tue Jan 13 2015 - 20:34:42 EST
Hi Dmitry, Jeremiah,
Besides the the compile error, do you have any other comments on input cyapa v17 pathces?
Thanks,
Dudley
> -----Original Message-----
> From: Dudley Du
> Sent: 2015å1æ5æ 9:57
> To: 'Jeremiah Mahler'
> Cc: dmitry.torokhov@xxxxxxxxx; rydberg@xxxxxxxxxxx; bleung@xxxxxxxxxx;
> David Solda; linux-input@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: RE: [PATCH v17 00/12] input: cyapa: instruction of cyapa patches
>
> Thanks, Jeremiah.
>
> It seems the power manage code has been updated in kernel-next,
> the same code didn't genereate any error before.
> I updated with latest kernel-next, the compiling error also happened.
> To fix this code, need to add stubs for cyapa_runtime_suspend() and
> cyapa_runtime_resume() when CONFIG_PM_RUNTIME is not defined.
>
> #ifdef CONFIG_PM_RUNTIME
> static int cyapa_runtime_suspend(struct device *dev)
> {
> struct cyapa *cyapa = dev_get_drvdata(dev);
> int error;
>
> error = cyapa->ops->set_power_mode(cyapa,
> cyapa->runtime_suspend_power_mode,
> cyapa->runtime_suspend_sleep_time);
> if (error)
> dev_warn(dev, "runtime suspend failed: %d\n", error);
>
> return 0;
> }
>
> static int cyapa_runtime_resume(struct device *dev)
> {
> struct cyapa *cyapa = dev_get_drvdata(dev);
> int error;
>
> error = cyapa->ops->set_power_mode(cyapa, PWR_MODE_FULL_ACTIVE, 0);
> if (error)
> dev_warn(dev, "runtime resume failed: %d\n", error);
>
> return 0;
> }
> +#else
> +static inline int cyapa_runtime_suspend(struct device *dev) { return 0; }
> +static inline int cyapa_runtime_resume(struct device *dev) { return 0; }
> #endif /* CONFIG_PM_RUNTIME */
>
> static const struct dev_pm_ops cyapa_pm_ops = {
> SET_SYSTEM_SLEEP_PM_OPS(cyapa_suspend, cyapa_resume)
> SET_RUNTIME_PM_OPS(cyapa_runtime_suspend, cyapa_runtime_resume,
> NULL)
> };
>
> Thanks,
> dudley
>
> > -----Original Message-----
> > From: Jeremiah Mahler [mailto:jmmahler@xxxxxxxxx]
> > Sent: 2015å1æ1æ 0:11
> > To: Dudley Du
> > Cc: dmitry.torokhov@xxxxxxxxx; rydberg@xxxxxxxxxxx; bleung@xxxxxxxxxx;
> > David Solda; linux-input@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> > Subject: Re: [PATCH v17 00/12] input: cyapa: instruction of cyapa patches
> >
> > Dudley,
> >
> > On Wed, Dec 31, 2014 at 09:16:49AM +0800, Dudley Du wrote:
> > > V17 patches have below updates, details of other updates see history list:
> > > 1) Fix kernel oops when system booting up with finger on TP.
> > > 2) Remove unnecessary error log that may to system.
> > > 3) Slipt out pm sleep code into cyapa_prepare_wakeup_controls(),
> > > remove #indefs in function body of CONFIG_PM_SLEEP and
> > CONFIG_PM_RUNTIME.
> > > 4) Supply stubs to cyapa_gen3_ops and cyapa_gen5_ops data structure to avoid
> > > checking for presence of various methods in ops.
> > > 6) Fix the meanings of some comments and return error code not clear issue.
> > [...]
> >
> > It has build errors :(
> >
> > CHK include/config/kernel.release
> > CHK include/generated/uapi/linux/version.h
> > CHK include/generated/utsrelease.h
> > CALL scripts/checksyscalls.sh
> > CHK include/generated/compile.h
> > CHK kernel/config_data.h
> > CC [M] drivers/input/mouse/cyapa.o
> > In file included from include/linux/device.h:25:0,
> > from include/linux/i2c.h:30,
> > from drivers/input/mouse/cyapa.c:18:
> > drivers/input/mouse/cyapa.c:1339:21: error: âcyapa_runtime_suspendâ
> > undeclared here (not in a function)
> > SET_RUNTIME_PM_OPS(cyapa_runtime_suspend, cyapa_runtime_resume,
> > NULL)
> > ^
> > include/linux/pm.h:347:21: note: in definition of macro
> âSET_RUNTIME_PM_OPSâ
> > .runtime_suspend = suspend_fn, \
> > ^
> > drivers/input/mouse/cyapa.c:1339:44: error: âcyapa_runtime_resumeâ
> > undeclared here (not in a function)
> > SET_RUNTIME_PM_OPS(cyapa_runtime_suspend, cyapa_runtime_resume,
> > NULL)
> > ^
> > include/linux/pm.h:348:20: note: in definition of macro
> âSET_RUNTIME_PM_OPSâ
> > .runtime_resume = resume_fn, \
> > ^
> > scripts/Makefile.build:257: recipe for target 'drivers/input/mouse/cyapa.o' failed
> > make[3]: *** [drivers/input/mouse/cyapa.o] Error 1
> > scripts/Makefile.build:402: recipe for target 'drivers/input/mouse' failed
> > make[2]: *** [drivers/input/mouse] Error 2
> > scripts/Makefile.build:402: recipe for target 'drivers/input' failed
> > make[1]: *** [drivers/input] Error 2
> > make[1]: *** Waiting for unfinished jobs....
> > Makefile:955: recipe for target 'drivers' failed
> > make: *** [drivers] Error 2
> > make: *** Waiting for unfinished jobs....
> >
> > --
> > - Jeremiah Mahler
This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.
N§²æ¸yú²X¬¶ÇvØ)Þ{.nÇ·¥{±êX§¶¡Ü}©²ÆzÚj:+v¨¾«êZ+Êzf£¢·h§~Ûÿû®w¥¢¸?¨è&¢)ßfùy§m
á«a¶Úÿ0¶ìå