Re: [PATCH v2 3/7] pwm: rockchip: Remove the dumplicate rockchip_pwm_ops ops

2017-08-08 Thread David.Wu
Hi Boris, 在 2017/8/4 15:09, Boris Brezillon 写道: On Fri, 4 Aug 2017 10:38:26 +0800 "David.Wu" wrote: Hi Boris, 在 2017/8/2 19:40, Boris Brezillon 写道: Yep, just define 3 different pwm_ops (one for each IP), each of them implementing ->apply() and ->get_state() and

Re: [PATCH v2 3/7] pwm: rockchip: Remove the dumplicate rockchip_pwm_ops ops

2017-08-08 Thread David.Wu
Hi Boris, 在 2017/8/4 15:09, Boris Brezillon 写道: On Fri, 4 Aug 2017 10:38:26 +0800 "David.Wu" wrote: Hi Boris, 在 2017/8/2 19:40, Boris Brezillon 写道: Yep, just define 3 different pwm_ops (one for each IP), each of them implementing ->apply() and ->get_state() and that's all. Something like:

Re: [PATCH v2 3/7] pwm: rockchip: Remove the dumplicate rockchip_pwm_ops ops

2017-08-04 Thread Boris Brezillon
On Fri, 4 Aug 2017 10:38:26 +0800 "David.Wu" wrote: > Hi Boris, > > 在 2017/8/2 19:40, Boris Brezillon 写道: > > Yep, just define 3 different pwm_ops (one for each IP), each of them > > implementing ->apply() and ->get_state() and that's all. > > > > Something like: > >

Re: [PATCH v2 3/7] pwm: rockchip: Remove the dumplicate rockchip_pwm_ops ops

2017-08-04 Thread Boris Brezillon
On Fri, 4 Aug 2017 10:38:26 +0800 "David.Wu" wrote: > Hi Boris, > > 在 2017/8/2 19:40, Boris Brezillon 写道: > > Yep, just define 3 different pwm_ops (one for each IP), each of them > > implementing ->apply() and ->get_state() and that's all. > > > > Something like: > > > > static const struct

Re: [PATCH v2 3/7] pwm: rockchip: Remove the dumplicate rockchip_pwm_ops ops

2017-08-03 Thread David.Wu
Hi Boris, 在 2017/8/2 19:40, Boris Brezillon 写道: Yep, just define 3 different pwm_ops (one for each IP), each of them implementing ->apply() and ->get_state() and that's all. Something like: static const struct pwm_ops rockchip_pwm_ops_v1 = { .get_state = rockchip_pwm_v1_get_state,

Re: [PATCH v2 3/7] pwm: rockchip: Remove the dumplicate rockchip_pwm_ops ops

2017-08-03 Thread David.Wu
Hi Boris, 在 2017/8/2 19:40, Boris Brezillon 写道: Yep, just define 3 different pwm_ops (one for each IP), each of them implementing ->apply() and ->get_state() and that's all. Something like: static const struct pwm_ops rockchip_pwm_ops_v1 = { .get_state = rockchip_pwm_v1_get_state,

Re: [PATCH v2 3/7] pwm: rockchip: Remove the dumplicate rockchip_pwm_ops ops

2017-08-02 Thread Boris Brezillon
On Wed, 2 Aug 2017 19:31:57 +0800 "David.Wu" wrote: > Hi Boris, > > 在 2017/8/2 16:59, Boris Brezillon 写道: > > Actually, when I suggested to just implement ->apply_state() and be > > done with all other fields I was thinking that you could get rid of > > this

Re: [PATCH v2 3/7] pwm: rockchip: Remove the dumplicate rockchip_pwm_ops ops

2017-08-02 Thread Boris Brezillon
On Wed, 2 Aug 2017 19:31:57 +0800 "David.Wu" wrote: > Hi Boris, > > 在 2017/8/2 16:59, Boris Brezillon 写道: > > Actually, when I suggested to just implement ->apply_state() and be > > done with all other fields I was thinking that you could get rid of > > this rockchip_pwm_data struct entirely

Re: [PATCH v2 3/7] pwm: rockchip: Remove the dumplicate rockchip_pwm_ops ops

2017-08-02 Thread David.Wu
Hi Boris, 在 2017/8/2 16:59, Boris Brezillon 写道: Actually, when I suggested to just implement ->apply_state() and be done with all other fields I was thinking that you could get rid of this rockchip_pwm_data struct entirely and just have 3 different pwm_ops. You seem to take the other direction

Re: [PATCH v2 3/7] pwm: rockchip: Remove the dumplicate rockchip_pwm_ops ops

2017-08-02 Thread David.Wu
Hi Boris, 在 2017/8/2 16:59, Boris Brezillon 写道: Actually, when I suggested to just implement ->apply_state() and be done with all other fields I was thinking that you could get rid of this rockchip_pwm_data struct entirely and just have 3 different pwm_ops. You seem to take the other direction

Re: [PATCH v2 3/7] pwm: rockchip: Remove the dumplicate rockchip_pwm_ops ops

2017-08-02 Thread Boris Brezillon
On Sat, 8 Jul 2017 12:03:45 +0800 David Wu wrote: > The rockchip_pwm_ops_v1 and rockchip_pwm_ops_v2 ops are the same > struct members, remove one of them. > > Signed-off-by: David Wu > --- > drivers/pwm/pwm-rockchip.c | 14 -- > 1

Re: [PATCH v2 3/7] pwm: rockchip: Remove the dumplicate rockchip_pwm_ops ops

2017-08-02 Thread Boris Brezillon
On Sat, 8 Jul 2017 12:03:45 +0800 David Wu wrote: > The rockchip_pwm_ops_v1 and rockchip_pwm_ops_v2 ops are the same > struct members, remove one of them. > > Signed-off-by: David Wu > --- > drivers/pwm/pwm-rockchip.c | 14 -- > 1 file changed, 4 insertions(+), 10 deletions(-) >

[PATCH v2 3/7] pwm: rockchip: Remove the dumplicate rockchip_pwm_ops ops

2017-07-07 Thread David Wu
The rockchip_pwm_ops_v1 and rockchip_pwm_ops_v2 ops are the same struct members, remove one of them. Signed-off-by: David Wu --- drivers/pwm/pwm-rockchip.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/pwm/pwm-rockchip.c

[PATCH v2 3/7] pwm: rockchip: Remove the dumplicate rockchip_pwm_ops ops

2017-07-07 Thread David Wu
The rockchip_pwm_ops_v1 and rockchip_pwm_ops_v2 ops are the same struct members, remove one of them. Signed-off-by: David Wu --- drivers/pwm/pwm-rockchip.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c