Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-09 Thread Sean Young
On Mon, Jan 09, 2017 at 11:13:21AM +0800, Sean Wang wrote: > I had another question. I found multiple and same IR messages being > received when using SONY remote controller. Should driver needs to > report each message or only one of these to the upper layer ? In general the driver shouldn't try

Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-09 Thread Sean Young
On Mon, Jan 09, 2017 at 11:13:21AM +0800, Sean Wang wrote: > I had another question. I found multiple and same IR messages being > received when using SONY remote controller. Should driver needs to > report each message or only one of these to the upper layer ? In general the driver shouldn't try

Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-08 Thread Sean Wang
On Sun, 2017-01-08 at 21:16 +, Sean Young wrote: > Hi Sean, > > On Fri, Jan 06, 2017 at 03:31:25PM +0800, Sean Wang wrote: > > On Thu, 2017-01-05 at 17:12 +, Sean Young wrote: > > > On Fri, Jan 06, 2017 at 12:06:24AM +0800, sean.w...@mediatek.com wrote: > > > > + /* Handle pulse and

Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-08 Thread Sean Wang
On Sun, 2017-01-08 at 21:16 +, Sean Young wrote: > Hi Sean, > > On Fri, Jan 06, 2017 at 03:31:25PM +0800, Sean Wang wrote: > > On Thu, 2017-01-05 at 17:12 +, Sean Young wrote: > > > On Fri, Jan 06, 2017 at 12:06:24AM +0800, sean.w...@mediatek.com wrote: > > > > + /* Handle pulse and

Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-08 Thread Sean Young
Hi Sean, On Fri, Jan 06, 2017 at 03:31:25PM +0800, Sean Wang wrote: > On Thu, 2017-01-05 at 17:12 +, Sean Young wrote: > > On Fri, Jan 06, 2017 at 12:06:24AM +0800, sean.w...@mediatek.com wrote: > > > + /* Handle pulse and space until end of message */ > > > + for (i = 0 ; i < MTK_CHKDATA_SZ

Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-08 Thread Sean Young
Hi Sean, On Fri, Jan 06, 2017 at 03:31:25PM +0800, Sean Wang wrote: > On Thu, 2017-01-05 at 17:12 +, Sean Young wrote: > > On Fri, Jan 06, 2017 at 12:06:24AM +0800, sean.w...@mediatek.com wrote: > > > + /* Handle pulse and space until end of message */ > > > + for (i = 0 ; i < MTK_CHKDATA_SZ

Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-05 Thread Sean Wang
Hi Andi, Thank for your reminder. I will refine the code based on your work. to have elegant code and easy error handling. Sean On Fri, 2017-01-06 at 12:43 +0900, Andi Shyti wrote: > Hi Sean, > > > + ir->rc = rc_allocate_device(); > > Yes, you should use devm_rc_allocate_device(...) > >

Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-05 Thread Sean Wang
Hi Andi, Thank for your reminder. I will refine the code based on your work. to have elegant code and easy error handling. Sean On Fri, 2017-01-06 at 12:43 +0900, Andi Shyti wrote: > Hi Sean, > > > + ir->rc = rc_allocate_device(); > > Yes, you should use devm_rc_allocate_device(...) > >

Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-05 Thread Sean Wang
Hi Sean, Thanks for your effort for code reviewing. I add comments inline. On Thu, 2017-01-05 at 17:12 +, Sean Young wrote: > Hi Sean, > > Some review comments. > > On Fri, Jan 06, 2017 at 12:06:24AM +0800, sean.w...@mediatek.com wrote: > > From: Sean Wang > > >

Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-05 Thread Sean Wang
Hi Sean, Thanks for your effort for code reviewing. I add comments inline. On Thu, 2017-01-05 at 17:12 +, Sean Young wrote: > Hi Sean, > > Some review comments. > > On Fri, Jan 06, 2017 at 12:06:24AM +0800, sean.w...@mediatek.com wrote: > > From: Sean Wang > > > > This patch adds driver

Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-05 Thread Andi Shyti
Hi Sean, > + ir->rc = rc_allocate_device(); Yes, you should use devm_rc_allocate_device(...) Besides, standing to this patch which is not in yet: https://lkml.org/lkml/2016/12/18/39 rc_allocate_device should provide the driver type during allocation, so it should be: ir->rc =

Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-05 Thread Andi Shyti
Hi Sean, > + ir->rc = rc_allocate_device(); Yes, you should use devm_rc_allocate_device(...) Besides, standing to this patch which is not in yet: https://lkml.org/lkml/2016/12/18/39 rc_allocate_device should provide the driver type during allocation, so it should be: ir->rc =

Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-05 Thread Sean Young
Hi Sean, Some review comments. On Fri, Jan 06, 2017 at 12:06:24AM +0800, sean.w...@mediatek.com wrote: > From: Sean Wang > > This patch adds driver for IR controller on > Mediatek MT7623 SoC. Currently testing successfully > on NEC and SONY remote controller only but it

Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-05 Thread Sean Young
Hi Sean, Some review comments. On Fri, Jan 06, 2017 at 12:06:24AM +0800, sean.w...@mediatek.com wrote: > From: Sean Wang > > This patch adds driver for IR controller on > Mediatek MT7623 SoC. Currently testing successfully > on NEC and SONY remote controller only but it should > work on others

[PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-05 Thread sean.wang
From: Sean Wang This patch adds driver for IR controller on Mediatek MT7623 SoC. Currently testing successfully on NEC and SONY remote controller only but it should work on others (lirc, rc-5 and rc-6). Signed-off-by: Sean Wang ---

[PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-05 Thread sean.wang
From: Sean Wang This patch adds driver for IR controller on Mediatek MT7623 SoC. Currently testing successfully on NEC and SONY remote controller only but it should work on others (lirc, rc-5 and rc-6). Signed-off-by: Sean Wang --- drivers/media/rc/Kconfig | 10 ++