gpio: dwapb: Use optional-clocks interface for APB ref-clock
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>
Mon, 23 Mar 2020 19:53:59 +0000 (22:53 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 17 Apr 2020 10:29:21 +0000 (12:29 +0200)
commit3ea8094c3b45495a18b75afd27cfda9597bf0e7d
treec3c94994362a028ce2260792e6b23e95f36cfe27
parentc55812afd3954c20c0d06b00ee9271ca6a3d8eab
gpio: dwapb: Use optional-clocks interface for APB ref-clock

The common clocks kernel framework provides a generic way to use
an optional reference clock sources. If it's utilized there is no
need in checking whether the clock descriptor pointer is actually a
negative error at the moment of the prepare/unprepare clocks method
calling. So if the corresponding clock source is provided, then
getting an error shall actually terminate the device probe procedure.
If it isn't specified then the driver shall proceed with further
initializations.

We'll use the optional clocks getting method to handle the APB reference
clock, which can be provided for instance in the device of-node with
"bus" clock-name.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200323195401.30338-5-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-dwapb.c