summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/ingenic-ost.c
Commit message (Collapse)AuthorAgeFilesLines
* clocksource/drivers/ingenic-ost: Define pm functions properly in ↵Lukas Bulwahn2022-12-011-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | platform_driver struct Commit ca7b72b5a5f2 ("clocksource: Add driver for the Ingenic JZ47xx OST") adds the struct platform_driver ingenic_ost_driver, with the definition of pm functions under the non-existing config PM_SUSPEND, which means the intended pm functions were never actually included in any build. As the only callbacks are .suspend_noirq and .resume_noirq, we can assume that it is intended to be CONFIG_PM_SLEEP. Since commit 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones"), the default pattern for platform_driver definitions conditional for CONFIG_PM_SLEEP is to use pm_sleep_ptr(). As __maybe_unused annotations on the dev_pm_ops structure and its callbacks are not needed anymore, remove these as well. Suggested-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20221123083159.22821-1-lukas.bulwahn@gmail.com
* clocksource/drivers/ingenic_ost: Fix return value check in ingenic_ost_probe()Wei Yongjun2021-04-081-2/+2
| | | | | | | | | | | | In case of error, the function device_node_to_regmap() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: ca7b72b5a5f2 ("clocksource: Add driver for the Ingenic JZ47xx OST") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210308123031.2285083-1-weiyongjun1@huawei.com
* clocksource/drivers/ingenic-ost: Add support for the JZ4760BPaul Cercueil2021-04-081-2/+3
| | | | | | | | | | The OST in the JZ4760B SoC works exactly the same as in the JZ4770. But since the JZ4760B is older, its Device Tree string does not fall back to the JZ4770 one; so add support for the JZ4760B compatible string here. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210308212302.10288-3-paul@crapouillou.net
* clocksource: Add driver for the Ingenic JZ47xx OSTMaarten ter Huurne2020-02-271-0/+189
OST is the OS Timer, a 64-bit timer/counter with buffered reading. SoCs before the JZ4770 had (if any) a 32-bit OST; the JZ4770 and JZ4780 have a 64-bit OST. This driver will register both a clocksource and a sched_clock to the system. Signed-off-by: Maarten ter Huurne <maarten@treewalker.org> Signed-off-by: Paul Cercueil <paul@crapouillou.net> Tested-by: Mathieu Malaterre <malat@debian.org> Tested-by: Artur Rojek <contact@artur-rojek.eu> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20200212180408.30872-1-paul@crapouillou.net