edia/rc/keymaps/rc-tango.c
>> new file mode 100644
>> index ..c76651695959
>> --- /dev/null
>> +++ b/drivers/media/rc/keymaps/rc-tango.c
>> @@ -0,0 +1,84 @@
>
> I think you need a header with copyright statement and GPL version(s).
Is this even copyrightable?
--
Måns Rullgård
Marc Gonzalez <marc_gonza...@sigmadesigns.com> writes:
> On 26/09/2017 15:02, Måns Rullgård wrote:
>
>> I could continue nit-picking, but I think this is good enough.
>> Thanks for being patient.
>>
>> Signed-off-by: Mans Rullgard <m...@mansr.com>
>
_base + RC6_CLKDIV);
> +
> + err = devm_request_irq(dev, irq, tango_ir_irq, IRQF_SHARED,
> +dev_name(dev), ir);
> + if (err)
> + goto err_clk;
> +
> + err = devm_rc_register_device(dev, rc);
> + if (err)
> + goto err_clk;
> +
> + platform_set_drvdata(pdev, ir);
> + return 0;
> +
> +err_clk:
> + clk_disable_unprepare(ir->clk);
> + return err;
> +}
> +
> +static int tango_ir_remove(struct platform_device *pdev)
> +{
> + struct tango_ir *ir = platform_get_drvdata(pdev);
> + clk_disable_unprepare(ir->clk);
> + return 0;
> +}
> +
> +static const struct of_device_id tango_ir_dt_ids[] = {
> + { .compatible = "sigma,smp8642-ir" },
> + { }
> +};
> +MODULE_DEVICE_TABLE(of, tango_ir_dt_ids);
> +
> +static struct platform_driver tango_ir_driver = {
> + .probe = tango_ir_probe,
> + .remove = tango_ir_remove,
> + .driver = {
> + .name = DRIVER_NAME,
> + .of_match_table = tango_ir_dt_ids,
> + },
> +};
> +module_platform_driver(tango_ir_driver);
> +
> +MODULE_DESCRIPTION("SMP86xx IR decoder driver");
> +MODULE_AUTHOR("Mans Rullgard <m...@mansr.com>");
> +MODULE_LICENSE("GPL");
> --
> 2.11.0
--
Måns Rullgård
own
state. It is especially important to clear any pending interrupts since
otherwise they'll fire the moment the irq is unmasked and can cause all
sorts of mayhem.
--
Måns Rullgård
Marc Gonzalez <marc_gonza...@sigmadesigns.com> writes:
> On 25/09/2017 16:08, Måns Rullgård wrote:
>
>> Marc Gonzalez writes:
>>
>> Why did you put this way early now? Registering the device should be
>> the last thing you do (LIKE I DID IT, DAMMIT). Oth
omewhat descriptive macros for some things, why did
you skip this magic number?
> + writel_relaxed((clkdiv >> 2) << 18 | clkdiv, ir->rc6_base + RC6_CLKDIV);
> +
> + platform_set_drvdata(pdev, ir);
> +
> + name = dev_name(dev);
> + err = devm_request_irq(dev, irq, tango_ir_irq, IRQF_SHARED, name, ir);
> + if (err)
> + clk_disable_unprepare(ir->clk);
> +
> + return err;
> +}
> +
> +static int tango_ir_remove(struct platform_device *pdev)
> +{
> + struct tango_ir *ir = platform_get_drvdata(pdev);
> + clk_disable_unprepare(ir->clk);
> + return 0;
> +}
> +
> +static const struct of_device_id tango_ir_dt_ids[] = {
> + { .compatible = "sigma,smp8642-ir" },
> + { }
> +};
> +MODULE_DEVICE_TABLE(of, tango_ir_dt_ids);
> +
> +static struct platform_driver tango_ir_driver = {
> + .probe = tango_ir_probe,
> + .remove = tango_ir_remove,
> + .driver = {
> + .name = DRIVER_NAME,
> + .of_match_table = tango_ir_dt_ids,
> + },
> +};
> +module_platform_driver(tango_ir_driver);
> +
> +MODULE_DESCRIPTION("SMP86xx IR decoder driver");
> +MODULE_AUTHOR("Mans Rullgard <m...@mansr.com>");
> +MODULE_LICENSE("GPL");
> --
> 2.11.0
--
Måns Rullgård
Marc Gonzalez <marc_gonza...@sigmadesigns.com> writes:
> On 21/09/2017 17:46, Måns Rullgård wrote:
>
>> Marc Gonzalez writes:
>>
>>> From: Mans Rullgard <m...@mansr.com>
>>>
>>> The tango HW IR decoder supports NEC, RC-5, RC-6 pr
t;>> Signed-off-by: Marc Gonzalez <marc_gonza...@sigmadesigns.com>
>>
>> Missing signed-off-by.
>
> I am aware of that. Hopefully, at some point, Mans will add his.
I will once I'm happy with it. Shouldn't be far off.
--
Måns Rullgård
5_CLK_DIV);
> + writel_relaxed(0x3, ir->rc5_base + IR_INT);
> +
> + clkdiv = clkrate * RC6_TIME_BASE;
> + do_div(clkdiv, RC6_CARRIER);
> +
> + writel_relaxed(0xc000, ir->rc6_base + RC6_CTRL);
> + writel_relaxed((clkdiv >> 2) << 18 | clkdiv, ir->rc6_base + RC6_CLKDIV);
> +
> + platform_set_drvdata(pdev, ir);
> +
> + return 0;
> +}
> +
> +static int tango_ir_remove(struct platform_device *pdev)
> +{
> + struct tango_ir *ir = platform_get_drvdata(pdev);
> + clk_disable_unprepare(ir->clk);
> + return 0;
> +}
> +
> +static const struct of_device_id tango_ir_dt_ids[] = {
> + { .compatible = "sigma,smp8642-ir" },
> + { }
> +};
> +MODULE_DEVICE_TABLE(of, tango_ir_dt_ids);
> +
> +static struct platform_driver tango_ir_driver = {
> + .probe = tango_ir_probe,
> + .remove = tango_ir_remove,
> + .driver = {
> + .name = "tango-ir",
> + .of_match_table = tango_ir_dt_ids,
> + },
> +};
> +module_platform_driver(tango_ir_driver);
> +
> +MODULE_DESCRIPTION("SMP86xx IR decoder driver");
> +MODULE_AUTHOR("Mans Rullgard <m...@mansr.com>");
> +MODULE_LICENSE("GPL");
> --
> 2.11.0
--
Måns Rullgård
Marc Gonzalez <marc_gonza...@sigmadesigns.com> writes:
> + Rob & Mark for the DT bindings question.
>
> On 19/09/2017 14:21, Måns Rullgård wrote:
>
>> Marc Gonzalez writes:
>>
>>> On 18/09/2017 17:33, Måns Rullgård wrote:
>>>
>>>&g
Marc Gonzalez <marc_gonza...@sigmadesigns.com> writes:
> On 18/09/2017 17:33, Måns Rullgård wrote:
>
>> What have you changed compared to my original code?
>
> I forgot to mention one change you may not approve of, so we should
> probably discuss it.
>
> You
Marc Gonzalez <marc_gonza...@sigmadesigns.com> writes:
> On 19/09/2017 11:48, Måns Rullgård wrote:
>
>> Did you test the NEC32 variant? I don't have anything that produces
>> such codes.
>
> I don't have a NEC32 IR remote control either.
>
> IIUC, NEC32 mea
Marc Gonzalez <marc_gonza...@sigmadesigns.com> writes:
> On 18/09/2017 17:33, Måns Rullgård wrote:
>
>> Marc Gonzalez writes:
>>
>>> diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig
>>> index d9ce8ff55d0c..f84923289964 100644
>>&g
o set a From: line for correct attribution. It's not
nice to take other people's code and apparently pass it off as your own
even you've made a few small changes.
--
Måns Rullgård
14 matches
Mail list logo